:root {
    --navy: #0b1f3a;
    --navy-dark: #071527;
    --gold: #b8860b;
    --gold-light: #f0c419;
    --grey-light: #f4f5f7;
    --grey: #6b7280;
    --white: #ffffff;
    --danger: #b3261e;
    --success: #1e6b3a;
    --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background: var(--grey-light); color: #1a1a2e; }
a { color: var(--navy); }

/* ---- Auth pages ---- */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%); }
.auth-card { background: var(--white); padding: 40px; border-radius: var(--radius); width: 360px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.auth-brand { text-align: center; margin-bottom: 20px; }
.brand-title { font-size: 22px; font-weight: 800; color: var(--navy); letter-spacing: 1px; }
.brand-subtitle { color: var(--gold); font-style: italic; font-size: 12px; }
.auth-card h1 { font-size: 18px; margin-top: 0; }
.auth-card label { display: block; margin-bottom: 14px; font-size: 13px; color: var(--grey); }
.auth-card input { width: 100%; padding: 10px; margin-top: 4px; border: 1px solid #d8dbe0; border-radius: 6px; font-size: 14px; }
.muted { color: var(--grey); font-size: 12px; }

/* ---- Buttons ---- */
.btn { display: inline-block; padding: 10px 18px; border-radius: 6px; font-size: 14px; font-weight: 600; text-decoration: none; border: none; cursor: pointer; }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-dark); }
.btn-outline { background: var(--white); color: var(--navy); border: 1px solid var(--navy); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ---- Admin layout ---- */
.admin-sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 220px; background: var(--navy); color: var(--white); padding: 20px 0; }
.sidebar-brand { padding: 0 20px 20px; font-weight: 800; letter-spacing: 1px; border-bottom: 1px solid rgba(255,255,255,.15); }
.sidebar-brand span { display: block; color: var(--gold-light); font-size: 12px; font-weight: 400; }
.admin-sidebar nav { display: flex; flex-direction: column; margin-top: 16px; }
.admin-sidebar nav a { color: rgba(255,255,255,.85); text-decoration: none; padding: 12px 20px; font-size: 14px; }
.admin-sidebar nav a:hover { background: rgba(255,255,255,.08); }
.admin-main { margin-left: 220px; padding: 24px 32px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.admin-topbar h1 { font-size: 22px; margin: 0; }

/* ---- Client layout ---- */
.client-topbar { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; background: var(--navy); color: var(--white); }
.client-topbar a { color: var(--white); }
.client-main { max-width: 900px; margin: 0 auto; padding: 24px; }

/* ---- Cards / panels ---- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 24px; }
.kpi-card { background: var(--white); border-radius: var(--radius); padding: 16px; box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.kpi-label { display: block; font-size: 12px; color: var(--grey); margin-bottom: 6px; }
.kpi-value { display: block; font-size: 20px; font-weight: 700; color: var(--navy); }
.panel { background: var(--white); border-radius: var(--radius); padding: 20px; margin-bottom: 22px; box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.panel-header { display: flex; justify-content: space-between; align-items: center; }

/* ---- Tables ---- */
.data-grid, .data-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.data-grid th, .data-grid td, .data-table th, .data-table td { padding: 10px; border-bottom: 1px solid #eee; text-align: left; font-size: 13px; }
.data-grid th { color: var(--grey); font-weight: 600; text-transform: uppercase; font-size: 11px; }
.empty-row { text-align: center; color: var(--grey); padding: 20px; }
.badge { background: var(--grey-light); border: 1px solid #ddd; border-radius: 12px; padding: 3px 10px; font-size: 11px; }

/* ---- Forms ---- */
.form-panel label { display: block; margin-bottom: 12px; font-size: 13px; color: var(--grey); }
.form-panel input, .form-panel select, .form-panel textarea { width: 100%; padding: 9px; margin-top: 4px; border: 1px solid #d8dbe0; border-radius: 6px; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 16px; }
.inline-form { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.action-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.checkbox-line { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }
.hint { font-size: 12px; color: var(--grey); }
.note-list { list-style: none; padding: 0; }
.note-list li { padding: 8px 0; border-bottom: 1px solid #eee; font-size: 13px; }

/* ---- Alerts ---- */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 13px; }
.alert-error { background: #fdecea; color: var(--danger); border: 1px solid #f5c2c0; }
.alert-success { background: #e9f7ef; color: var(--success); border: 1px solid #b9e3c6; }

/* ---- Agreement preview ---- */
.agreement-preview { background: var(--white); border-radius: var(--radius); padding: 24px; max-height: 500px; overflow-y: auto; box-shadow: 0 2px 6px rgba(0,0,0,.06); margin-bottom: 20px; font-size: 14px; }
.agreement-preview .doc-title { text-align: center; font-weight: 700; color: var(--navy); }
.disclaimer-box { border: 1px solid var(--gold); background: #fdf6e3; padding: 10px; font-size: 12px; margin-top: 14px; }
.sign-panel .sig-tabs { display: flex; gap: 20px; margin: 14px 0; font-size: 13px; }
