/* RacklynSports admin panel */
:root {
  --navy: #0B1F3A; --navy-2: #13294B; --navy-line: #1F3A66;
  --orange: #F28322; --orange-dark: #D96E10; --yellow: #F2E52E; --red: #D91E36; --sky: #27C2EE; --green: #1E9E5A;
  --bg: #F3F5F9; --card: #FFFFFF; --line: #DDE3EC; --text: #14233B; --muted: #5E6B80;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(11, 31, 58, .06), 0 4px 16px rgba(11, 31, 58, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: 'Barlow', system-ui, sans-serif; font-size: 16px; color: var(--text); background: var(--bg); line-height: 1.45; }
h1, h2, h3 { font-family: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif; font-weight: 400; letter-spacing: .5px; margin: 0; }
h1 { font-size: 40px; line-height: 1; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
a { color: #0F7FA6; }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 16px; }

/* Layout */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--navy); color: #fff; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; text-decoration: none; color: #fff; }
.brand img { width: 36px; height: 36px; }
.brand span { font-family: 'Bebas Neue', 'Arial Narrow', sans-serif; font-size: 26px; letter-spacing: 1px; white-space: nowrap; }
.brand b { color: var(--orange); font-weight: 400; }
.brand small { display: block; font-family: 'Barlow'; font-size: 11px; letter-spacing: 2px; color: #A9B6CB; margin-top: -4px; }
.side a.nav { color: #C9D3E3; text-decoration: none; padding: 10px 12px; border-radius: 8px; font-weight: 600; }
.side a.nav:hover { background: var(--navy-2); color: #fff; }
.side a.nav.on { background: var(--navy-2); color: #fff; box-shadow: inset 3px 0 0 var(--orange); }
.side .label { font-size: 11px; letter-spacing: 2px; color: #7F8FA9; padding: 16px 12px 4px; text-transform: uppercase; }
.side .who { margin-top: auto; border-top: 1px solid var(--navy-line); padding: 14px 8px 0; font-size: 14px; color: #C9D3E3; }
.side .who button { margin-top: 8px; }
.side select { width: 100%; background: var(--navy-2); color: #fff; border: 1px solid var(--navy-line); border-radius: 8px; padding: 8px; }
.stripe { display: flex; height: 4px; }
.stripe span { flex: 1; }
main.content { padding: 28px 32px 60px; max-width: 1100px; width: 100%; }
.page-head { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .sub { color: var(--muted); margin-top: 4px; }

/* Cards and tables */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr.link { cursor: pointer; }
tr.link:hover td { background: #F7F9FC; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }

/* Status pills */
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; background: #E7ECF3; color: var(--muted); white-space: nowrap; }
.pill.draft { background: #E7ECF3; color: #4A5A72; }
.pill.pending_review, .pill.pending { background: #FFF2D6; color: #8A5A00; }
.pill.published, .pill.approved { background: #DCF3FB; color: #0B6C8C; }
.pill.registration_open { background: #FFE6CF; color: #A34A00; }
.pill.registration_closed { background: #EDE3FA; color: #5B3A8E; }
.pill.in_progress, .pill.live { background: #FCDDE2; color: #A3122A; }
.pill.completed { background: #DDF3E6; color: #17703F; }
.pill.cancelled, .pill.suspended { background: #F1F1F1; color: #777; text-decoration: line-through; }

/* Forms */
.grid { display: grid; gap: 14px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid .full { grid-column: 1 / -1; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
label.field .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
label.field .err { font-weight: 600; color: var(--red); font-size: 13px; }
input, select, textarea { border: 1px solid #C8D1DE; border-radius: 8px; padding: 10px 12px; background: #fff; min-height: 44px; width: 100%; font-weight: 400; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sky); outline-offset: 0; border-color: var(--sky); }
.field.bad input, .field.bad select, .field.bad textarea { border-color: var(--red); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.check input { width: 20px; min-height: 20px; height: 20px; }
.seg { display: inline-flex; border: 1px solid #C8D1DE; border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 9px 14px; cursor: pointer; font-weight: 600; min-height: 42px; }
.seg button + button { border-left: 1px solid #C8D1DE; }
.seg button.on { background: var(--navy); color: #fff; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1px solid transparent; background: var(--orange); color: var(--navy); font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--orange-dark); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: #fff; border-color: #C8D1DE; color: var(--text); }
.btn.secondary:hover { background: #F3F5F9; }
.btn.dark { background: var(--navy); color: #fff; }
.btn.dark:hover { background: var(--navy-2); }
.btn.danger { background: #fff; color: var(--red); border-color: #F0B8C1; }
.btn.danger:hover { background: #FDF0F2; }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 14px; }
.btn.link { background: none; border: 0; color: #0F7FA6; padding: 4px 6px; min-height: auto; }
.btn.ghost-light { background: transparent; color: #C9D3E3; border-color: var(--navy-line); }

/* Notices */
.notice { border-radius: 10px; padding: 14px 16px; border: 1px solid; }
.notice.info { background: #EAF8FD; border-color: #B6E6F6; }
.notice.warn { background: #FFF6E5; border-color: #F6D9A3; }
.notice.bad { background: #FDF0F2; border-color: #F0B8C1; }
.notice.good { background: #EAF7EF; border-color: #B8E3C8; }
.notice ul { margin: 6px 0 0; padding-left: 20px; }
.toast { position: fixed; right: 20px; bottom: 20px; background: var(--navy); color: #fff; padding: 14px 18px; border-radius: 10px; box-shadow: var(--shadow); z-index: 50; max-width: 420px; }
.toast.bad { background: var(--red); }

/* Category cards */
.cat { border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.cat + .cat { margin-top: 12px; }
.cat .code { font-weight: 800; color: var(--orange-dark); background: #FFF1E3; border-radius: 6px; padding: 2px 8px; font-size: 13px; }
.stage { display: flex; gap: 12px; align-items: center; background: #F7F9FC; border-radius: 8px; padding: 10px 12px; margin-top: 10px; flex-wrap: wrap; }
.stage .n { font-family: 'Bebas Neue'; font-size: 22px; color: var(--muted); width: 22px; }

/* Modal */
.backdrop { position: fixed; inset: 0; background: rgba(11, 31, 58, .55); display: grid; place-items: center; padding: 20px; z-index: 40; }
.modal { background: #fff; border-radius: 14px; width: min(680px, 100%); max-height: calc(100vh - 40px); overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal .mh { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal .mb { padding: 20px 22px; }
.modal .mf { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; background: var(--navy); padding: 20px; }
.login .box { background: #fff; border-radius: 16px; width: min(420px, 100%); overflow: hidden; }
.login .top { background: var(--navy-2); color: #fff; padding: 26px 24px 20px; text-align: center; }
.login .top img { width: 64px; height: 64px; }
.login .top h1 { font-size: 34px; margin-top: 8px; }
.login .top h1 b { color: var(--orange); font-weight: 400; }
.login .body { padding: 24px; }
.phone { display: flex; gap: 8px; }
.phone span { display: grid; place-items: center; padding: 0 12px; border: 1px solid #C8D1DE; border-radius: 8px; background: #F3F5F9; font-weight: 600; }
.otp { letter-spacing: 8px; font-size: 22px; text-align: center; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px; }
  .side .label, .side .who { display: none; }
  .brand { padding: 0 8px 0 0; }
  main.content { padding: 20px 16px 48px; }
  .grid, .grid.three { grid-template-columns: 1fr; }
  td, th { padding: 10px 6px; }
  .hide-sm { display: none; }
}
