:root {
    --primary: #000000;
    --primary-hover: #1f2937;
    --primary-light: #f3f4f6;
    --secondary: #9ca3af;
    --bg-page: #ffffff;
    --bg-surface: #f9fafb;
    --bg-surface-hover: #f3f4f6;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border: #f3f4f6;
    --error: #ef4444;
    --error-bg: #fef2f2;
    --success: #10b981;
    --success-bg: #ecfdf5;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ===== TYPOGRAPHY & ICONS ===== */
.material-icons-round {
    vertical-align: middle;
}

/* ===== BUTTONS ===== */
button {
    font-family: var(--font-sans);
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.95rem;
    position: relative;
    outline: none;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: scale(0.98);
}

.btn-primary.btn-full {
    width: 100%;
}

.icon-btn,
.icon-btn-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    transition: all var(--transition);
}

.icon-btn {
    width: 40px;
    height: 40px;
}

.icon-btn-sm {
    width: 32px;
    height: 32px;
}

.icon-btn:hover,
.icon-btn-sm:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-main);
}

.btn-ghost {
    padding: 0.5rem 1rem;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.btn-ghost:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-main);
}

.link-btn {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
}

.link-btn:hover {
    text-decoration: underline;
}

/* ===== UTILITIES ===== */
.hidden {
    display: none !important;
}

.separator {
    width: 1px;
    height: 24px;
    background-color: var(--border);
    margin: 0 0.5rem;
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background: var(--bg-page);
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background-color: var(--bg-surface);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.logo-mark {
    background-color: var(--primary);
    color: white;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 1;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--secondary);
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    text-align: center;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 1.2rem;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.8rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--bg-surface-hover);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition);
    color: var(--text-main);
    font-weight: 500;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--bg-surface);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
}

.toggle-password {
    position: absolute;
    right: 0.5rem;
    padding: 0.5rem;
    color: var(--text-muted);
    border-radius: 50%;
}

.toggle-password:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-main);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.username-wrapper input {
    padding-right: 6.5rem;
}

.domain-suffix {
    position: absolute;
    right: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.auth-error,
.auth-success {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.auth-error {
    background-color: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(229, 62, 62, 0.2);
}

.auth-error ul {
    margin-left: 1.25rem;
}

.auth-success {
    background-color: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(56, 161, 105, 0.2);
}

.pwd-strength {
    height: 4px;
    border-radius: 2px;
    background-color: var(--border);
    margin-top: 0.5rem;
    transition: all 0.3s ease;
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    position: relative;
    overflow: hidden;
}

.pwd-strength::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    transition: all 0.3s ease;
    width: 0;
}

.pwd-strength.weak::before {
    width: 25%;
    background-color: var(--error);
}

.pwd-strength.medium::before {
    width: 50%;
    background-color: #ecc94b;
}

.pwd-strength.strong::before {
    width: 75%;
    background-color: #38a169;
}

.pwd-strength.very-strong::before {
    width: 100%;
    background-color: #276749;
}


/* ===== APP LAYOUT ===== */
.app-page {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition);
    z-index: 20;
}

.sidebar-header {
    padding: 1.5rem;
}

.sidebar-logo {
    margin-bottom: 0;
    justify-content: flex-start;
}

.compose-btn {
    margin: 0 1.5rem 1rem;
    background-color: var(--primary);
    color: white;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all var(--transition);
    font-size: 0.95rem;
    box-shadow: var(--shadow-md);
}

.compose-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

/* Segmented Control (Tabs) */
.segmented-control {
    display: flex;
    background-color: var(--bg-surface-hover);
    border-radius: var(--radius-md);
    padding: 0.25rem;
    margin-bottom: 1rem;
    width: 100%;
}

.segment-btn {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: calc(var(--radius-md) - 2px);
    transition: all var(--transition);
}

.segment-btn:hover {
    color: var(--text-main);
}

.segment-btn.active {
    background-color: var(--bg-surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.folder-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 1rem;
}

.folder-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--transition);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.folder-item:hover {
    background-color: var(--bg-surface-hover);
}

.folder-item.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

.folder-item .material-icons-round {
    color: var(--text-muted);
}

.folder-item.active .material-icons-round {
    color: var(--primary);
}

.folder-count {
    margin-left: auto;
    font-size: 0.8rem;
    background-color: var(--primary);
    color: white;
    padding: 0.1rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
}

.sidebar-bottom {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-search {
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar-search .material-icons-round {
    position: absolute;
    left: 0.75rem;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.sidebar-search input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: none;
    background-color: var(--bg-surface-hover);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-family: inherit;
    transition: box-shadow var(--transition);
}

.sidebar-search input:focus {
    outline: none;
    background-color: var(--bg-surface-hover);
    box-shadow: 0 0 0 2px var(--primary);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn {
    color: var(--text-muted);
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
}

.logout-btn:hover {
    background-color: var(--bg-surface-hover);
    color: var(--error);
}

/* Email List Panel */
.email-list-panel {
    width: 380px;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.panel-header {
    padding: 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.folder-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
}

.panel-actions {
    display: flex;
    gap: 0.25rem;
}

.email-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}

.email-item {
    padding: 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color var(--transition);
    position: relative;
    margin-bottom: 0.25rem;
    border: 1px solid transparent;
}

.email-item:hover {
    background-color: var(--bg-surface-hover);
}

.email-item.active {
    background-color: var(--primary);
    color: white;
}

.email-item.unread {
    background-color: transparent;
}

.email-item.unread .email-subject {
    font-weight: 700;
}

.email-item.unread .email-sender {
    font-weight: 600;
}

.email-item.active .email-subject,
.email-item.active .email-sender,
.email-item.active .email-date,
.email-item.active .email-preview {
    color: rgba(255, 255, 255, 0.9);
}

.email-item.active .email-sender .avatar-sm {
    background-color: rgba(255, 255, 255, 0.2);
}

.email-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.25rem;
}

.email-sender {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.email-sender .avatar-sm {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #cbd5e0;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

.email-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    margin-left: 0.5rem;
}

.email-subject {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-preview {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.list-pagination {
    padding: 1rem;
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--border);
    background-color: var(--bg-surface);
}

/* Reading Pane */
.reading-pane {
    flex: 1;
    background-color: #fdfdfd;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.reading-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    gap: 1rem;
}

.reading-empty-icon {
    font-size: 4rem;
    opacity: 0.4;
}

.reading-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.reading-topbar {
    height: 80px;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-surface);
    flex-shrink: 0;
}

.reading-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.reading-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.email-header-detail {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.email-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    flex-shrink: 0;
}

.email-meta-detail {
    flex: 1;
}

.email-subject-detail {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.email-from-detail {
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.email-date-detail {
    font-weight: normal;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.email-to-detail {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.email-body-content {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-main);
}

.email-body-content a {
    text-decoration: underline;
}

.email-body-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}

.email-body-content blockquote {
    border-left: 3px solid var(--border);
    padding-left: 1rem;
    color: var(--text-muted);
    margin: 1rem 0;
}

.email-attachments {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--bg-surface);
    transition: all var(--transition);
}

.attachment-item:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.attachment-icon {
    color: var(--text-muted);
}

.attachment-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.attachment-size {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== DROPDOWNS ===== */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--bg-surface);
    min-width: 160px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 0.5rem 0;
    z-index: 100;
    border: 1px solid var(--border);
}

.dropdown.active .dropdown-menu,
.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu button {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    text-align: left;
    transition: background-color var(--transition);
}

.dropdown-menu button:hover {
    background-color: var(--bg-surface-hover);
}

/* ===== MODALS (Compose, Folders) ===== */
.modal-backdrop,
.compose-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-box {
    background-color: var(--bg-surface);
    padding: 2rem;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.modal-box h3 {
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* Compose Modal */
.compose-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 650px;
    height: 80vh;
    max-height: 700px;
    background-color: var(--bg-surface);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}



.compose-header {
    background-color: var(--bg-surface);
    color: var(--text-main);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.compose-title {
    font-weight: 600;
    font-size: 1rem;
}

.compose-header-actions .icon-btn-sm {
    color: var(--text-muted);
}

.compose-header-actions .icon-btn-sm:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-main);
}

.compose-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 0 1.5rem;
}

.compose-field {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding: 0.25rem 0;
}

.compose-field label {
    width: 60px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.compose-input {
    flex: 1;
    border: none;
    padding: 0.75rem 0;
    font-family: inherit;
    font-size: 0.95rem;
    background: transparent;
}

.compose-input:focus {
    outline: none;
}

.compose-extras {
    padding: 0.5rem 0;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
}

.compose-editor-toolbar {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border);
    background-color: var(--bg-surface-hover);
}

.compose-editor-toolbar button,
.toolbar-attach {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
}

.compose-editor-toolbar button:hover,
.toolbar-attach:hover {
    background-color: #e2e8f0;
    color: var(--text-main);
}

.compose-editor {
    flex: 1;
    padding: 1rem;
    font-size: 1rem;
    outline: none;
    overflow-y: auto;
}

.compose-editor[data-placeholder]:empty:before {
    content: attr(data-placeholder);
    color: #a0aec0;
    pointer-events: none;
}

.compose-footer {
    padding: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: var(--bg-surface);
}

.compose-delete-draft {
    margin-left: auto;
}

/* ===== SKELETONS ===== */
.sk {
    background: linear-gradient(90deg, #f0f4f8 25%, #e2e8f0 50%, #f0f4f8 75%);
    background-size: 200% 100%;
    animation: sk-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes sk-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.folder-skeleton {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.sk-folder {
    height: 24px;
    width: 80%;
}

.email-skeleton {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.sk-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sk-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sk-line-1 {
    width: 30%;
    height: 16px;
}

.sk-line-2 {
    width: 70%;
    height: 14px;
}

.sk-line-3 {
    width: 90%;
    height: 14px;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--secondary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ===== MOBILE HEADER & RESPONSIVENESS ===== */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border);
}

.mobile-menu-btn {
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
}

.compose-btn-mobile {
    background-color: var(--primary);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-btn {
    display: none;
}

@media (max-width: 992px) {
    .app-page {
        flex-direction: column;
    }

    .email-list-panel,
    .reading-pane {
        width: 100%;
        flex: 1;
    }

    .reading-pane {
        position: absolute;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        transform: translateX(100%);
        transition: transform var(--transition);
        z-index: 50;
    }

    .reading-pane.active {
        transform: translateX(0);
    }

    .back-btn {
        display: flex;
    }

    .compose-modal {
        width: 100vw;
        right: 0;
        bottom: 0;
        border-radius: 0;
        height: 100vh;
    }

    .compose-modal.expanded {
        width: 100vw;
        height: 100vh;
        right: 0;
        bottom: 0;
        border-radius: 0;
    }
}