/* =============================================
   GREEN WASH CRM – Estilos principales
   Mobile-first, diseño moderno
   ============================================= */

:root {
    --green-50:  #f0fdf4;
    --green-100: #dcfce7;
    --green-200: #bbf7d0;
    --green-400: #4ade80;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --green-700: #15803d;
    --green-800: #166534;
    --green-900: #14532d;

    --gray-50:  #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    --sidebar-width: 280px;
    --topbar-height: 60px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,.10), 0 4px 6px rgba(0,0,0,.05);

    --transition: 0.25s cubic-bezier(.4,0,.2,1);
}

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

html { font-size: 16px; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ── LAYOUT ─────────────────────────────── */
.app-wrapper { display: flex; flex-direction: column; min-height: 100vh; }

/* ── TOPBAR ──────────────────────────────── */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-height);
    background: var(--green-700);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.hamburger {
    background: none; border: none; cursor: pointer;
    display: flex; flex-direction: column; gap: 5px; padding: 6px;
}
.hamburger span {
    display: block; width: 22px; height: 2px;
    background: #fff; border-radius: 2px;
    transition: var(--transition);
}

.topbar-brand {
    display: flex; align-items: center; gap: 8px;
    flex: 1;
}
.brand-icon { font-size: 1.3rem; }
.brand-name { color: #fff; font-size: 1.1rem; font-weight: 700; letter-spacing: -0.3px; }

.topbar-user {
    display: flex; align-items: center; gap: 8px;
}
.user-avatar {
    width: 34px; height: 34px;
    background: var(--green-500); color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 0.85rem;
}
.user-name-short { color: #fff; font-size: 0.85rem; display: none; }

/* ── SIDEBAR ──────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--gray-900);
    transform: translateX(-100%);
    transition: transform var(--transition);
    z-index: 200;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

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

.sidebar-header {
    display: flex; align-items: center; gap: 10px;
    padding: 18px 16px;
    background: var(--green-800);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    min-height: var(--topbar-height);
}
.sidebar-close {
    margin-left: auto;
    background: none; border: none; color: #fff;
    font-size: 1rem; cursor: pointer; padding: 4px 8px;
}

.sidebar-user {
    display: flex; align-items: center; gap: 12px;
    padding: 16px;
    background: rgba(255,255,255,.04);
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.user-avatar-lg {
    width: 42px; height: 42px;
    background: var(--green-600); color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1rem; flex-shrink: 0;
}
.user-fullname { color: #fff; font-size: 0.9rem; font-weight: 600; }
.user-role { color: var(--gray-400); font-size: 0.75rem; margin-top: 2px; }

/* NAV LIST */
.nav-list { list-style: none; padding: 8px 0; flex: 1; }

.nav-section-label {
    padding: 14px 16px 4px;
    color: var(--gray-500);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-item a {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 16px;
    color: var(--gray-300);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 0;
    transition: background var(--transition), color var(--transition);
    position: relative;
}
.nav-item a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active a {
    background: var(--green-700);
    color: #fff;
}
.nav-item.active a::before {
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px; background: var(--green-400);
    border-radius: 0 2px 2px 0;
}

.nav-icon { font-size: 1rem; width: 20px; text-align: center; }

.badge-soon {
    margin-left: auto;
    background: var(--gray-700); color: var(--gray-400);
    font-size: 0.65rem; padding: 2px 7px; border-radius: 99px;
    font-weight: 600;
}

.nav-disabled a { opacity: .5; cursor: not-allowed; pointer-events: none; }

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.btn-logout {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    background: rgba(255,255,255,.06);
    color: var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    transition: background var(--transition);
}
.btn-logout:hover { background: rgba(239,68,68,.15); color: #fca5a5; }

/* OVERLAY */
.overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 150;
    backdrop-filter: blur(1px);
}
.overlay.visible { display: block; }

/* ── MAIN CONTENT ──────────────────────────── */
.main-content {
    margin-top: var(--topbar-height);
    padding: 20px 16px 32px;
    flex: 1;
    min-height: calc(100vh - var(--topbar-height));
}

/* ── PAGE HEADER ──────────────────────────── */
.page-header {
    margin-bottom: 20px;
}
.page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex; align-items: center; gap: 8px;
}
.page-subtitle {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-top: 2px;
}

/* ── CARDS ──────────────────────────── */
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.card-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-100);
    display: flex; align-items: center; gap: 8px;
}
.card-header h3 { font-size: 0.95rem; font-weight: 600; }
.card-body { padding: 16px; }

/* ── STATS GRID ──────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    display: flex; flex-direction: column;
    gap: 4px;
}
.stat-card .stat-icon { font-size: 1.5rem; margin-bottom: 4px; }
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; color: var(--gray-900); }
.stat-card .stat-label { font-size: 0.75rem; color: var(--gray-500); font-weight: 500; }
.stat-card.green { border-left: 3px solid var(--green-500); }
.stat-card.blue  { border-left: 3px solid #3b82f6; }
.stat-card.orange{ border-left: 3px solid #f97316; }
.stat-card.purple{ border-left: 3px solid #a855f7; }

/* ── EXPEDIENTE CARDS ──────────────────────── */
.exp-list { display: flex; flex-direction: column; gap: 10px; }

.exp-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 16px;
    display: flex; flex-direction: column; gap: 6px;
    border-left: 4px solid var(--green-400);
    transition: box-shadow var(--transition), transform var(--transition);
    cursor: pointer;
}
.exp-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.exp-card.internacional { border-left-color: #3b82f6; }
.exp-card.nacional      { border-left-color: var(--green-500); }

.exp-card-header {
    display: flex; justify-content: space-between; align-items: flex-start;
}
.exp-name { font-weight: 600; font-size: 0.95rem; color: var(--gray-900); }
.exp-date { font-size: 0.72rem; color: var(--gray-400); white-space: nowrap; }

.exp-card-meta {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-top: 2px;
}
.badge {
    display: inline-flex; align-items: center;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge-green  { background: var(--green-100); color: var(--green-800); }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-gray   { background: var(--gray-100); color: var(--gray-600); }
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-purple { background: #f3e8ff; color: #6b21a8; }

.exp-comment {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 2px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.exp-contact {
    display: flex; flex-wrap: wrap; gap: 10px;
    font-size: 0.78rem; color: var(--gray-600);
}
.exp-contact span { display: flex; align-items: center; gap: 4px; }

/* ── SEARCH & FILTER BAR ──────────────────── */
.search-bar {
    display: flex; gap: 8px;
    margin-bottom: 16px;
}
.search-input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    background: #fff;
    transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--green-500); }

.filter-btn {
    padding: 10px 14px;
    background: var(--green-600); color: #fff;
    border: none; border-radius: var(--radius-sm);
    cursor: pointer; font-size: 0.9rem;
    display: flex; align-items: center; gap: 6px;
    font-family: inherit; font-weight: 500;
    transition: background var(--transition);
    white-space: nowrap;
}
.filter-btn:hover { background: var(--green-700); }

.search-btn {
    padding: 10px 14px;
    background: var(--green-600); color: #fff;
    border: none; border-radius: var(--radius-sm);
    cursor: pointer; font-size: 0.9rem;
    font-family: inherit; font-weight: 500;
    transition: background var(--transition);
    white-space: nowrap;
}
.search-btn:hover { background: var(--green-700); }

/* FILTER PANEL */
.filter-panel {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 16px;
    display: none;
}
.filter-panel.open { display: block; }
.filter-panel .filter-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.filter-group label {
    display: block; font-size: 0.78rem; font-weight: 600;
    color: var(--gray-600); margin-bottom: 4px;
}
.filter-group select, .filter-group input {
    width: 100%; padding: 8px 10px;
    border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
    font-size: 0.85rem; font-family: inherit; outline: none;
    background: #fff;
    transition: border-color var(--transition);
}
.filter-group select:focus, .filter-group input:focus {
    border-color: var(--green-500);
}
.filter-actions { margin-top: 12px; display: flex; gap: 8px; justify-content: flex-end; }
.btn-sm {
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem; font-weight: 600;
    cursor: pointer; border: none; font-family: inherit;
    transition: background var(--transition);
}
.btn-primary { background: var(--green-600); color: #fff; }
.btn-primary:hover { background: var(--green-700); }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-200); }

/* ── TABS ──────────────────────────────────── */
.tabs {
    display: flex; gap: 4px;
    background: var(--gray-100);
    padding: 4px; border-radius: var(--radius);
    margin-bottom: 16px;
}
.tab-btn {
    flex: 1; padding: 8px 12px;
    background: none; border: none;
    border-radius: 8px;
    font-size: 0.82rem; font-weight: 600;
    cursor: pointer; font-family: inherit;
    color: var(--gray-500);
    transition: background var(--transition), color var(--transition);
}
.tab-btn.active { background: #fff; color: var(--green-700); box-shadow: var(--shadow); }

/* ── LOAD MORE ─────────────────────────────── */
.load-more-wrap { text-align: center; margin-top: 20px; }
.btn-load-more {
    padding: 12px 28px;
    background: #fff;
    border: 1.5px solid var(--green-500);
    color: var(--green-700);
    border-radius: var(--radius);
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; font-family: inherit;
    display: inline-flex; align-items: center; gap: 8px;
    transition: background var(--transition), color var(--transition);
}
.btn-load-more:hover { background: var(--green-50); }
.btn-load-more:disabled { opacity: .5; cursor: not-allowed; }

/* ── EMPTY STATE ─────────────────────────── */
.empty-state {
    text-align: center; padding: 48px 20px;
    color: var(--gray-400);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: 0.9rem; }

/* ── TABLA (instituciones) ─────────────────── */
.table-scroll { overflow-x: auto; }
.data-table {
    width: 100%; border-collapse: collapse;
    font-size: 0.82rem;
}
.data-table th {
    background: var(--gray-50);
    padding: 10px 12px;
    text-align: left; font-weight: 600;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}
.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}
.data-table tr:hover td { background: var(--gray-50); }

/* ── DOCUMENTOS ─────────────────────────── */
.doc-section { margin-bottom: 24px; }
.doc-section-title {
    font-size: 1rem; font-weight: 700;
    margin-bottom: 12px; padding-bottom: 8px;
    border-bottom: 2px solid var(--green-500);
    display: flex; align-items: center; gap: 8px;
    color: var(--gray-800);
}

.doc-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.doc-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 16px;
    display: flex; align-items: center; gap: 12px;
}
.doc-icon { font-size: 2rem; flex-shrink: 0; }
.doc-info { flex: 1; min-width: 0; }
.doc-title { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-meta { font-size: 0.75rem; color: var(--gray-400); margin-top: 2px; }
.doc-actions { display: flex; gap: 6px; flex-shrink: 0; }
.doc-btn {
    padding: 6px 10px;
    border: none; border-radius: var(--radius-sm);
    cursor: pointer; font-size: 0.78rem; font-weight: 600;
    font-family: inherit;
    transition: background var(--transition);
    display: flex; align-items: center; gap: 4px;
}
.doc-btn-view { background: var(--green-100); color: var(--green-800); }
.doc-btn-view:hover { background: var(--green-200); }
.doc-btn-download { background: var(--gray-100); color: var(--gray-700); }
.doc-btn-download:hover { background: var(--gray-200); }

/* ── LOGIN PAGE ─────────────────────────── */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--green-800) 0%, var(--green-600) 50%, var(--green-700) 100%);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 36px 28px;
    width: 100%; max-width: 380px;
    box-shadow: var(--shadow-lg);
}
.login-logo {
    text-align: center; margin-bottom: 28px;
}
.login-logo-icon { font-size: 3rem; display: block; }
.login-logo-title {
    font-size: 1.4rem; font-weight: 800;
    color: var(--green-700); margin-top: 8px; display: block;
}
.login-logo-sub { color: var(--gray-400); font-size: 0.82rem; }
.login-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 20px; color: var(--gray-800); }

.form-group { margin-bottom: 16px; }
.form-group label {
    display: block; font-size: 0.82rem; font-weight: 600;
    color: var(--gray-600); margin-bottom: 6px;
}
.form-input {
    width: 100%; padding: 12px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.95rem; font-family: inherit;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus {
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(34,197,94,.15);
}
.btn-full {
    width: 100%; padding: 13px;
    background: var(--green-600); color: #fff;
    border: none; border-radius: var(--radius-sm);
    font-size: 1rem; font-weight: 700;
    cursor: pointer; font-family: inherit;
    transition: background var(--transition), transform var(--transition);
    margin-top: 6px;
}
.btn-full:hover { background: var(--green-700); transform: translateY(-1px); }
.btn-full:active { transform: translateY(0); }

.alert {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem; margin-bottom: 14px;
}
.alert-error { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.alert-success { background: var(--green-100); color: var(--green-800); }

/* ── MODAL ──────────────────────────────── */
.modal-backdrop {
    display: flex;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 300;
    padding: 20px;
    overflow-y: auto;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity .2s;
}
.modal-backdrop.open,
.modal-backdrop[style*="flex"] {
    opacity: 1;
    pointer-events: all;
    visibility: visible;
}
.modal {
    background: #fff;
    border-radius: var(--radius);
    width: 100%; max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    margin: auto;
}
.modal-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--gray-100);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-weight: 700; font-size: 1rem; }
.modal-close {
    background: none; border: none; cursor: pointer;
    font-size: 1.2rem; color: var(--gray-400);
    padding: 4px 8px; border-radius: 6px;
    transition: background var(--transition);
}
.modal-close:hover { background: var(--gray-100); }
.modal-body { padding: 18px; }
.modal-row {
    display: flex; flex-direction: column; gap: 3px;
    padding: 8px 0; border-bottom: 1px solid var(--gray-100);
}
.modal-row:last-child { border-bottom: none; }
.modal-label { font-size: 0.75rem; font-weight: 600; color: var(--gray-500); text-transform: uppercase; }
.modal-value { font-size: 0.9rem; color: var(--gray-800); }

/* ── RESPONSIVE ─────────────────────────── */
@media (min-width: 480px) {
    .doc-grid { grid-template-columns: repeat(2, 1fr); }
    .user-name-short { display: block; }
}

@media (min-width: 640px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .filter-panel .filter-row { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
    .main-content { padding: 24px 28px 40px; }
    .page-title { font-size: 1.7rem; }
}

/* ── UTILIDADES ──────────────────────────── */
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.text-center { text-align: center; }
.hidden { display: none; }
.spinner {
    display: inline-block; width: 20px; height: 20px;
    border: 2px solid var(--gray-200);
    border-top-color: var(--green-600);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Password toggle & Remember me ──────────────────────────── */
.password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.password-wrap .form-input {
    padding-right: 44px;
    width: 100%;
}
.pwd-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color .2s;
}
.pwd-toggle:hover { color: var(--green-600); }
.remember-row {
    display: flex;
    align-items: center;
    margin: 12px 0 4px;
}
.remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-600);
    user-select: none;
}
.remember-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--green-600);
    cursor: pointer;
}

/* ── Email doc buttons ───────────────────────────────────────── */
.email-doc-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.btn-email-doc {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    transition: all .18s;
    white-space: nowrap;
}
.btn-email-1doc { background: #dbeafe; color: #1d4ed8; }
.btn-email-1doc:hover { background: #bfdbfe; }
.btn-email-2doc { background: #d1fae5; color: #065f46; }
.btn-email-2doc:hover { background: #a7f3d0; }
.btn-email-pre  { background: #fef3c7; color: #92400e; }
.btn-email-pre:hover  { background: #fde68a; }
.btn-email-cont { background: #ede9fe; color: #5b21b6; }
.btn-email-cont:hover { background: #ddd6fe; }

/* ── Change estado inline ────────────────────────────────────── */
.estado-select-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.estado-select-wrap select {
    font-size: 0.75rem;
    padding: 4px 8px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: white;
    color: var(--gray-700);
    cursor: pointer;
}
.btn-change-estado {
    font-size: 0.72rem;
    padding: 4px 10px;
    background: var(--green-600);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background .18s;
}
.btn-change-estado:hover { background: var(--green-700); }

/* ── Email modal ─────────────────────────────────────────────── */
.email-preview-modal .modal { max-width: 640px; }
.email-preview-body { padding: 20px; max-height: 420px; overflow-y: auto; }
.email-preview-body iframe { width: 100%; height: 360px; border: 1px solid var(--gray-200); border-radius: 8px; }
.email-meta { display: flex; flex-direction: column; gap: 6px; padding: 16px 20px; border-bottom: 1px solid var(--gray-100); }
.email-meta-row { display: flex; gap: 8px; font-size: 0.8rem; }
.email-meta-label { font-weight: 600; color: var(--gray-500); min-width: 60px; }
.email-meta-val { color: var(--gray-800); }
.email-modal-footer { padding: 14px 20px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--gray-100); }
.btn-send-email { background: var(--green-600); color: white; padding: 8px 20px; border-radius: 10px; border: none; font-weight: 600; cursor: pointer; font-size: 0.875rem; transition: background .18s; }
.btn-send-email:hover { background: var(--green-700); }
.btn-cancel-email { background: var(--gray-100); color: var(--gray-700); padding: 8px 20px; border-radius: 10px; border: none; font-weight: 600; cursor: pointer; font-size: 0.875rem; }
