/* ========================================
   Sigilair — Application Styles
   Design: Navy + Gold — Trust & Premium
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800;900&family=Sora:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --navy: #1a2332;
    --navy-light: #243447;
    --navy-dark: #111a26;
    --gold: #c9963b;
    --gold-light: #d4a94e;
    --gold-dim: rgba(201,150,59,0.12);
    --cream: #f8f7f5;
    --cream-dark: #f0ede8;
    --text: #2c3e50;
    --text-secondary: #5a6b7d;
    --text-light: #8d99a8;
    --white: #ffffff;
    --success: #27ae60;
    --success-bg: #e8f5e9;
    --warning: #e67e22;
    --warning-bg: #fff8e1;
    --error: #c0392b;
    --error-bg: #fdf0f0;
    --border: #e0ddd8;
    --border-light: #eceae6;
    --shadow-sm: 0 1px 4px rgba(26,35,50,0.06);
    --shadow: 0 2px 12px rgba(26,35,50,0.08);
    --shadow-lg: 0 8px 32px rgba(26,35,50,0.12);
    --radius: 10px;
    --radius-lg: 16px;
    --transition: 0.2s ease;
    --sidebar-width: 260px;
    --header-height: 64px;
    --font-display: 'Playfair Display', serif;
    --font-body: 'Sora', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* ---- RESET ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 15px; }
body {
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }
img { max-width: 100%; }

/* ---- AUTH PAGES ---- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
    padding: 24px;
}
.auth-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(201,150,59,0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 80%, rgba(201,150,59,0.05) 0%, transparent 50%);
    pointer-events: none;
}
.auth-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 48px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}
.auth-card .logo {
    font-family: var(--font-display);
    font-size: 32px;
    color: var(--navy);
    margin-bottom: 4px;
}
.auth-card .logo span { color: var(--gold); }
.auth-card .subtitle {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 32px;
}

/* ---- FORM ELEMENTS ---- */
.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: block;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}
.form-row {
    display: flex;
    gap: 12px;
}
.form-row .form-group { flex: 1; }
.form-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-dim);
}
.form-input::placeholder { color: var(--text-light); }
textarea.form-input { min-height: 80px; resize: vertical; }
select.form-input { cursor: pointer; }

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
    background: var(--gold);
    color: var(--white);
}
.btn-primary:hover:not(:disabled) {
    background: var(--gold-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201,150,59,0.3);
}
.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
}
.btn-secondary:hover:not(:disabled) {
    border-color: var(--text-light);
    background: var(--cream);
}
.btn-navy {
    background: var(--navy);
    color: var(--gold);
}
.btn-navy:hover:not(:disabled) {
    background: var(--navy-light);
}
.btn-danger {
    background: transparent;
    color: var(--error);
    border: 1.5px solid rgba(192,57,43,0.3);
}
.btn-danger:hover:not(:disabled) {
    background: var(--error-bg);
}
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---- LAYOUT ---- */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ---- SIDEBAR ---- */
.sidebar {
    width: var(--sidebar-width);
    background: #010101;
    color: var(--white);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}
.sidebar-logo {
    padding: 20px 24px;
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--gold);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow: visible;
}
.sidebar-nav .nav-section {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 16px 12px 6px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    color: rgba(255,255,255,0.65);
    font-size: 14px;
    font-weight: 400;
    transition: all var(--transition);
    cursor: pointer;
    margin-bottom: 2px;
}
.nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.9);
}
.nav-item.active {
    background: rgba(201,150,59,0.15);
    color: var(--gold);
    font-weight: 500;
}
.nav-item .icon { font-size: 18px; width: 20px; text-align: center; }
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--transition);
}
.sidebar-user:hover { background: rgba(255,255,255,0.06); }
.sidebar-user .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}
.sidebar-user .name {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
}
.sidebar-user .role {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}

/* ---- MAIN CONTENT ---- */
.main-content {
    margin-left: 0;
    flex: 1;
    min-height: 100vh;
}
.page-header {
    padding: 28px 40px 0;
}
.page-header h1 {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--navy);
}
.page-header .page-desc {
    color: var(--text-light);
    margin-top: 4px;
    font-size: 14px;
}
.page-header .header-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.page-body {
    padding: 24px 40px 40px;
}

/* ---- CARDS ---- */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}
.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-header h3 {
    font-family: var(--font-display);
    font-size: 17px;
}
.card-body {
    padding: 20px 24px;
}

/* ---- STATS GRID ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 32px;
    color: var(--navy);
    margin-bottom: 2px;
}
.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
}
.stat-card.gold { border-left: 3px solid var(--gold); }
.stat-card.green { border-left: 3px solid var(--success); }
.stat-card.blue { border-left: 3px solid #3498db; }
.stat-card.orange { border-left: 3px solid var(--warning); }

/* ---- TABLE ---- */
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 16px;
    border-bottom: 1.5px solid var(--border);
}
.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    vertical-align: middle;
}
.data-table tbody tr {
    transition: background var(--transition);
}
.data-table tbody tr:hover {
    background: rgba(248,247,245,0.6);
}
.data-table .actions {
    display: flex;
    gap: 6px;
}

/* ---- STATUS BADGES ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.badge-draft { background: var(--cream-dark); color: var(--text-secondary); }
.badge-pending { background: var(--warning-bg); color: var(--warning); }
.badge-partial { background: #e3f2fd; color: #1976d2; }
.badge-completed { background: var(--success-bg); color: var(--success); }
.badge-locked { background: var(--navy); color: var(--gold); }
.badge-signed { background: var(--success-bg); color: var(--success); }
.badge-sent { background: #e3f2fd; color: #1976d2; }
.badge-declined { background: var(--error-bg); color: var(--error); }

/* ---- DROPDOWN ---- */
.dropdown-wrap { display: inline-block; position: relative; }
.dropdown-menu {
    display: none; position: absolute; right: 0; top: 100%; margin-top: 4px;
    background: var(--white); border: 1px solid var(--border-light); border-radius: 8px;
    box-shadow: var(--shadow-lg); z-index: 50; min-width: 200px; overflow: hidden;
}
.dropdown-wrap.open .dropdown-menu { display: block; }
.dropdown-item {
    padding: 10px 16px; font-size: 13px; cursor: pointer; transition: background 0.15s;
}
.dropdown-item:hover { background: var(--cream); }

/* ---- DOCUMENT A4 FORMAT ---- */
.doc-a4 {
    max-width: 794px;
    margin: 0 auto;
    padding: 60px 72px;
    line-height: 1.7;
    font-size: 14px;
    background: var(--white);
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.doc-a4 table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.doc-a4 td, .doc-a4 th { border: 1px solid var(--border); padding: 8px 12px; }
.doc-a4 th { background: var(--cream); }
.doc-a4 .page-break { page-break-after: always; height: 0; overflow: hidden; margin: 0; padding: 0; border: none; }

/* ---- EDITOR PAGE ---- */
.editor-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,247,245,0.96)),
        radial-gradient(circle at top left, rgba(201,150,59,0.08), transparent 45%);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 18px rgba(26,35,50,0.04);
}
.editor-toolbar-main {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.editor-toolbar-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.editor-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.editor-eyebrow-document {
    background: rgba(26,35,50,0.08);
    color: var(--navy);
}
.editor-eyebrow-template {
    background: var(--gold-dim);
    color: #8b651f;
}
.editor-title-caption {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.4;
}
.editor-title-shell {
    display: flex;
    align-items: center;
    min-height: 54px;
    padding: 0 16px;
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(26,35,50,0.08);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}
.editor-title-input {
    font-family: var(--font-display);
    font-size: 24px;
    border: none;
    background: transparent;
    color: var(--navy);
    flex: 1;
    min-width: 0;
    padding: 4px 0;
}
.editor-title-shell:focus-within {
    border-color: rgba(201,150,59,0.55);
    box-shadow: 0 0 0 4px rgba(201,150,59,0.12);
}
.editor-title-input:focus { outline: none; }
.editor-title-input::placeholder { color: var(--text-light); }
.editor-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.editor-actions-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(26,35,50,0.08);
    border-radius: 14px;
    background: rgba(255,255,255,0.78);
    box-shadow: 0 6px 18px rgba(26,35,50,0.04);
}
.editor-actions-group-primary {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    padding: 0;
}
.editor-action-btn {
    min-height: 40px;
    padding-left: 14px;
    padding-right: 14px;
    border-radius: 10px;
    font-weight: 600;
}
.editor-action-btn .ds-lucide {
    width: 16px;
    height: 16px;
    stroke-width: 2.1;
}
.editor-layout {
    display: flex;
    gap: 0;
    flex: 1;
    min-height: calc(100vh - 60px);
}
.editor-workspace {
    flex: 1;
    overflow-y: auto;
}
.editor-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 32px;
}

/* ---- EDITOR SIDE PANEL ---- */
.editor-panel {
    width: 280px;
    min-width: 280px;
    background: var(--white);
    border-right: 1px solid var(--border-light);
    padding: 20px 16px;
    overflow-y: auto;
    max-height: calc(100vh - 60px);
}
.editor-panel-head {
    margin-bottom: 12px;
}
.panel-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}
.editor-panel-subtitle {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.45;
}
.panel-divider {
    height: 1px;
    background: var(--border-light);
    margin: 18px 0;
}
.signer-editor-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}
.signer-editor-row:last-of-type { border-bottom: none; }
.signer-num {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 6px;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    margin-top: 4px;
}
.form-input-sm {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 6px;
}
.editor-panel-action {
    width: 100%;
    margin-top: 10px;
}
.editor-panel-action .ds-lucide {
    width: 16px;
    height: 16px;
}
.insert-blocks {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.insert-group .btn {
    margin: 2px 0;
    width: 100%;
    justify-content: flex-start;
    font-size: 12px;
    padding: 6px 10px;
}

/* ---- ACCORDION ---- */
.panel-accordion {
    border: 1px solid var(--border-light);
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
}
.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 0.06em;
    cursor: pointer;
    background: var(--cream);
    transition: background 0.15s;
    user-select: none;
}
.accordion-header:hover { background: var(--cream-dark); }
.accordion-arrow {
    transition: transform 0.2s;
    font-size: 10px;
}
.panel-accordion.open .accordion-arrow { transform: rotate(90deg); }
.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    padding: 0 10px;
}
.panel-accordion.open .accordion-body {
    max-height: 600px;
    padding: 8px 10px;
    overflow-y: auto;
}

/* TinyMCE overrides */
.tox-tinymce { border: 1px solid var(--border) !important; border-radius: var(--radius) !important; }
.tox .tox-edit-area__iframe { background: var(--white) !important; }

/* ---- MODAL ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26,35,50,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.2s ease;
}
.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 540px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.2s ease;
}
.modal-header {
    padding: 22px 28px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header h3 { font-family: var(--font-display); font-size: 20px; }
.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-light);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background var(--transition);
}
.modal-close:hover { background: var(--cream); }
.modal-body { padding: 24px 28px; }
.modal-footer {
    padding: 16px 28px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ---- SIGNER LIST ---- */
.signer-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}
.signer-row:last-child { border-bottom: none; }
.signer-row .signer-info { flex: 1; }
.signer-row .signer-email { font-size: 14px; font-weight: 500; }
.signer-row .signer-name { font-size: 12px; color: var(--text-light); }
.signer-row .remove-signer {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 4px;
}
.signer-row .remove-signer:hover { background: var(--error-bg); }

/* ---- AUDIT LOG ---- */
.audit-item {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}
.audit-item:last-child { border-bottom: none; }
.audit-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    margin-top: 6px;
    flex-shrink: 0;
}
.audit-time { color: var(--text-light); font-family: var(--font-mono); font-size: 12px; }
.audit-action { font-weight: 500; }

/* ---- BLOCKCHAIN STATUS ---- */
.blockchain-info {
    background: var(--navy);
    color: var(--white);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin: 16px 0;
}
.blockchain-info .hash {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--gold);
    word-break: break-all;
    margin-top: 8px;
    padding: 10px 14px;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
}
.blockchain-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.blockchain-status-badge.pending { background: rgba(230,126,34,0.2); color: #f39c12; }
.blockchain-status-badge.anchored { background: rgba(39,174,96,0.2); color: #2ecc71; }

/* ---- SIGNATURE PAD ---- */
.signature-pad-container {
    border: 2px dashed var(--border);
    border-radius: 8px;
    background: #fefefe;
    position: relative;
    margin-bottom: 12px;
}
.signature-pad-container canvas {
    width: 100%;
    height: 200px;
    cursor: crosshair;
    display: block;
}
.signature-preview {
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    background: #fefefe;
}
.signature-preview img { max-height: 80px; }

/* ---- TOAST ---- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    max-width: 380px;
}
.toast-success { background: var(--success); color: var(--white); }
.toast-error { background: var(--error); color: var(--white); }
.toast-info { background: var(--navy); color: var(--gold); }

/* ---- EMPTY STATE ---- */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-light);
}
.empty-state .icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-family: var(--font-display); font-size: 20px; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 14px; margin-bottom: 20px; }

/* ---- LOADING ---- */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2.5px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

/* ---- RESPONSIVE ---- */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 200;
    width: 44px;
    height: 44px;
    background: var(--navy);
    border: none;
    border-radius: 10px;
    color: var(--gold);
    font-size: 24px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

@media (max-width: 768px) {
    .mobile-toggle { display: flex; }
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .page-header, .page-body {
        padding-left: 20px;
        padding-right: 20px;
    }
    .page-header { padding-top: 72px; }
    .form-row { flex-direction: column; }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .editor-toolbar {
        align-items: stretch;
        padding: 16px;
    }
    .editor-actions {
        justify-content: flex-start;
    }
    .editor-actions-group {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .editor-title-input {
        font-size: 21px;
    }
    .editor-layout {
        flex-direction: column;
    }
    .editor-panel {
        width: 100%;
        min-width: 0;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }
    .editor-container { padding: 16px; }
}
