:root {
    /* Color Palette */
    --bg-primary: #0f172a; /* Slate 900 */
    --bg-secondary: #1e293b; /* Slate 800 */
    --accent-primary: #6366f1; /* Indigo 500 */
    --accent-hover: #4f46e5; /* Indigo 600 */
    --text-primary: #f8fafc; /* Slate 50 */
    --text-secondary: #94a3b8; /* Slate 400 */
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(30, 41, 59, 0.7);
    --danger: #ef4444;
    --success: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #020617 0%, #0f172a 100%);
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.app-container {
    width: 96%;
    max-width: 1500px;
    height: 92vh;
    display: flex;
    gap: 24px;
}

/* --- Login View styling --- */
.login-wrapper {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #020617 0%, #0f172a 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.login-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.login-header i {
    font-size: 3rem;
    color: var(--accent-primary);
}

.login-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.login-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-field {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 16px;
    gap: 12px;
    transition: border-color 0.2s;
}

.input-field:focus-within {
    border-color: var(--accent-primary);
}

.input-field i {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.input-field input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    width: 100%;
    font-family: inherit;
    font-size: 0.95rem;
}

.btn-login {
    margin-top: 8px;
    height: 48px;
}

.login-error-msg {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    text-align: center;
}

/* --- Sidebar --- */
.sidebar {
    width: 320px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    padding: 28px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header-mobile {
    display: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--accent-primary);
    letter-spacing: -0.5px;
}

.logo i {
    font-size: 2.2rem;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    padding-left: 8px;
}

.accounts-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.account-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.03);
}

.account-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.account-item.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: inset 4px 0 0 var(--accent-primary);
}

.acc-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.account-item.active .acc-icon {
    background: var(--accent-primary);
    color: white;
}

.acc-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.acc-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.acc-email {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

/* User Badge in Footer */
.user-badge-sidebar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
}

.user-badge-sidebar .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
}

.user-badge-sidebar .info {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.user-badge-sidebar .name {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-badge-sidebar .role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.logout-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px;
}

.logout-btn:hover {
    color: var(--danger);
}

.btn {
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

/* --- Main Content & SPA Views --- */
.main-content {
    flex: 1;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.view-container {
    display: none;
    flex-direction: column;
    height: 100%;
    width: 100%;
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
}

.view-container.active {
    display: flex;
    opacity: 1;
}

/* --- Inbox View --- */
.topbar {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.4);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.8rem;
    cursor: pointer;
    margin-right: 4px;
}

.topbar h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.status-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
    display: none;
    align-items: center;
    gap: 6px;
}

.status-badge.active {
    display: flex;
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 8px 16px;
    width: 320px;
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: rgba(0, 0, 0, 0.5);
}

.search-bar i {
    color: var(--text-secondary);
    margin-right: 10px;
    font-size: 1.2rem;
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    outline: none;
    width: 100%;
    font-family: inherit;
    font-size: 0.95rem;
}

.search-bar input::placeholder {
    color: var(--text-secondary);
}

.email-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
}

/* Notification Permission Request Banner */
.notification-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 12px 20px;
    margin: 16px 24px;
    font-size: 0.92rem;
    color: #93c5fd;
    animation: fadeIn 0.4s ease;
}
.notification-banner .notif-banner-icon {
    font-size: 1.3rem;
    color: #3b82f6;
}
.notification-banner .notif-banner-text {
    flex: 1;
    line-height: 1.4;
}
.notification-banner button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}
.notification-banner button:hover {
    background: #2563eb;
    transform: scale(1.02);
}

/* --- Compact Single Line Email Layout --- */
.email-item {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding: 10px 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 48px;
    transition: all 0.15s ease;
}

.email-item.unread {
    background: rgba(59, 130, 246, 0.03);
}

.email-item.unread:hover {
    background: rgba(59, 130, 246, 0.06);
}

.email-item.unread .email-subject {
    font-weight: 700 !important;
    color: #93c5fd;
}

.email-item.unread .email-sender {
    font-weight: 700 !important;
}

.email-item.unread .sender-avatar {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.unread-dot {
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #3b82f6;
    margin-right: 6px;
}

.email-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.email-sender {
    width: 180px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sender-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.email-content-wrapper {
    flex: 1;
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

.email-subject {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
    white-space: nowrap;
}

.email-preview-separator {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.email-preview {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

.email-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}

/* Error message styling */
.error-msg {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
    padding: 20px;
    margin: 24px 32px;
    border-radius: 16px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
}

/* --- Loader --- */
.loader-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: var(--text-secondary);
    gap: 20px;
}

.loader {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* --- SPA Reader View --- */
.reader-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.4);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reader-actions {
    display: flex;
    margin-bottom: 8px;
}

.btn-back {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-back:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

#reader-subject {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
}

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

.meta-sender {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    color: var(--text-secondary);
}

.meta-sender .avatar {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 700;
}

.date-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.reader-body {
    flex: 1;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

#reader-text-body {
    padding: 30px;
    font-size: 1rem;
    line-height: 1.7;
    overflow-y: auto;
    height: 100%;
    color: #0f172a;
    background: #ffffff;
}

/* Sidebar Backdrop overlay on mobile */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
    display: block;
    opacity: 1;
}

/* --- Admin Panel View Layout --- */
.admin-panel-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    height: 100%;
}

.admin-card {
    padding: 24px;
    border-radius: 20px;
    height: fit-content;
}

.admin-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.admin-error-msg {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 10px;
    background: rgba(239, 68, 68, 0.05);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.1);
}

.admin-success-msg {
    color: var(--success);
    font-size: 0.85rem;
    margin-top: 10px;
    background: rgba(16, 185, 129, 0.05);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.15);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

.admin-table th, .admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.btn-delete-staff {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    transition: all 0.2s;
}

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

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    body {
        align-items: stretch;
    }

    .app-container {
        width: 100%;
        height: 100vh;
        max-width: 100%;
        border-radius: 0;
        gap: 0;
    }

    /* Sidebar Drawer Style */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 280px;
        background: #0f172a;
        z-index: 100;
        border-radius: 0;
        border: none;
        border-right: 1px solid var(--border-color);
        transform: translateX(-100%);
        box-shadow: 20px 0 30px rgba(0, 0, 0, 0.3);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-header-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 24px;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 16px;
    }

    .sidebar-title-mobile {
        font-weight: 700;
        font-size: 1.2rem;
        color: var(--text-primary);
    }

    .menu-close-btn {
        display: block;
        background: transparent;
        border: none;
        color: var(--text-primary);
        font-size: 1.5rem;
        cursor: pointer;
    }

    .logo {
        margin-bottom: 24px;
        font-size: 1.4rem;
    }

    /* Main Content */
    .main-content {
        border-radius: 0;
        border: none;
    }

    .topbar {
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

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

    .menu-toggle-btn {
        display: block;
    }

    .topbar h1 {
        font-size: 1.3rem;
        margin-right: auto;
    }

    .search-bar {
        width: 100%;
        padding: 8px 12px;
    }

    .email-list {
        padding: 0;
    }

    /* --- Stacked Email Row Mobile Layout --- */
    .email-item {
        display: grid;
        grid-template-columns: 36px 1fr auto;
        grid-template-rows: auto auto;
        grid-template-areas: 
            "avatar sender date"
            "avatar content content";
        height: auto;
        padding: 12px 16px;
        gap: 4px 12px;
    }

    .sender-avatar {
        grid-area: avatar;
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
        align-self: start;
        margin-top: 2px;
    }

    .email-sender {
        grid-area: sender;
        width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 0.95rem;
        font-weight: 700;
        color: var(--text-primary);
        max-width: 180px;
        display: block;
    }

    .email-date {
        grid-area: date;
        font-size: 0.75rem;
        color: var(--text-secondary);
        margin-left: auto;
        align-self: center;
        background: transparent;
        padding: 0;
    }

    .email-content-wrapper {
        grid-area: content;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        min-width: 0;
    }

    .email-subject {
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--accent-primary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .email-preview-separator {
        display: none;
    }

    .email-preview {
        font-size: 0.8rem;
        color: var(--text-secondary);
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Reader view mobile adjustments */
    .reader-header {
        padding: 16px;
        gap: 8px;
    }

    #reader-subject {
        font-size: 1.2rem;
    }

    .reader-meta {
        font-size: 0.85rem;
    }

    #reader-text-body {
        padding: 16px;
        font-size: 0.95rem;
    }

    /* Admin Panel Mobile Adjustments */
    .admin-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }

    .admin-panel-content {
        padding: 16px;
    }

    .admin-card {
        padding: 16px;
    }
}

/* --- OTP & Filter Enhancements --- */
.search-and-filter {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 14px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    transition: all 0.25s ease;
}

.filter-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.filter-toggle-btn.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

/* OTP Badge in Email Row */
.otp-badge {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 8px;
    flex-shrink: 0;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    align-self: center;
}

.otp-badge:hover {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.4);
}

/* OTP Highlights Box in Reader View */
.otp-highlight-box {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.12) 0%, rgba(30, 41, 59, 0.5) 100%);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}

.otp-highlight-box .otp-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.otp-highlight-box .otp-left i {
    font-size: 1.6rem;
    color: var(--accent-primary);
}

.otp-highlight-box .otp-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.otp-highlight-box .otp-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.otp-highlight-box .otp-code {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 2px;
    font-family: monospace, Courier, sans-serif;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.btn-copy-otp {
    background: var(--accent-primary);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.btn-copy-otp:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.5);
}

/* Responsiveness adjustments for OTP */
@media (max-width: 768px) {
    .search-and-filter {
        flex-direction: row;
        width: 100%;
        gap: 8px;
    }
    
    .search-bar {
        flex: 1;
    }

    .filter-toggle-btn {
        padding: 8px 12px;
    }

    .filter-toggle-btn span {
        display: none; /* Hide text on mobile */
    }

    .otp-highlight-box {
        padding: 12px 16px;
    }
    
    .otp-highlight-box .otp-code {
        font-size: 1.2rem;
        padding: 2px 8px;
    }
    
    .otp-badge {
        align-self: start;
        margin-bottom: 4px;
        margin-top: 2px;
    }
}

/* --- Toast Notification --- */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translate(-50%, 50px);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid var(--border-color);
}

.toast.visible {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
}

.toast-success i {
    color: var(--success);
    font-size: 1.3rem;
}

.toast-error i {
    color: var(--danger);
    font-size: 1.3rem;
}

@media (max-width: 768px) {
    .toast {
        bottom: 20px;
        width: 90%;
        font-size: 0.85rem;
        padding: 12px 16px;
    }
}
