/* PadelPROShop Creators - design system.
   No inline styles are used anywhere (CSP): every value comes from a class or an SVG attribute. */

@font-face { font-family: 'PadelProShop'; src: url('../fonts/Haffer-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'PadelProShop'; src: url('../fonts/Haffer-RegularItalic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'PadelProShop'; src: url('../fonts/Haffer-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
    --bg: #f4f6fb;
    --card: #ffffff;
    --ink: #151a2d;
    --ink-soft: #3a4156;
    --muted: #6a7288;
    --line: #e7eaf2;
    --side: #141a2b;
    --side-ink: #c7cde0;
    --blue: #2b44ff;
    --blue-dark: #1f33d6;
    --blue-soft: #e8ecff;
    --cyan: #19a7ff;
    --gold: #d4a62a;
    --gold-soft: #fdf4d9;
    --silver: #a9afbd;
    --silver-soft: #eceef3;
    --bronze: #c3875a;
    --bronze-soft: #f9e6d9;
    --green: #1f8f4e;
    --green-soft: #def5e7;
    --amber: #8a6100;
    --amber-soft: #fdf0cc;
    --red: #c0392b;
    --red-soft: #fde6e3;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(20, 26, 43, 0.04), 0 6px 20px rgba(20, 26, 43, 0.05);
    --sidebar-w: 240px;
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'PadelProShop', 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

h1, h2, h3, h4, p { margin: 0; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

/* ---------- Shell ---------- */

.app { min-height: 100vh; }

.side {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: var(--side);
    color: var(--side-ink);
    padding: 28px 16px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    z-index: 20;
}

.brand { display: block; color: #fff; padding: 0 8px; }
.brand:hover { text-decoration: none; }
.brand-name { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.brand-sub { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.22em; color: var(--cyan); margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 4px; }

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 12px;
    color: var(--side-ink);
    font-weight: 700;
    font-size: 14px;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.06); text-decoration: none; }
.nav-link.is-active { background: var(--blue); color: #fff; }
.nav-link svg { display: none; width: 20px; height: 20px; }
.nav-dot { position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; border-radius: 50%; background: #ff4d5e; transform: translateY(-50%); }

.side-foot { margin-top: auto; padding: 0 8px; font-size: 13px; }
.side-foot .who { color: #fff; font-weight: 700; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-button { background: none; border: 0; padding: 0; color: var(--side-ink); font: inherit; cursor: pointer; text-decoration: underline; }

.main { margin-left: var(--sidebar-w); padding: 36px 40px 56px; max-width: calc(var(--sidebar-w) + 1240px); }

.topbar { display: none; }
.bottom-nav { display: none; }

.viewas {
    background: var(--amber-soft);
    color: var(--amber);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 18px;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------- Page head ---------- */

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.page-head h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.page-sub { color: var(--muted); margin-top: 4px; max-width: 640px; }

.lang { display: inline-flex; background: #fff; border-radius: 999px; padding: 3px; box-shadow: var(--shadow); flex: none; }
.lang a { padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--muted); }
.lang a:hover { text-decoration: none; }
.lang a.is-on { background: var(--ink); color: #fff; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.filters form { display: contents; }
.select {
    appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236a7288' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center;
    border: 0;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 10px 36px 10px 14px;
    font: inherit;
    font-weight: 700;
    font-size: 13px;
    color: var(--ink);
    cursor: pointer;
}

/* ---------- Cards and grids ---------- */

.box { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.box + .box { margin-top: 20px; }
.grid > .box + .box { margin-top: 0; } /* grid gap already separates the cells */
.box-title { font-size: 16px; font-weight: 700; }
.box-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.box-head { margin-bottom: 14px; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.grid + .box, .box + .grid, .grid + .grid { margin-top: 20px; }
.stack > * + * { margin-top: 20px; }

.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
.stat-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stat-value { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin-top: 8px; }
.stat-blue { background: var(--blue); color: #fff; }
.stat-blue .stat-label { color: rgba(255, 255, 255, 0.78); }
.stat-chip { display: inline-block; margin-top: 10px; background: rgba(255, 255, 255, 0.18); border-radius: 8px; padding: 3px 9px; font-size: 12px; font-weight: 700; }
.stat-sm { padding: 16px 18px; }
.stat-sm .stat-value { font-size: 22px; margin-top: 6px; }

.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }

/* ---------- Pills, deltas, badges ---------- */

.pill { display: inline-block; border-radius: 8px; padding: 2px 8px; font-size: 12px; font-weight: 700; background: var(--blue-soft); color: var(--blue); white-space: nowrap; }
.delta { display: inline-block; border-radius: 8px; padding: 2px 8px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.delta-up { background: var(--green-soft); color: var(--green); }
.delta-down { background: var(--red-soft); color: var(--red); }
.delta-flat { background: var(--silver-soft); color: var(--muted); }
.delta-warn { background: var(--amber-soft); color: var(--amber); }

.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 11px; font-size: 12px; font-weight: 700; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.badge-gold { background: var(--gold-soft); color: #8a6a00; }
.badge-silver { background: var(--silver-soft); color: #566; }
.badge-bronze { background: var(--bronze-soft); color: #8a4f23; }
.badge-pending { background: var(--amber-soft); color: var(--amber); }
.badge-paid { background: var(--green-soft); color: var(--green); }
.badge-now { background: var(--blue); color: #fff; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 9px; }
.badge-now::before { display: none; }

/* ---------- Rows: rankings, mix, lists ---------- */

.rows { list-style: none; margin: 0; padding: 0; }
.row-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; }
.row-item + .row-item { margin-top: 4px; }
.row-item .grow { flex: 1; min-width: 0; }
.row-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-note { font-size: 11px; color: var(--muted); }
.row-pts { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.row-first { background: var(--gold-soft); }
.row-me { background: var(--blue-soft); }
.row-me .row-name, .row-me .row-pts { color: var(--blue); }
.row-gap { text-align: right; font-size: 12px; font-weight: 700; color: var(--blue); padding: 10px 10px 0; }

.pos {
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    background: var(--silver-soft);
    color: var(--muted);
}
.pos-1 { background: var(--gold); color: #fff; }
.pos-2 { background: var(--silver); color: #fff; }
.pos-3 { background: var(--bronze); color: #fff; }

.avatar {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: #4b5568;
    object-fit: cover;
}
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.avatar-0 { background: #4b5568; }
.avatar-1 { background: #1c2438; }
.avatar-2 { background: #2f7f96; }
.avatar-3 { background: #8a5a3c; }
.avatar-4 { background: #5b4bb0; }
.avatar-5 { background: #2f8a5b; }
.avatar-me { background: #fff; color: var(--muted); border: 1px solid var(--line); }

.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.kv:nth-child(odd) { background: var(--bg); }
.kv strong { font-weight: 700; }

.meter-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.meter-row:last-child { border-bottom: 0; }
.meter-row .label { font-weight: 700; }
.meter-row .value { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.value-sub { color: var(--muted); font-weight: 400; }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; }
.table td { padding: 12px; border-top: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.table tr.is-zebra td { background: var(--bg); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .muted { color: var(--muted); }

.pager { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.pager a, .pager span.btn-icon { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg); color: var(--ink); font-weight: 700; }
.pager span.btn-icon { opacity: 0.4; }
.pager a:hover { background: var(--blue-soft); text-decoration: none; }
.head-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* ---------- Charts (SVG) ---------- */

.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: inherit; font-size: 10px; fill: var(--muted); }
.chart .bar { fill: #151a2d; }
.chart .bar-current { fill: var(--blue); }
.chart .bar-empty { fill: var(--line); }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .val { fill: var(--ink); font-weight: 700; }

.meter { width: 100%; height: auto; display: block; }
.meter .track { fill: #e3e6f0; }
.meter .fill { fill: url(#tierGradient); }
.meter .tick { stroke: #c9cedd; stroke-width: 1.5; }
.meter .knob { fill: #fff; stroke: var(--blue); stroke-width: 4; }
.meter text { font-family: inherit; font-size: 11px; fill: var(--muted); }
.meter .tick-label { font-weight: 700; fill: var(--ink-soft); }
.meter .bubble { fill: var(--blue-soft); }
.meter .bubble-text { fill: var(--blue); font-weight: 700; }

/* ---------- Tiers ---------- */

/* Full comparison, the same table as the landing: every tier styled alike, only the creator's tier outlined. */
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.cmp th, .cmp td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.cmp thead th { vertical-align: bottom; border-bottom: 2px solid var(--ink); }
.cmp tbody tr:last-child th, .cmp tbody tr:last-child td { border-bottom: 0; }
.cmp tbody th { font-weight: 700; width: 34%; }
.cmp td { font-weight: 700; }
.cmp-label { font-size: 12px; letter-spacing: 0.08em; color: var(--blue); }
.cmp-tier-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: 0.04em; }
.cmp-tier .badge { display: table; margin-top: 6px; }
.cmp .is-current { box-shadow: inset 2px 0 0 var(--blue), inset -2px 0 0 var(--blue); }
.cmp thead .is-current { box-shadow: inset 2px 0 0 var(--blue), inset -2px 0 0 var(--blue), inset 0 2px 0 var(--blue); border-radius: 10px 10px 0 0; }
.cmp .cmp-span { font-weight: 400; color: var(--ink-soft); }
/* Material lines: the landing's highlighted blue box (deep blue, white text, brighter blue line on the left). */
.cmp .cmp-gap td { height: 16px; padding: 0; border: 0; box-shadow: none; }
.cmp .cmp-material th, .cmp .cmp-material td { background: #0b1a5e; color: #fff; border-bottom: 1px solid rgba(91, 124, 255, 0.35); vertical-align: top; }
.cmp .cmp-material tr:last-child th, .cmp .cmp-material tr:last-child td { border-bottom: 0; }
.cmp .cmp-material th { box-shadow: inset 3px 0 0 #5b7cff; }
.cmp .cmp-material tr:first-child > :first-child { border-top-left-radius: 14px; }
.cmp .cmp-material tr:first-child > :last-child { border-top-right-radius: 14px; }
.cmp .cmp-material tr:last-child > :first-child { border-bottom-left-radius: 14px; }
.cmp .cmp-material tr:last-child > :last-child { border-bottom-right-radius: 14px; }
.cmp .cmp-material .cmp-span, .cmp .cmp-material .cmp-test { font-weight: 400; color: rgba(255, 255, 255, 0.86); line-height: 1.55; }
.cmp-icon { display: inline-flex; vertical-align: -4px; margin-right: 10px; color: #8aa2ff; }
.cmp-icon svg { width: 18px; height: 18px; }
.cmp-material-card { background: #0b1a5e; color: #fff; border-radius: 14px; box-shadow: inset 3px 0 0 #5b7cff; padding: 4px 16px; }
.cmp-material-item { padding: 12px 0; border-bottom: 1px solid rgba(91, 124, 255, 0.35); }
.cmp-material-item:last-child { border-bottom: 0; }
.cmp-material-item p { margin: 0; }
.cmp-material-title { font-weight: 700; margin-bottom: 6px !important; }
.cmp-material-tiers { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: rgba(255, 255, 255, 0.86); }
.cmp-material-tiers strong { color: #fff; margin-left: 4px; }
.cmp-material-card .cmp-span, .cmp-material-card .cmp-test { font-size: 14px; line-height: 1.55; color: rgba(255, 255, 255, 0.86); }
.tier-card .kv strong { white-space: nowrap; text-align: right; }
.tier-card .t-head { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.tier-chip { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 700; }
.tier-chip-gold { background: var(--gold); }
.tier-chip-silver { background: var(--silver); }
.tier-chip-bronze { background: var(--bronze); }
.t-title-gold { color: #8a6a00; }
.t-title-silver { color: #566; }
.t-title-bronze { color: #8a4f23; }
.tier-mobile { display: none; }

/* ---------- Forms and buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    padding: 11px 20px;
    font: inherit;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    background: var(--blue-soft);
    color: var(--blue);
    text-decoration: none;
}
.btn:hover { text-decoration: none; filter: brightness(0.97); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); filter: none; }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; filter: none; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn[disabled], .btn.is-disabled { opacity: 0.45; pointer-events: none; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12px; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
.input, .form-control {
    width: 100%;
    border: 1px solid transparent;
    background: var(--bg);
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
    color: var(--ink);
}
.input:focus, .form-control:focus { outline: 2px solid var(--blue); background: #fff; }
.field-error, .text-validation { color: var(--red); font-size: 12px; display: block; margin-top: 4px; }

.profile-grid { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 28px; align-items: start; }
.photo-box { text-align: center; }
.photo-frame { width: 140px; height: 140px; border-radius: 18px; background: var(--bg); border: 1px dashed #c9cedd; display: flex; align-items: center; justify-content: center; overflow: hidden; margin: 0 auto 10px; color: var(--muted); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.file-link { color: var(--blue); font-weight: 700; font-size: 13px; cursor: pointer; display: block; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.code-card-wrap { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.code-canvas { width: 220px; max-width: 100%; height: auto; border-radius: 16px; box-shadow: 0 10px 30px rgba(20, 26, 43, 0.25); display: block; }
.drop { display: flex; gap: 14px; align-items: center; border: 1px dashed #c9cedd; border-radius: 12px; padding: 14px 16px; background: #fff; margin-top: 14px; }
.drop strong { display: block; }
.drop span { font-size: 12px; color: var(--muted); }

/* ---------- Learning ---------- */

.video { display: flex; align-items: center; gap: 14px; padding: 10px 0; }
.video + .video { border-top: 1px solid var(--line); }
.video-thumb { flex: none; width: 96px; height: 56px; border-radius: 10px; background: linear-gradient(135deg, #1c2438, #2b44ff); color: #fff; display: flex; align-items: flex-end; justify-content: flex-end; padding: 6px; font-size: 11px; font-weight: 700; }
.qa { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.qa + .qa { border-top: 1px solid var(--line); }
.files { display: flex; flex-wrap: wrap; gap: 10px; }
.file-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 10px; padding: 10px 14px; font-weight: 700; font-size: 13px; color: var(--ink); }

/* ---------- Admin ---------- */

.admin-bar { background: var(--side); color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 16px 40px; gap: 16px; }
.admin-bar a { color: #fff; }
.admin-bar .brand-name { font-size: 20px; }
.admin-tag { background: rgba(255, 255, 255, 0.12); border-radius: 999px; padding: 5px 14px; font-size: 12px; font-weight: 700; }
.admin-main { padding: 32px 40px 56px; max-width: 1280px; margin: 0 auto; }
.admin-nav { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-nav a { padding: 8px 14px; border-radius: 10px; font-weight: 700; font-size: 13px; color: var(--ink-soft); background: #fff; box-shadow: var(--shadow); }
.admin-nav a.is-active { background: var(--blue); color: #fff; }
.admin-nav a:hover { text-decoration: none; }
.who-cell { display: flex; align-items: center; gap: 12px; }
.who-cell small { display: block; color: var(--muted); font-size: 12px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Auth ---------- */

.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--side); }
.auth-card { background: #fff; border-radius: 22px; padding: 36px; width: 100%; max-width: 440px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); }
.auth-card .brand { color: var(--ink); padding: 0; margin-bottom: 22px; }
.auth-card h1 { font-size: 24px; margin-bottom: 8px; }

/* ---------- Generic / compatibility (admin diagnostics, errors) ---------- */

.alert { border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; background: var(--blue-soft); color: var(--ink); }
.alert-danger { background: var(--red-soft); color: var(--red); }
.alert-warning { background: var(--amber-soft); color: var(--amber); }
.alert-secondary { background: var(--silver-soft); color: var(--ink-soft); }
.alert-success { background: var(--green-soft); color: var(--green); }
.text-muted { color: var(--muted); }
.text-danger { color: var(--red); }
.small { font-size: 12px; }
.d-inline { display: inline; }
.mb-3 { margin-bottom: 16px; }
.mt-3 { margin-top: 16px; }
.mt-2 { margin-top: 8px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; height: 100%; }
.panel-title { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.panel-value { font-size: 26px; font-weight: 700; margin-top: 6px; }
.panel-value-sm { font-size: 14px; font-weight: 400; color: var(--muted); }
.panel-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.panel-dark { background: var(--side); color: #fff; }
.panel-dark .panel-title, .panel-dark .panel-sub { color: var(--side-ink); }
.section-title { font-size: 18px; font-weight: 700; margin: 24px 0 12px; }
.row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.row.g-3 { gap: 16px; }
.col-6 { grid-column: span 6; }
.col-12 { grid-column: span 12; }
.col-md-3 { grid-column: span 3; }
.col-lg-5 { grid-column: span 5; }
.col-lg-7 { grid-column: span 7; }
.badge-status { display: inline-block; border-radius: 999px; padding: 3px 11px; font-size: 12px; font-weight: 700; background: var(--silver-soft); color: var(--ink-soft); }
.badge-status.ok { background: var(--green-soft); color: var(--green); }
.badge-status.warn { background: var(--amber-soft); color: var(--amber); }
.badge-status.error { background: var(--red-soft); color: var(--red); }
.table-responsive { overflow-x: auto; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .main { padding: 28px 24px 56px; }
}

@media (max-width: 900px) {
    .side { display: none; }
    .main { margin-left: 0; padding: 16px 16px 96px; }
    .topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 14px 16px;
        background: var(--side);
        color: #fff;
        position: sticky;
        top: 0;
        z-index: 15;
    }
    .topbar .brand-name { font-size: 18px; }
    .topbar .brand-sub { font-size: 9px; }
    .topbar .lang { box-shadow: none; }
    .page-head h1 { font-size: 24px; }
    .page-head .lang { display: none; }
    .grid-3, .grid-2, .grid-2-1 { grid-template-columns: minmax(0, 1fr); }
    .bottom-nav {
        display: grid;
        grid-template-columns: repeat(8, 1fr);
        position: fixed;
        inset: auto 0 0 0;
        background: #fff;
        box-shadow: 0 -4px 20px rgba(20, 26, 43, 0.1);
        padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
        z-index: 20;
    }
    .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; color: var(--muted); padding: 4px 2px; position: relative; text-align: center; }
    .bottom-nav a:hover { text-decoration: none; }
    .bottom-nav a svg { width: 22px; height: 22px; }
    .bottom-nav a.is-active { color: var(--blue); }
    .bottom-nav .nav-dot { right: 22%; top: 6px; transform: none; }
    .profile-grid { grid-template-columns: minmax(0, 1fr); }
    .cmp-wrap { display: none; }
    .tier-mobile { display: grid; gap: 14px; }
    .admin-bar, .admin-main { padding-left: 16px; padding-right: 16px; }
    .row .col-md-3 { grid-column: span 6; }
    .row .col-lg-5, .row .col-lg-7 { grid-column: span 12; }
    .stat-value { font-size: 26px; }
}

.tier-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.tier-card.is-current { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-soft); }

/* ---- Material ---- */
.badge-approved { background: var(--blue-soft); color: var(--blue); }
.badge-late { background: var(--red-soft); color: var(--red); }
.badge-closed { background: var(--silver-soft); color: var(--ink-soft); }
.choice { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg); margin-top: 8px; font-size: 14px; cursor: pointer; }
.choice input { margin-top: 3px; }
.choice.is-disabled { opacity: 0.5; cursor: not-allowed; }
fieldset.field { border: 0; padding: 0; margin: 0 0 14px; }
.field-hint { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.loan-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.input-sm { padding: 7px 10px; font-size: 13px; min-width: 140px; width: auto; flex: 1 1 140px; }

/* Creatives: SharePoint folder browser */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; padding: 0; font-size: 14px; font-weight: 700; }
.crumbs li + li::before { content: "/"; color: var(--muted); margin-right: 4px; }
.crumbs [aria-current] { color: var(--ink); }
.crea-section .section-title { margin-top: 16px; }
.crea-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.crea-folder { display: grid; grid-template-columns: 28px 1fr; align-items: center; column-gap: 10px; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px; color: var(--ink); }
.crea-folder:hover { text-decoration: none; box-shadow: 0 0 0 2px var(--blue-soft), var(--shadow); }
.crea-folder svg { width: 28px; height: 28px; color: var(--blue); grid-row: span 2; }
.crea-folder-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crea-meta { color: var(--muted); font-size: 12px; margin: 0; }
.crea-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.crea-file { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.crea-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--blue-soft); display: grid; place-items: center; overflow: hidden; }
.crea-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 8px; object-fit: contain; background: var(--bg); }
.crea-thumb img.is-broken { display: none; }
.crea-kind { display: grid; justify-items: center; gap: 4px; color: var(--blue); font-size: 12px; font-weight: 700; }
.crea-kind svg { width: 34px; height: 34px; }
.crea-thumb-video { background: #e9f7ef; }
.crea-thumb-video .crea-kind { color: #1a8f53; }
.crea-thumb-pdf { background: #fdecec; }
.crea-thumb-pdf .crea-kind { color: #c63b3b; }
.crea-file-body { padding: 12px 14px 14px; display: grid; gap: 4px; }
.crea-file-name { font-weight: 700; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crea-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.crea-actions svg { width: 15px; height: 15px; vertical-align: -3px; }
@media (max-width: 720px) {
    .crea-folders { grid-template-columns: minmax(0, 1fr); }
    .crea-files { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .crea-actions .btn { flex: 1; text-align: center; padding-left: 8px; padding-right: 8px; }
}

/* ---- Admin: creator codes and applications ---- */
.codes-sync { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.codes-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.codes-head .box-title { margin-right: auto; }
.codes-search { flex: 0 1 260px; display: flex; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--bg); border-radius: 999px; padding: 4px; }
.seg a { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); }
.seg a:hover { text-decoration: none; color: var(--ink); }
.seg a.is-on { background: var(--ink); color: #fff; }
.seg-n { font-weight: 400; opacity: 0.75; margin-left: 2px; }
.code-name { letter-spacing: 0.04em; }
.code-assign { flex: 1 1 320px; }
.app-comment { margin-top: 6px; font-size: 13px; color: var(--ink-soft); white-space: pre-line; max-width: 46ch; }
@media (max-width: 720px) {
    .codes-sync { align-items: flex-start; }
}

/* ---- Material: catalog with photos, returns check, traceability ---- */
.gear-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.gear-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; background: var(--card); }
.gear-photo { position: relative; aspect-ratio: 4 / 3; background: var(--bg); display: grid; place-items: center; }
.gear-photo img { width: 100%; height: 100%; object-fit: cover; }
.gear-nophoto svg { width: 40px; height: 40px; color: var(--muted); }
.gear-flag { position: absolute; top: 10px; left: 10px; }
.gear-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.gear-body .badge { margin-top: 6px; }
.gear-row { display: flex; align-items: center; gap: 10px; }
.gear-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; background: var(--bg); }
.photo-strip { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.photo-strip li { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.photo-strip img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; background: var(--bg); }
.photo-strip-lg { margin-bottom: 18px; }
.photo-strip-lg img { width: 160px; height: 120px; }
.return-group { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 14px; margin-bottom: 12px; }
.return-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
.check-danger input { accent-color: var(--red); }
.check-danger span { color: var(--red); font-weight: 700; }
.row-late td { background: var(--red-soft); }
.stat-small { font-size: 16px; color: var(--muted); font-weight: 400; }
.trace td { vertical-align: top; }
.trace .row-note { display: block; }

/* ---- Performance: big headline KPIs, compact secondary figures, brands ---- */
.kpi-hero .stat-hero { padding: 26px 26px 22px; }
.kpi-hero .stat-value { font-size: 46px; line-height: 1.05; margin-top: 10px; }
.stat-foot { margin-top: 8px; font-size: 13px; color: var(--muted); }
.stat-blue .stat-foot { color: rgba(255, 255, 255, 0.78); }
.stat-hero:not(.stat-blue) .stat-chip { background: var(--bg); color: var(--ink-soft); }
.kpi-mini { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 14px 0 22px; }
.mini { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px; }
.mini-label { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.mini-value { font-size: 17px; font-weight: 700; margin-top: 4px; }
.mini-sub { font-size: 12px; font-weight: 400; color: var(--muted); }
.brand-list { list-style: none; margin: 0; padding: 0; }
.brand-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.brand-row:last-child { border-bottom: 0; }
.brand-name-cell { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.brand-bar { display: block; height: 6px; border-radius: 3px; background: var(--bg); overflow: hidden; }
.brand-fill { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.brand-fill.w-0 { width: 0%; }
.brand-fill.w-5 { width: 5%; }
.brand-fill.w-10 { width: 10%; }
.brand-fill.w-15 { width: 15%; }
.brand-fill.w-20 { width: 20%; }
.brand-fill.w-25 { width: 25%; }
.brand-fill.w-30 { width: 30%; }
.brand-fill.w-35 { width: 35%; }
.brand-fill.w-40 { width: 40%; }
.brand-fill.w-45 { width: 45%; }
.brand-fill.w-50 { width: 50%; }
.brand-fill.w-55 { width: 55%; }
.brand-fill.w-60 { width: 60%; }
.brand-fill.w-65 { width: 65%; }
.brand-fill.w-70 { width: 70%; }
.brand-fill.w-75 { width: 75%; }
.brand-fill.w-80 { width: 80%; }
.brand-fill.w-85 { width: 85%; }
.brand-fill.w-90 { width: 90%; }
.brand-fill.w-95 { width: 95%; }
.brand-fill.w-100 { width: 100%; }
.brand-row .value { display: flex; align-items: center; gap: 8px; font-weight: 700; white-space: nowrap; }
@media (max-width: 1100px) { .kpi-mini { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .kpi-hero .stat-value { font-size: 36px; } .kpi-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); } .brand-row .value .pill { display: none; } }

/* ---- PPS Competition: rankings as a league table, the points of each position on the right ---- */
.league-head { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 0 10px 8px; border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); }
.league-head > span:first-child { width: 26px; text-align: center; }
.league-head .grow { flex: 1; }
.league-head > span:last-child { min-width: 44px; text-align: right; }
.league-head + .league { margin-top: 6px; }
.league-pts { flex: none; min-width: 44px; text-align: right; font-size: 15px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.row-me .league-pts { color: var(--blue); }

/* ---- Performance: strategic mix as three KPIs, never taller than the evolution chart beside them ---- */
.mix-kpis { display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 12px; contain: size; }
.mix-kpi { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 20px; overflow: hidden; }
.mix-kpi-text { min-width: 0; }
.mix-kpi .stat-foot { margin-top: 4px; font-size: 12px; }
.mix-kpi-figure { flex: none; text-align: right; }
.mix-kpi .stat-value { font-size: 32px; line-height: 1; margin-top: 0; }
.mix-kpi .stat-chip { margin-top: 6px; white-space: nowrap; }
.mix-kpi:not(.stat-blue) .stat-chip { background: var(--bg); color: var(--ink-soft); }
/* Stacked under the chart on phones: each KPI takes its natural height. */
@media (max-width: 900px) { .mix-kpis { contain: none; grid-template-rows: none; } }

/* ---- "Coming soon" tabs (Material, Formación y avisos) ---- */
.soon { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.soon-hero {
    position: relative; overflow: hidden; padding: 48px 44px 44px; color: #fff;
    background: radial-gradient(circle at 88% 12%, rgba(25, 167, 255, 0.55), transparent 42%), linear-gradient(135deg, var(--blue) 0%, #1626a8 100%);
}
/* Two soft rings, like the lines of a court, so the block does not feel empty. */
.soon-hero::before, .soon-hero::after { content: ''; position: absolute; border-radius: 50%; border: 36px solid rgba(255, 255, 255, 0.06); pointer-events: none; }
.soon-hero::before { width: 360px; height: 360px; right: -90px; bottom: -170px; }
.soon-hero::after { width: 200px; height: 200px; right: 150px; top: -130px; border-width: 22px; }
.soon-hero > * { position: relative; z-index: 1; }
.soon-icon { width: 60px; height: 60px; border-radius: 18px; background: rgba(255, 255, 255, 0.16); display: grid; place-items: center; }
.soon-icon svg { width: 30px; height: 30px; }
.soon-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; color: rgba(255, 255, 255, 0.85); }
.soon-eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #7cf0b5; box-shadow: 0 0 0 0 rgba(124, 240, 181, 0.7); animation: soon-pulse 1.8s infinite; }
@keyframes soon-pulse { 70% { box-shadow: 0 0 0 9px rgba(124, 240, 181, 0); } 100% { box-shadow: 0 0 0 0 rgba(124, 240, 181, 0); } }
.soon-title { margin-top: 10px; font-size: clamp(26px, 3.2vw, 38px); line-height: 1.08; letter-spacing: -0.02em; max-width: 22ch; }
.soon-text { margin-top: 14px; max-width: 58ch; font-size: 16px; color: rgba(255, 255, 255, 0.85); }
.soon-features { list-style: none; margin: 0; padding: 30px 44px 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.soon-features li { display: flex; flex-direction: column; gap: 4px; }
.soon-features li > span:last-child { color: var(--muted); font-size: 13px; }
.soon-feature-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; margin-bottom: 8px; }
.soon-feature-icon svg { width: 22px; height: 22px; }
.soon-note { padding: 18px 44px 30px; font-size: 13px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .soon-eyebrow::before { animation: none; } }
@media (max-width: 720px) {
    .soon-hero { padding: 30px 22px 28px; }
    .soon-features { grid-template-columns: minmax(0, 1fr); padding: 22px 22px 4px; gap: 18px; }
    .soon-note { padding: 14px 22px 24px; }
}
.admin-nav .admin-nav-tech { margin-left: auto; opacity: 0.7; font-weight: 400; }

/* ---- Notices: banners on every creator page and the list in "Formación y avisos" ---- */
.notice-banners { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.notice-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--card); border-left: 4px solid var(--blue); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 16px; }
.notice-banner .grow { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; }
.notice-banner-body { font-size: 13px; color: var(--ink-soft); white-space: pre-line; }
.notice-banner form { margin: 0; }
.notice-list { list-style: none; margin: 12px 0 0; padding: 0; }
.notice-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.notice-item:last-child { border-bottom: 0; }
.notice-item .grow { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.notice-item.is-unread strong::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff4d5e; margin-left: 8px; vertical-align: middle; }
.notice-body { color: var(--ink-soft); white-space: pre-line; }

/* ---- Admin: administrators list ---- */
.admin-users { list-style: none; margin: 0; padding: 0; }
.admin-user { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.admin-user:last-child { border-bottom: 0; }
.admin-user .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.admin-remove { margin: 0; }

/* Mi perfil · how the creator is paid: invoice or purchase code */
.payout-title { font-size: 15px; margin: 0 0 12px; }
.payout-options { margin-bottom: 22px; }
.payout-option { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.payout-option strong { display: block; margin-bottom: 4px; }
.payout-option p { margin: 0 0 10px; font-size: 13px; color: var(--ink-soft); }
.payout-icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); }
.payout-icon svg { width: 20px; height: 20px; }
.payout-email { font-weight: 700; color: var(--blue); word-break: break-all; }
@media (max-width: 720px) { .payout-options { grid-template-columns: 1fr; } }

/* Admin · ambassadors of the landing */
.amb-list { list-style: none; margin: 0; padding: 0; }
.amb-row { display: flex; align-items: center; gap: 14px; padding: 12px 8px; border-bottom: 1px solid var(--line); border-radius: 10px; }
.amb-row:last-child { border-bottom: 0; }
.amb-row.is-editing { background: var(--blue-soft); }
.amb-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.amb-thumb { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: var(--silver-soft); color: var(--muted); }
.amb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.amb-thumb svg { width: 24px; height: 24px; }
.amb-preview { display: block; width: 100%; max-width: 220px; aspect-ratio: 1; object-fit: cover; border-radius: 14px; }
@media (max-width: 720px) { .amb-row { flex-wrap: wrap; } .amb-row .chips { width: 100%; padding-left: 70px; } }
