:root {
    --primary: #0C1B33;
    --secondary: #23324A;
    --accent: #B98552;
    --background: #F4F1EB;
    --surface: #FAF7F1;
    --surface-strong: #FFFDF9;
    --text: #0C1B33;
    --muted: #23324A;
    --border: #DED7CA;
    --card-hover: #EFE6DB;
    --alert-hover: #FFF1F1;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
    background: var(--background);
    color: var(--text);
    font-family: Tajawal, Tahoma, Arial, sans-serif;
}
a { color: var(--primary); }
.partner-header {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px clamp(18px, 4vw, 56px);
    background: var(--primary);
    color: white;
}
.partner-brand { display:flex; align-items:center; gap:12px; color:white; text-decoration:none; font-weight:800; }
.partner-brand img { width: 92px; max-height: 34px; object-fit: contain; }
.partner-header-actions { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.partner-header nav { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.partner-header nav a, .partner-header nav button { color:white; background:transparent; border:0; text-decoration:none; font:inherit; cursor:pointer; }
.partner-header nav form { margin:0; }
.partner-header .button-link { background:var(--accent); padding:10px 14px; border-radius:10px; }
.partner-home-link {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:40px;
    padding:9px 14px;
    border:1px solid rgba(255, 255, 255,.45);
    border-radius:10px;
    color:white;
    text-decoration:none;
    font-weight:800;
    white-space:nowrap;
}
.partner-home-link:hover,
.partner-home-link:focus-visible { background:rgba(255, 255, 255,.12); }
.partner-main { width:min(1160px, calc(100% - 32px)); margin:32px auto 64px; }
.auth-grid { display:grid; grid-template-columns:1.05fr .95fr; gap:32px; align-items:start; }
.auth-copy { padding:38px 10px; }
.auth-copy h1, .page-head h1, .narrow-card h1 { font-size: clamp(31px, 5vw, 43px); line-height:1.15; margin:12px 0; }
.auth-copy p, .page-head p { color:var(--muted); font-size: 16px; line-height:1.8; }
.auth-copy li { margin:10px 0; }
.eyebrow { color:var(--accent); font-weight:800; }
.card {
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:18px;
    padding:24px;
    box-shadow:0 14px 40px rgba(12, 27, 51,.07);
}
a.card {
    background:var(--surface-strong);
    transition:background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .12s ease;
}
a.card:hover {
    border-color:var(--accent);
    background:var(--card-hover);
    box-shadow:0 16px 36px rgba(12, 27, 51,.09);
    transform:translateY(-1px);
}
.narrow-card { width:min(560px, 100%); margin:60px auto; }
.form-card h2 { margin-top:0; }
.field { margin:0 0 16px; }
.field label { display:block; margin-bottom:7px; font-weight:700; }
.field input, .field select, .field textarea {
    width:100%;
    min-height:46px;
    border:1px solid #E8E1D6;
    border-radius:10px;
    padding:10px 12px;
    background:var(--surface-strong);
    color:var(--text);
    font:inherit;
}
.field input[type="checkbox"] { width:auto; min-height:auto; }
.field-error, .form-errors { color:#A13B3B; margin-top:6px; }
.muted { color:var(--muted); }
.primary, .primary-link {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:0;
    border-radius:11px;
    background:var(--primary);
    color:white;
    padding:12px 18px;
    font:inherit;
    font-weight:800;
    text-decoration:none;
    cursor:pointer;
}
.auth-switch { margin-bottom:0; }
.page-head { display:flex; justify-content:space-between; align-items:center; gap:24px; margin-bottom:24px; }
.stats { display:grid; grid-template-columns:repeat(3, 1fr); gap:16px; margin-bottom:24px; }
.stats article { background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:20px; }
.stats span { display:block; color:var(--muted); font-size: 13px; font-weight:700; }
.stats strong { display:block; font-size: clamp(30px, 4vw, 38px); margin-top:8px; }
.card-head { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse:collapse; }
th, td { padding:14px 10px; border-bottom:1px solid var(--border); text-align:right; white-space:nowrap; }
th { font-size: 13px; }
td { font-size: 14px; }
.status { display:inline-flex; padding:6px 10px; border-radius:999px; background:#EFE6DB; }
.status.active { background:#EEF8F1; color:#1F6B3B; }
.status.pending_review, .status.awaiting_cafe, .status.needs_info { background:#FFF8E8; color:#7C5E24; }
.status.rejected, .status.cancelled { background:#F8F2EA; color:#A13B3B; }
.status.large { padding:10px 16px; font-weight:800; }
.empty-state { text-align:center; padding:40px 20px; color:var(--muted); }
.privacy-note { margin-top:24px; padding:18px 20px; border-right:4px solid var(--accent); background:#FAF7F1; border-radius:12px; }
.privacy-note p { margin-bottom:0; }
.detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
dl { display:grid; grid-template-columns:170px 1fr; gap:12px; }
dt { color:var(--muted); }
dd { margin:0; font-weight:700; }
.messages { margin-bottom:20px; }
.message { padding:13px 15px; border-radius:10px; background:var(--surface-strong); border:1px solid var(--border); margin-bottom:8px; }
.message.success { background:#EEF8F1; }
.message.error { background:#F8F2EA; }
.message.info { background:#EEF8F1; }
.admin-tabs { display:flex; gap:10px; flex-wrap:wrap; margin:16px 0 22px; }
.admin-tabs a { padding:9px 12px; border-radius:9px; background:var(--surface-strong); text-decoration:none; transition:background .18s ease, border-color .18s ease; }
.admin-tabs a:hover { background:var(--card-hover); }
@media (max-width: 820px) {
    .partner-header { align-items:stretch; flex-direction:column; }
    .partner-header-actions { align-items:stretch; flex-direction:column; }
    .partner-header nav { width:100%; }
    .partner-home-link { width:100%; }
    .auth-grid, .detail-grid { grid-template-columns:1fr; }
    .stats { grid-template-columns:1fr; }
    .page-head { align-items:flex-start; flex-direction:column; }
    .auth-copy { padding:10px 0; }
    dl { grid-template-columns:1fr; gap:4px; }
    dd { margin-bottom:12px; }
}

.auth-links { display:flex; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-top:18px; }
.pending-card { text-align:center; }
.admin-actions { display:flex; gap:10px; margin-top:22px; }
.danger-button { border:0; border-radius:11px; background:#A13B3B; color:white; padding:12px 18px; font:inherit; font-weight:800; cursor:pointer; }
.status.pending { background:#FFF8E8; color:#7C5E24; }
.status.suspended { background:#F8F2EA; color:#A13B3B; }
.partner-admin-stats { margin-top:18px; }
.pricing-settings-card input { width:min(220px, 100%); min-height:44px; margin-right:10px; }
table input[type="number"] { width:110px; min-height:38px; }


/* U-Turn manager typography scale */
.partner-main h1 {
    font-size: clamp(31px, 5vw, 43px);
    line-height: 1.2;
    font-weight: 800;
}
.partner-main h2 {
    font-size: 20px;
    line-height: 1.35;
    font-weight: 800;
}
.partner-main h3 {
    font-size: 18px;
    line-height: 1.45;
    font-weight: 700;
}
.partner-main p,
.partner-main li,
.partner-main dt,
.partner-main dd {
    font-size: 16px;
    line-height: 1.8;
}
.partner-main :is(.muted, .helptext, .hint, .note, small) {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}
.partner-main :is(label, button, .primary, .primary-link, .danger-button) {
    font-size: 13px;
}
.partner-main :is(input, select, textarea) {
    background: var(--surface-strong);
    border-color: #E8E1D6;
    color: var(--text);
    font-size: 14px;
}
@media (max-width: 820px) {
    .partner-main :is(input, select, textarea) {
        font-size: 14px;
    }
}
