/* ============================================
   Cabinet Rachel Tubiana — Design System v3
   Fintech moderne : slate + vert sapin, motion, micro-shadows
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Surfaces */
    --bg: #FAFAFA;
    --bg-card: #FFFFFF;
    --bg-subtle: #F4F4F5;
    --bg-hover: #F8FAFC;

    /* Text */
    --text: #0F172A;
    --text-muted: #64748B;
    --text-subtle: #94A3B8;

    /* Brand */
    --accent: #0E5A3E;
    --accent-hover: #0A4A33;
    --accent-light: #ECFDF5;
    --accent-border: #6EE7B7;

    /* Indigo (gradients/highlights) */
    --indigo: #6366F1;
    --indigo-light: #EEF2FF;

    /* Borders */
    --border: #E2E8F0;
    --border-strong: #CBD5E1;

    /* Semantic */
    --success: #10B981;
    --success-bg: #ECFDF5;
    --danger: #EF4444;
    --danger-bg: #FEF2F2;
    --warning: #F59E0B;
    --warning-bg: #FFFBEB;
    --info: #3B82F6;
    --info-bg: #EFF6FF;

    /* Shadows : multi-layer pour effet realiste */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08), 0 4px 8px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 24px 48px rgba(15, 23, 42, 0.12), 0 8px 16px rgba(15, 23, 42, 0.06);
    --shadow-accent: 0 8px 24px rgba(14, 90, 62, 0.18);

    /* Radius */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-2xl: 28px;

    /* Fonts */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    /* Transitions */
    --t-fast: 0.12s ease;
    --t-base: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --t-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    font-size: 14.5px;
    font-feature-settings: 'cv11', 'ss01', 'ss03';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--t-fast);
}

a:hover { color: var(--accent-hover); }

h1, h2, h3, h4 {
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.18;
    font-weight: 700;
}

h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: 1.2rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }

.mono { font-family: var(--font-mono); font-size: 0.92em; }
.text-muted { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }

/* ============================================
   Topbar
   ============================================ */
.topbar {
    background: rgba(250, 250, 250, 0.85);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 12px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-weight: 600;
    transition: opacity var(--t-fast);
}

.brand:hover { color: var(--text); opacity: 0.8; }

.brand-logo {
    height: 52px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    display: block;
}

.brand-mark {
    background: var(--text);
    color: var(--bg-card);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    font-family: var(--font-mono);
}

.brand-name { display: none; }

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar-nav a, .nav-link {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--t-fast);
}

.topbar-nav a:hover, .nav-link:hover { color: var(--text); }

.nav-link-cta {
    background: var(--text);
    color: var(--bg-card) !important;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-weight: 500;
    transition: all var(--t-base);
}

.nav-link-cta:hover {
    background: var(--accent);
    color: var(--bg-card) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-accent);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 11px 5px 11px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    transition: all var(--t-base);
}

.nav-user:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}

.nav-user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}

.nav-user-role {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 8px;
    border-radius: 100px;
    font-weight: 700;
}

.role-admin { background: var(--text); color: var(--bg-card); }
.role-collaborateur { background: var(--indigo-light); color: var(--indigo); }
.role-client { background: var(--accent-light); color: var(--accent); }

/* ============================================
   Layout
   ============================================ */
.container {
    flex: 1;
    max-width: 1320px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 32px 80px;
}

/* ============================================
   Hero
   ============================================ */
.hero {
    text-align: center;
    padding: 72px 0 56px;
    max-width: 760px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.08;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.hero-subtitle, .lead {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.55;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--t-base);
    font-family: inherit;
    line-height: 1.2;
    white-space: nowrap;
    user-select: none;
}

.btn:active:not(:disabled) { transform: scale(0.98); }

.btn-primary {
    background: var(--text);
    color: var(--bg-card);
    border-color: var(--text);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent);
    color: var(--bg-card);
    border-color: var(--accent);
    box-shadow: var(--shadow-accent);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--border-strong);
    color: var(--text);
    box-shadow: var(--shadow-xs);
}

.btn-danger {
    background: var(--bg-card);
    color: var(--danger);
    border-color: var(--border);
}

.btn-danger:hover:not(:disabled) {
    background: var(--danger-bg);
    border-color: var(--danger);
}

.btn-block { width: 100%; }

.btn-ai {
    background: linear-gradient(135deg, #0E5A3E 0%, #6366F1 100%);
    color: white;
    border: none;
}

.btn-ai:hover:not(:disabled) {
    filter: brightness(1.1);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.btn-ai:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-icon {
    padding: 7px;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-muted);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--t-fast);
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.btn-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Mini buttons */
.btn-mini {
    display: inline-block;
    padding: 5px 11px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 500;
    transition: all var(--t-fast);
    user-select: none;
}

.btn-mini:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--border-strong);
    color: var(--text);
    transform: translateY(-0.5px);
}

.btn-mini-disabled {
    background: transparent;
    color: var(--text-subtle);
    border-color: transparent;
    cursor: not-allowed;
}

.btn-mini-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text-muted);
}

.btn-mini-ghost:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.btn-mini-danger {
    background: transparent;
    border-color: var(--border);
    color: var(--danger);
}

.btn-mini-danger:hover {
    background: var(--danger-bg);
    border-color: var(--danger);
    color: var(--danger);
}

/* ============================================
   Cards
   ============================================ */
.card, .form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--t-base);
    box-shadow: var(--shadow-xs);
}

.card:hover { box-shadow: var(--shadow-sm); }

.form-card { padding: 24px 28px; }

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 16px;
    flex: 1;
    min-width: 0;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text);
}

.form-row {
    display: flex;
    gap: 14px;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text);
}

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

input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], input[type="number"], input[type="date"],
input[type="search"], input[type="url"], input[type="file"],
select, textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.92rem;
    background: var(--bg-card);
    color: var(--text);
    font-family: inherit;
    transition: all var(--t-fast);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

input::placeholder, textarea::placeholder { color: var(--text-subtle); }

textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

input[type="file"] { padding: 7px; cursor: pointer; }
input[type="checkbox"], input[type="radio"] {
    width: auto;
    cursor: pointer;
    accent-color: var(--accent);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%2364748B' stroke-width='1.5' d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

input:disabled, select:disabled, textarea:disabled {
    background: var(--bg-subtle);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* ============================================
   Flash messages
   ============================================ */
.flash-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.flash {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    border: 1px solid;
    line-height: 1.5;
    animation: flashIn 0.3s ease;
}

@keyframes flashIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.flash-success {
    background: var(--success-bg);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.25);
}

.flash-error, .flash-danger {
    background: var(--danger-bg);
    color: #B91C1C;
    border-color: rgba(239, 68, 68, 0.25);
}

.flash-warning {
    background: var(--warning-bg);
    color: #B45309;
    border-color: rgba(245, 158, 11, 0.25);
}

.flash-info {
    background: var(--info-bg);
    color: #1D4ED8;
    border-color: rgba(59, 130, 246, 0.25);
}

/* ============================================
   Dashboard headers
   ============================================ */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.dash-header h1 { font-size: 1.85rem; }

.dash-greeting {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-top: 4px;
}

/* ============================================
   Action cards (dashboard)
   ============================================ */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.action-card {
    display: block;
    padding: 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text);
    transition: all var(--t-base);
    box-shadow: var(--shadow-xs);
}

.action-card:hover {
    border-color: var(--accent);
    color: var(--text);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action-icon {
    font-size: 1.5rem;
    margin-bottom: 10px;
    display: block;
    line-height: 1;
}

.action-card h3 {
    font-size: 0.98rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
}

.action-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.45;
}

/* ============================================
   Stats / KPIs
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}

.clients-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.stat-mini {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: var(--shadow-xs);
    transition: all var(--t-base);
}

.stat-mini:hover {
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.stat-mini-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-mini-value {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    font-feature-settings: 'tnum';
}

/* legacy stat-card alias */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow-xs);
}
.stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 4px;
}
.stat-value {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}
.stat-card-soon { opacity: 0.55; }
.stat-note { font-size: 0.74rem; color: var(--text-subtle); margin-top: 4px; }

.role-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ============================================
   Empty state
   ============================================ */
.empty-state {
    text-align: center;
    padding: 64px 32px;
    background: var(--bg-card);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
}

.empty-icon {
    font-size: 2.4rem;
    margin-bottom: 12px;
    opacity: 0.7;
}

.empty-state h2 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

/* ============================================
   Info banner
   ============================================ */
.info-banner {
    background: var(--accent-light);
    border: 1px solid rgba(14, 90, 62, 0.18);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin: 16px 0;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.5;
}

.info-banner strong { color: var(--accent); }

.info-banner-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* ============================================
   Tables
   ============================================ */
.clients-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.clients-search-wrap {
    flex: 1;
    min-width: 240px;
    max-width: 480px;
}

.clients-search { width: 100%; }

.clients-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.clients-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.clients-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.clients-table thead {
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
}

.clients-table th {
    text-align: left;
    padding: 11px 14px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.clients-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}

.clients-table tr:last-child td { border-bottom: none; }

.clients-table tbody tr {
    transition: background var(--t-fast);
}

.clients-table tbody tr:hover {
    background: var(--bg-hover);
}

.clients-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
}

.clients-table th.num { text-align: right; }

.clients-table .date {
    color: var(--text-muted);
    font-size: 0.83rem;
}

.client-name-pending {
    color: var(--text-subtle);
    font-style: italic;
}

.client-row-anon { background: var(--bg-subtle); }

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 7px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--t-fast);
    user-select: none;
}

.pagination a:hover {
    background: var(--bg-hover);
    border-color: var(--border-strong);
}

.pagination .active {
    background: var(--text);
    color: var(--bg-card);
    border-color: var(--text);
}

.pagination .disabled {
    color: var(--text-subtle);
    cursor: not-allowed;
}

/* ============================================
   Badges
   ============================================ */
.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--bg-subtle);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-success { background: var(--success-bg); color: #047857; }
.badge-danger { background: var(--danger-bg); color: #B91C1C; }
.badge-warning { background: var(--warning-bg); color: #B45309; }
.badge-info { background: var(--info-bg); color: #1D4ED8; }
.badge-accent { background: var(--accent-light); color: var(--accent); }

/* ============================================
   Footer
   ============================================ */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 24px 32px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg);
}

.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }

/* ============================================
   Auth pages
   ============================================ */
.auth-container {
    max-width: 440px;
    margin: 60px auto;
    padding: 0 24px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    box-shadow: var(--shadow-md);
    max-width: 440px;
    margin: 40px auto;
}

.auth-card h1 {
    font-size: 1.7rem;
    text-align: center;
    margin-bottom: 8px;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 28px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ============================================
   Sections
   ============================================ */
section { margin-bottom: 32px; }

/* ============================================
   Features (landing)
   ============================================ */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 56px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all var(--t-base);
    box-shadow: var(--shadow-xs);
}

.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

/* ============================================
   Quill editor
   ============================================ */
.ql-toolbar {
    border: 1px solid var(--border) !important;
    border-bottom: none !important;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--bg-subtle);
}

.ql-container {
    border: 1px solid var(--border) !important;
    border-radius: 0 0 var(--radius) var(--radius);
    font-family: var(--font-sans) !important;
    font-size: 0.95rem !important;
    min-height: 200px;
    background: var(--bg-card);
}

.ql-editor {
    min-height: 200px;
    padding: 14px 18px;
    line-height: 1.55;
}

.ql-editor.ql-blank::before {
    color: var(--text-subtle);
    font-style: normal;
    font-family: var(--font-sans);
}

.ql-snow .ql-stroke { stroke: var(--text-muted); }
.ql-snow .ql-fill { fill: var(--text-muted); }
.ql-snow .ql-picker { color: var(--text-muted); }

.ql-toolbar button:hover .ql-stroke,
.ql-toolbar button.ql-active .ql-stroke {
    stroke: var(--accent);
}
.ql-toolbar button:hover .ql-fill,
.ql-toolbar button.ql-active .ql-fill {
    fill: var(--accent);
}

/* ============================================
   Mobile
   ============================================ */
@media (max-width: 768px) {
    .topbar-inner {
        padding: 10px 18px;
        flex-wrap: wrap;
        gap: 12px;
        min-height: 60px;
    }

    .brand-logo { height: 42px; max-width: 200px; }

    .topbar-nav { gap: 12px; }

    .container { padding: 24px 18px 60px; }

    .dash-header h1 { font-size: 1.55rem; }

    .hero h1 { font-size: 2.1rem; }

    .form-row { flex-direction: column; gap: 0; }

    .clients-table { font-size: 0.85rem; }

    .clients-table th, .clients-table td {
        padding: 10px 11px;
    }
}

@media (max-width: 480px) {
    .nav-user-name { display: none; }
}
