/* Mail Server - Modern Gmail-like Design */

:root {
    /* Colors */
    --primary: #4285f4;
    --primary-dark: #3367d6;
    --primary-light: #e8f0fe;
    --secondary: #202124;
    --success: #34a853;
    --danger: #ea4335;
    --warning: #fbbc04;

    /* TikTok Colors */
    --tiktok-primary: #000000;
    --tiktok-secondary: #fe2c55;
    --tiktok-accent: #25f4ee;

    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e8eaed;

    /* Text */
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-tertiary: #80868b;

    /* Border */
    --border-color: #dadce0;
    --border-radius: 8px;
    --border-radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.2);

    /* Transitions */
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-tiktok {
    background: linear-gradient(135deg, var(--tiktok-primary) 0%, #333 100%);
    color: white;
    border: 2px solid var(--tiktok-primary);
    position: relative;
    overflow: hidden;
}

.btn-tiktok::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(254, 44, 85, 0.3), transparent);
    transition: 0.5s;
}

.btn-tiktok:hover::before {
    left: 100%;
}

.btn-tiktok:hover {
    background: linear-gradient(135deg, #1a1a1a 0%, #444 100%);
    box-shadow: 0 0 20px rgba(254, 44, 85, 0.5);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-full {
    width: 100%;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    padding: 48px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--primary) 0%, #7c4dff 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo svg {
    width: 36px;
    height: 36px;
}

.auth-header h1 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Progress Bar */
.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.progress-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.progress-step.active {
    background: var(--primary);
    color: white;
}

.progress-step.completed {
    background: var(--success);
    color: white;
}

.progress-line {
    width: 48px;
    height: 3px;
    background: var(--bg-tertiary);
    border-radius: 2px;
}

.progress-line.active {
    background: var(--primary);
}

.username-preview {
    background: var(--primary-light);
    padding: 12px 16px;
    border-radius: var(--border-radius);
    margin-bottom: 24px;
    display: flex;
    gap: 8px;
}

.username-preview .label {
    color: var(--text-secondary);
}

.username-preview .value {
    color: var(--primary);
    font-weight: 600;
}

/* Form Elements */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.input-group input {
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 15px;
    transition: var(--transition);
    background: var(--bg-primary);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.input-group input::placeholder {
    color: var(--text-tertiary);
}

.input-with-suffix {
    display: flex;
    align-items: stretch;
}

.input-with-suffix input {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    flex: 1;
}

.input-suffix {
    background: var(--bg-tertiary);
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-left: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    color: var(--text-secondary);
    font-size: 15px;
    white-space: nowrap;
}

.input-hint {
    color: var(--text-tertiary);
    font-size: 12px;
}

.error-message {
    background: #fce8e6;
    color: var(--danger);
    padding: 12px 16px;
    border-radius: var(--border-radius);
    font-size: 14px;
    margin-bottom: 16px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background: var(--bg-secondary);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.logo-small {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, #7c4dff 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo-small svg {
    width: 24px;
    height: 24px;
}

.sidebar-header span {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-info {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    margin: 16px;
    border-radius: var(--border-radius);
}

.user-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.user-username {
    color: var(--text-tertiary);
    font-size: 12px;
}

.sidebar-nav {
    flex: 1;
    padding: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-size: 14px;
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.nav-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--danger);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-size: 14px;
}

.logout-btn svg {
    width: 20px;
    height: 20px;
}

.logout-btn:hover {
    background: #fce8e6;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 24px;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.content-header h1 {
    font-size: 28px;
    color: var(--text-primary);
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-primary);
    border-radius: 50%;
    color: var(--text-secondary);
    text-decoration: none;
    margin-right: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.back-btn:hover {
    background: var(--bg-tertiary);
}

.back-btn svg {
    width: 24px;
    height: 24px;
}

.header-info {
    flex: 1;
}

.mail-password-hint {
    color: var(--text-tertiary);
    font-size: 14px;
}

/* Mail Cards Grid */
.mail-accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.mail-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.mail-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.mail-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.mail-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, #7c4dff 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.mail-icon svg {
    width: 24px;
    height: 24px;
}

.mail-info {
    display: flex;
    flex-direction: column;
}

.mail-address {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
}

.mail-created {
    color: var(--text-tertiary);
    font-size: 12px;
}

.mail-card-footer {
    display: flex;
    justify-content: flex-end;
}

.tiktok-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #25f4ee 0%, #fe2c55 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.tiktok-badge svg {
    width: 14px;
    height: 14px;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 40px;
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    border: 2px dashed var(--border-color);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    color: var(--text-tertiary);
    margin-bottom: 24px;
}

.empty-state h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Mail View Content */
.mail-view-content {
    display: grid;
    gap: 24px;
}

.info-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.info-card h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.info-row {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--bg-secondary);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
    min-width: 120px;
    font-size: 14px;
}

.info-value {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}

/* TikTok Section */
.tiktok-section {
    margin-top: 24px;
}

.tiktok-box {
    background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 32px;
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
    background-origin: border-box;
    position: relative;
    overflow: hidden;
}

.tiktok-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(254, 44, 85, 0.1), transparent, rgba(37, 244, 238, 0.1), transparent);
    animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.tiktok-logo-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #fe2c55 0%, #25f4ee 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.tiktok-logo-large svg {
    width: 48px;
    height: 48px;
}

.tiktok-info,
.tiktok-empty {
    flex: 1;
    position: relative;
    z-index: 1;
}

.tiktok-info h3,
.tiktok-empty h3 {
    color: white;
    font-size: 20px;
    margin-bottom: 16px;
}

.tiktok-empty p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.tiktok-info .info-row {
    border-color: rgba(255, 255, 255, 0.1);
}

.tiktok-info .info-label {
    color: rgba(255, 255, 255, 0.6);
}

.tiktok-info .info-value {
    color: white;
}

.tiktok-username {
    font-family: monospace;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 32px;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.modal-header h2 {
    flex: 1;
    font-size: 20px;
    color: var(--text-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-secondary);
    border-radius: 50%;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-tertiary);
}

/* TikTok Modal */
.tiktok-modal {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid #333;
}

.tiktok-header {
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
}

.tiktok-header h2 {
    color: white;
}

.tiktok-header .modal-close {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.tiktok-header .modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.tiktok-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #fe2c55 0%, #25f4ee 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.tiktok-logo svg {
    width: 28px;
    height: 28px;
}

.tiktok-step {
    color: white;
}

.tiktok-username-display {
    margin-bottom: 24px;
}

.instruction-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 12px;
}

.username-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--tiktok-secondary);
    border-radius: var(--border-radius);
    padding: 16px;
    font-family: monospace;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
}

.username-box span {
    flex: 1;
}

.copy-btn {
    background: transparent;
    border: none;
    color: var(--tiktok-accent);
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.copy-btn:hover {
    background: rgba(37, 244, 238, 0.2);
}

.copy-btn svg {
    width: 20px;
    height: 20px;
}

.tiktok-modal .input-group label {
    color: rgba(255, 255, 255, 0.7);
}

.tiktok-modal .input-group input {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.tiktok-modal .input-group input:focus {
    border-color: var(--tiktok-secondary);
    box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.3);
}

.tiktok-modal .input-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.success-message {
    text-align: center;
    padding: 32px 0;
}

.success-message svg {
    width: 64px;
    height: 64px;
    color: var(--success);
    margin-bottom: 16px;
}

.success-message h3 {
    margin-bottom: 8px;
}

.success-message p {
    color: rgba(255, 255, 255, 0.7);
}

/* Admin Page */
.admin-container {
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
    background: var(--bg-secondary);
    min-height: 100vh;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding: 24px;
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

.admin-header h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    color: var(--text-primary);
}

.admin-header h1 svg {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.stat-icon.users {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-icon.mails {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
}

.stat-icon.tiktok {
    background: linear-gradient(135deg, #fe2c55 0%, #25f4ee 100%);
}

.stat-icon svg {
    width: 28px;
    height: 28px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Admin Sections */
.admin-section {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.admin-section h2 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--bg-secondary);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

td {
    font-size: 14px;
    color: var(--text-primary);
}

tbody tr:hover {
    background: var(--bg-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main-content {
        margin-left: 0;
    }

    .content-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .auth-card {
        padding: 32px 24px;
    }

    .tiktok-box {
        flex-direction: column;
        text-align: center;
    }

    .admin-container {
        padding: 16px;
    }
}

/* Inbox Section */
.inbox-section {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    color: var(--text-primary);
    margin: 0;
}

.section-header h2 svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

/* Email List */
.email-list {
    max-height: 400px;
    overflow-y: auto;
}

.email-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid var(--bg-secondary);
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--border-radius);
}

.email-item:hover {
    background: var(--bg-secondary);
}

.email-item:last-child {
    border-bottom: none;
}

.email-item .email-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.email-item .email-icon svg {
    width: 20px;
    height: 20px;
}

.email-content {
    flex: 1;
    min-width: 0;
}

.email-from {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-subject {
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-date {
    color: var(--text-tertiary);
    font-size: 12px;
    white-space: nowrap;
}

/* Empty Inbox */
.empty-inbox {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-tertiary);
}

.empty-inbox svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-inbox p {
    margin: 0;
    font-size: 14px;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-tertiary);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Email Modal */
.email-modal .email-modal-content {
    max-width: 800px;
    max-height: 90vh;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.email-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.email-header-info {
    flex: 1;
}

.email-header-info h2 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 12px;
    word-break: break-word;
}

.email-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}

.email-meta strong {
    color: var(--text-tertiary);
}

/* Email Body Container - Scrollable */
.email-body-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: var(--bg-secondary);
    min-height: 200px;
    max-height: 50vh;
}

.email-body {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 24px;
    min-height: 100px;
}

.email-body img {
    max-width: 100%;
    height: auto;
}

.email-body pre.plain-text {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.email-body .no-content,
.email-body .error-text {
    text-align: center;
    color: var(--text-tertiary);
    padding: 32px;
}

.email-body .error-text {
    color: var(--danger);
}

/* Email Attachments */
.email-attachments {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
    flex-shrink: 0;
}

.attachments-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 14px;
}

.attachments-header svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

.attachment-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    padding: 10px 16px;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 13px;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.attachment-item:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.attachment-item svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.attachment-name {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-size {
    color: var(--text-tertiary);
    font-size: 11px;
}