/* ==========================================
   Resend Email Hub - Official Gmail Light Theme
   ========================================== */

:root {
    --bg-base: #f6f8fc;
    --bg-sidebar: #f6f8fc;
    --bg-canvas: #ffffff;
    
    --google-blue: #0b57d0;
    --google-blue-hover: #0842a0;
    --google-blue-active: #063178;
    --google-blue-light: #c2e7ff;
    --google-blue-light-hover: #d3e3fd;
    --google-blue-pill: #e8f0fe;
    
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #718096;
    
    --border-color: #e5e7eb;
    --border-divider: #f3f4f6;
    
    --success: #16a34a;
    --success-light: #dcfce7;
    --error: #dc2626;
    --error-light: #fee2e2;
    --warning: #d97706;
    
    --font-heading: 'Outfit', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
    
    --transition-fast: 0.15s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-canvas: 16px;
    --box-shadow-elevated: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
    --box-shadow-soft: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden; /* App wraps in scrollable layout panels */
    display: flex;
    flex-direction: column;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.24);
}

/* App Container Layout */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* Auth Overlay Screen (Gmail Light Vibe) */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(246, 248, 252, 0.9);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

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

.auth-card {
    width: 440px;
    max-width: 90%;
    padding: 44px 36px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.auth-logo {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--google-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    box-shadow: 0 4px 10px rgba(11, 87, 208, 0.25);
    margin-bottom: 20px;
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-header h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

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

.auth-form {
    display: flex;
    flex-direction: column;
}

.setup-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-size: 0.82rem;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Gmail Top Header Bar */
.app-header {
    height: 64px;
    background: var(--bg-base);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid transparent;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 256px;
}

.menu-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.menu-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.logo-icon {
    font-size: 1.25rem;
    color: #ea4335; /* Gmail Red icon */
}

.logo-group h1 {
    font-family: var(--font-heading);
    font-size: 1.22rem;
    font-weight: 600;
    letter-spacing: -0.2px;
    color: #5f6368;
}

/* Gmail Search input bar */
.header-search {
    flex-grow: 1;
    max-width: 720px;
    padding: 0 16px;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 18px;
    color: var(--text-secondary);
    font-size: 1rem;
    pointer-events: none;
}

#search-logs {
    width: 100%;
    background: #eaf1fb; /* Gmail light gray/blue search input */
    border: none;
    padding: 12px 16px;
    padding-left: 52px;
    border-radius: 28px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-fast);
}

#search-logs:focus {
    background: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.2), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.15rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.header-icon-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

.profile-group {
    margin-left: 8px;
    cursor: pointer;
}

.profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #7b1fa2; /* avatar color */
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Sidebar & Main Area wrapper */
.body-wrapper {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
    background: var(--bg-base);
}

/* Left Sidebar */
.sidebar {
    width: 256px;
    background: var(--bg-sidebar);
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

/* Large Capsule Compose Button */
.btn-compose {
    background: #ffffff;
    border: none;
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--box-shadow-soft);
    transition: box-shadow var(--transition-fast), background var(--transition-fast);
    margin: 8px 0 16px 8px;
    align-self: flex-start;
    min-width: 140px;
}

.btn-compose:hover {
    background: var(--google-blue-light-hover);
    box-shadow: var(--box-shadow-elevated);
}

.btn-compose i {
    font-size: 1.1rem;
    color: #444746;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;
}

/* Sidebar Menu Items (Capsule pills) */
.menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 12px;
    padding-left: 20px;
    color: #444746;
    text-decoration: none;
    border-radius: 20px; /* Capsule shape */
    font-weight: 600;
    font-size: 0.88rem;
    height: 32px;
    transition: var(--transition-fast);
}

.menu-item i {
    font-size: 1.1rem;
    color: #444746;
    width: 20px;
    text-align: center;
}

.menu-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.menu-item.active {
    color: #0b57d0;
    background: var(--google-blue-pill);
}

.menu-item.active i {
    color: #0b57d0;
}

.sidebar-footer {
    padding-top: 12px;
    margin-bottom: 12px;
}

/* Floating Content Canvas (Main Area) */
.main-content {
    flex-grow: 1;
    background: var(--bg-canvas);
    border-radius: var(--border-radius-canvas) 0 0 0; /* floating corner */
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-right: none;
    overflow-y: auto;
    padding: 0;
}

/* Tab Panels */
.tab-panel {
    display: none;
    height: 100%;
}

.tab-panel.active {
    display: block;
}

/* Workspace Grid (Compose view) */
.workspace-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    height: 100%;
    min-height: calc(100vh - 64px);
}

@media (max-width: 1250px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }
}

/* Gmail Composer Card (Flat borderless panel) */
.gmail-composer-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    height: 100%;
}

.composer-header {
    background: #f2f6fc; /* header background */
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.88rem;
    font-weight: 700;
    color: #1f1f1f;
}

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

.composer-header-actions button {
    background: none;
    border: none;
    color: #444746;
    cursor: pointer;
    font-size: 0.9rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.composer-header-actions button:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* Gmail Information banner */
.gmail-info-banner {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    align-items: flex-start;
}

.banner-icon {
    font-size: 1rem;
    color: var(--google-blue);
    margin-top: 2px;
}

.banner-text {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.banner-text code {
    background: rgba(0,0,0,0.05);
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
}

/* Divider Field Rows (Gmail style To, Subject lines) */
.composer-fields {
    display: flex;
    flex-direction: column;
}

.field-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-divider);
    padding: 8px 20px;
    min-height: 48px;
}

.field-row label {
    font-size: 0.88rem;
    font-weight: 500;
    color: #444746;
    width: 80px;
    flex-shrink: 0;
}

.field-row input {
    width: 100%;
    border: none !important;
    background: transparent !important;
    padding: 8px 0;
    font-size: 0.92rem;
    color: var(--text-primary);
    outline: none !important;
    box-shadow: none !important;
}

.field-row input::placeholder {
    color: #8e918f;
}

/* Template Selector pills */
.template-selector-container {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-divider);
    padding: 10px 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.field-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #444746;
    width: 110px;
    flex-shrink: 0;
}

.template-pill-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.template-pill {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #444746;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.template-pill:hover {
    background: #f8f9fa;
    border-color: #c7c7c7;
}

.template-pill.active {
    background: #e3e3e3;
    border-color: #727775;
    color: #1f1f1f;
}

.template-pill i {
    font-size: 0.85rem;
}

/* Dynamic field forms */
.dynamic-inputs-area {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-divider);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    padding-left: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #ffffff;
}

/* Rich Editor canvas area */
.rich-editor-container {
    width: 100%;
}

#rich-editor-body {
    min-height: 280px;
    max-height: calc(100vh - 380px);
    overflow-y: auto;
    padding: 12px 20px;
    background: #ffffff;
    color: #2c3e50;
    outline: none;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Gmail Composer Bottom Action Row */
.composer-action-bar {
    background: #ffffff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    border-top: 1px solid var(--border-divider);
    gap: 12px;
    margin-top: auto;
    flex-shrink: 0;
}

/* Big Blue Send Button */
.btn-send-gmail {
    background: var(--google-blue);
    border: none;
    color: white;
    padding: 10px 24px;
    border-radius: 20px; /* pill */
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: none;
    transition: var(--transition-fast);
}

.btn-send-gmail:hover {
    background: var(--google-blue-hover);
    box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
}

.btn-send-gmail:active {
    background: var(--google-blue-active);
}

/* Formatting toolbar beside Send button */
.formatting-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-left: 12px;
    border-left: 1px solid var(--border-color);
}

.editor-btn {
    background: none;
    border: none;
    color: #444746;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    font-size: 0.9rem;
}

.editor-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

.editor-btn.active {
    background: rgba(0, 0, 0, 0.12);
}

.editor-divider {
    width: 1px;
    height: 18px;
    background: var(--border-color);
    margin: 0 4px;
}

.color-picker-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    color: #444746;
}

.color-picker-wrapper:hover {
    background: rgba(0, 0, 0, 0.06);
}

.color-picker-wrapper input[type="color"] {
    position: absolute;
    opacity: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.btn-discard {
    background: none;
    border: none;
    color: #444746;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    font-size: 1.05rem;
    transition: var(--transition-fast);
}

.btn-discard:hover {
    background: #fee2e2;
    color: var(--error);
}

/* Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

.hidden {
    display: none !important;
}

/* Live Preview Side (Gmail Style Split) */
.preview-card {
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    height: 100%;
}

.preview-toggles {
    display: flex;
    gap: 4px;
}

.preview-toggle {
    background: none;
    border: none;
    color: #444746;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.preview-toggle:hover {
    background: rgba(0,0,0,0.06);
}

.preview-toggle.active {
    background: rgba(0, 0, 0, 0.12);
}

.preview-viewport {
    background: white;
    margin: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.05);
    flex-grow: 1;
    transition: width 0.4s ease, height 0.4s ease;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.preview-viewport.desktop {
    width: calc(100% - 40px);
}

.preview-viewport.mobile {
    width: 360px;
    height: 580px;
    flex-grow: 0;
    align-self: center;
    border: 10px solid #1e293b;
    border-radius: 32px;
    margin: 20px auto;
}

#email-preview-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: #ffffff;
    flex-grow: 1;
}

/* GMAIL INBOX ROWS */
.gmail-list-container {
    padding: 0;
}

.list-actions-bar {
    height: 48px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.left-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    background: none;
    border: none;
    color: #5f6368;
    cursor: pointer;
    font-size: 0.95rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: rgba(0,0,0,0.06);
}

.gmail-table {
    width: 100%;
    border-collapse: collapse;
}

.gmail-table td {
    padding: 8px 16px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border-divider);
    color: #202124;
}

.gmail-table tr:hover td {
    background: #f2f6fc;
    box-shadow: inset 1px 0 0 #0b57d0;
}

/* Gmail list columns styling */
.col-star { width: 36px; text-align: center; color: #f4b400; cursor: pointer; }
.col-to { width: 180px; font-weight: 700; color: #202124; }
.col-subject-wrapper { color: #5f6368; }
.col-subject { font-weight: 700; color: #202124; margin-right: 8px; }
.col-date { width: 100px; text-align: right; color: #5f6368; font-weight: 600; font-size: 0.8rem; }
.col-actions { width: 80px; text-align: center; }

/* Gmail settings UI */
.gmail-settings-container {
    height: 100%;
}

.settings-nav {
    border-bottom: 1px solid var(--border-color);
    display: flex;
    padding-left: 24px;
}

.settings-tab-btn {
    padding: 16px 20px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--google-blue);
    border-bottom: 3px solid var(--google-blue);
    cursor: pointer;
}

.settings-content-wrapper {
    padding: 32px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
}

@media (max-width: 900px) {
    .settings-content-wrapper {
        grid-template-columns: 1fr;
    }
}

.settings-block {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.settings-block h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.settings-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 18px;
    line-height: 1.5;
}

.settings-btn-row {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.btn-gmail-primary {
    background: var(--google-blue);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

.btn-gmail-primary:hover {
    background: var(--google-blue-hover);
}

.btn-gmail-secondary {
    background: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

.btn-gmail-secondary:hover {
    background: #f8f9fa;
}

.accordion-details {
    margin-top: 16px;
}

.accordion-details summary {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--google-blue);
    cursor: pointer;
}

.accordion-content {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.code-pre {
    background: #f1f3f4;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
    font-family: monospace;
    font-size: 0.75rem;
    color: #170cf6;
    margin-top: 10px;
    max-height: 180px;
}

.info-banner-card {
    background: #f8f9fa;
    border-left: 4px solid var(--google-blue);
}

.info-banner-card ul {
    padding-left: 18px;
    margin: 12px 0 16px;
}

.info-banner-card li {
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.external-link-btn {
    color: var(--google-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.82rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px; /* Gmail toasts are bottom-left! */
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 9999;
}

.toast {
    background: #323232; /* Gmail signature dark toast background */
    color: #f1f1f1;
    padding: 12px 24px;
    border-radius: 4px;
    box-shadow: 0 3px 5px -1px rgba(0,0,0,0.2), 0 6px 10px 0 rgba(0,0,0,0.14), 0 1px 18px 0 rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    min-width: 240px;
    animation: slideUp 0.3s cubic-bezier(0, 0, 0.2, 1) forwards;
}

.toast-icon {
    font-size: 1rem;
}

.toast.success .toast-icon { color: #81c784; }
.toast.error .toast-icon { color: #e57373; }
.toast.info .toast-icon { color: #64b5f6; }

@keyframes slideUp {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Modal Details */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 600px;
    max-width: 90%;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 24px 38px 3px rgba(0,0,0,0.14), 0 9px 46px 8px rgba(0,0,0,0.12), 0 11px 15px -7px rgba(0,0,0,0.2);
}

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

.modal-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-row {
    display: flex;
    border-bottom: 1px solid var(--border-divider);
    padding-bottom: 8px;
}

.detail-label {
    width: 100px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.detail-value {
    font-size: 0.88rem;
    color: var(--text-primary);
}

.detail-body-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-body-preview {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #ffffff;
    max-height: 250px;
    overflow-y: auto;
}

/* Settings Input Wrapper & Alignment */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 12px;
    color: #5f6368;
    font-size: 1rem;
    pointer-events: none;
    z-index: 2;
}

.input-wrapper input {
    width: 100%;
    padding: 10px 14px;
    padding-left: 38px; /* space for icon */
    padding-right: 38px; /* space for toggle button */
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #202124;
    background: #ffffff;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-wrapper input:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.input-wrapper .toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #5f6368;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.input-wrapper .toggle-password:hover {
    color: #202124;
}
