/* SMS Sender PWA - Modern Light Theme UI/UX */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --accent: #0891b2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --card-bg: #ffffff;
    --surface: #f1f5f9;
    --surface-hover: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    --gradient-accent: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html,
body {
    height: 100%;
    background: var(--light-bg);
    color: var(--text-primary);
    overflow: hidden;
}

/* Page Loader */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-spinner::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid transparent;
    border-top: 3px solid var(--secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite reverse;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.loader-text {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* PWA Install Prompt */
.install-prompt {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 16px 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9998;
}

.install-prompt.show {
    transform: translateY(0);
}

.install-prompt-content {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.install-prompt-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.install-prompt-text {
    flex: 1;
    min-width: 0;
}

.install-prompt-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.install-prompt-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

.install-prompt-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.install-btn {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.install-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.dismiss-btn {
    background: var(--surface);
    color: var(--text-secondary);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dismiss-btn:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

@media (max-width: 480px) {
    .install-prompt-content {
        flex-wrap: wrap;
    }

    .install-prompt-text {
        flex: 1 1 calc(100% - 48px);
    }

    .install-prompt-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
    }
}

body {
    display: flex;
    flex-direction: column;
}

/* App Container */
#app {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Page Container */
.page {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 0px;
    padding-bottom: 70px;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.header {
    background: var(--white);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header h1 {
    font-size: 1.1rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: var(--shadow-glow);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid var(--border-light);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border-light);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stat-card.primary .stat-value {
    color: var(--primary-light);
}

.stat-card.success .stat-value {
    color: var(--success);
}

.stat-card.warning .stat-value {
    color: var(--warning);
}

.stat-card.accent .stat-value {
    color: var(--accent);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 16px 18px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 44px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--white);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: var(--surface);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 10px 16px;
    font-size: 0.9rem;
}

/* User List */
.user-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.user-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.user-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.user-avatar.male {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.user-avatar.female {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
}

.user-avatar.other {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-contact {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.user-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--primary);
    color: white;
}

.icon-btn.danger:hover {
    background: var(--danger);
}

/* Filter Section */
.filter-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.filter-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    padding: 10px 18px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--surface);
}

.filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.filter-chip.success.active {
    background: var(--success);
    border-color: var(--success);
}

.filter-chip.warning.active {
    background: var(--warning);
    border-color: var(--warning);
}

/* Message Preview */
.message-preview {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.message-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.message-preview-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.message-preview-count {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
}

.message-preview-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Recipients List */
.recipients-section {
    margin-bottom: 20px;
}

.recipients-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.recipients-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.recipients-count {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
}

.recipient-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recipient-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--surface);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    border: 1px solid var(--border);
}

.recipient-tag-name {
    color: var(--text-primary);
}

.recipient-tag-remove {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: var(--transition);
}

.recipient-tag-remove:hover {
    background: var(--danger);
    color: white;
}

/* Snackbar Notifications - Top Snackbar Style */
.snackbar-container {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    /* gap: 8px; */
    padding: 16px;
    width: 100%;
    /* max-width: 400px; */
    background-color: red;
    pointer-events: none;
}

.snackbar {
    padding: 14px 20px;
    border-radius: var(--radius-lg);
    color: white;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    /* gap: 12px; */
    width: 100%;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    cursor: default;
}

.snackbar:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.snackbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    animation: progressBar 3s linear forwards;
}

@keyframes progressBar {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

.snackbar-close {
    margin-left: auto;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
}

.snackbar-close:hover {
    color: white;
    transform: scale(1.2);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

.snackbar.success {
    background: var(--success);
}

.snackbar.error {
    background: var(--danger);
}

.snackbar.warning {
    background: var(--warning);
}

.snackbar.info {
    background: var(--primary);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 200;
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
}

/* Floating Refresh Button */
#refresh-btn {
    transition: transform 0.3s ease;
}

#refresh-btn:active {
    transform: scale(0.95) rotate(180deg);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-muted);
    transition: var(--transition);
    padding: 6px 16px;
    border-radius: var(--radius-lg);
}

.nav-item:hover {
    color: var(--text-primary);
    background: var(--surface);
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active .nav-icon {
    color: white !important;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.nav-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: var(--surface);
    transition: var(--transition);
}

.nav-label {
    font-size: 0.7rem;
    font-weight: 500;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-muted);
}

.empty-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 500;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--danger);
    color: white;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--border);
}

.modal-footer .btn {
    flex: 1;
}

/* View Message Modal - Specific Styles */
/* #view-message-modal .modal {
    max-width: 480px;
    background: linear-gradient(180deg, var(--card-bg) 0%, #fafbfc 100%);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(99, 102, 241, 0.1);
    border: 1px solid var(--border-light);
}

#view-message-modal .modal-header {
    background: var(--gradient-primary);
    padding: 20px 24px;
    border-bottom: none;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

#view-message-modal .modal-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

#view-message-modal .modal-title::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

#view-message-modal .modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(4px);
}

#view-message-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: rotate(90deg);
}

#view-message-modal .modal-body {
    padding: 24px;
}

#view-message-modal .message-detail {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--surface);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary);
}

#view-message-modal .message-detail:last-child {
    margin-bottom: 0;
}

#view-message-modal .detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
}

#view-message-modal .detail-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-word;
}

#view-message-modal .detail-value.recipient {
    color: var(--primary);
    font-weight: 600;
}

#view-message-modal .message-content {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: var(--radius-md);
    border: 1px solid #bae6fd;
    position: relative;
}

#view-message-modal .message-content::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    width: 20px;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2306b6d4' viewBox='0 0 24 24'%3E%3Cpath d='M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1zm-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    opacity: 0.6;
}

#view-message-modal .message-text {
    margin-left: 28px;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 0.95rem;
}

#view-message-modal .empty-message {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-style: italic;
}

#view-message-modal .modal-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}

#view-message-modal .meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
} */

/* Loading */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Loader for buttons and modals - Heartbeat animation */
.loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: heartbeat 1s ease-in-out infinite;
}

.loader.bx-envelope,
.loader.bx-heart,
.loader.bx-send {
    color: var(--white);
    font-size: 18px;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    25% {
        transform: scale(1.2);
        opacity: 0.8;
    }

    50% {
        transform: scale(1);
        opacity: 1;
    }

    75% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
}

.quick-action:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.quick-action-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.quick-action-label {
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
}

/* Activity Log */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.activity-icon.sent {
    background: var(--success);
}

.activity-icon.failed {
    background: var(--danger);
}

.activity-icon.user {
    background: var(--primary);
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .header h1 {
        font-size: 1.3rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}