/* MFK Bytca admin - per MFK Admin.dc design (Public Sans, light) */
:root {
  --navy: #0d1436;
  --navy-deep: #0a1029;
  --accent: #4b5bd6;
  --accent-hover: #3646bd;
  --gold: #f1c33d;
  --text: #0c1330;
  --body: #3a4256;
  --muted: #5b6478;
  --faint: #8b93a7;
  --line: #e4e8f0;
  --line-soft: #eef1f6;
  --input-line: #d9dee9;
  --bg: #eef1f6;
  --ok-bg: #e2f4e8; --ok-fg: #157a4a;
  --blue-bg: #e9edfb; --blue-fg: #3a49c0;
  --gray-bg: #eef1f6; --gray-fg: #7a8296;
  --danger: #c0362f; --danger-line: #f0d5d3; --danger-bg: #fbeceb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,24,64,.05);
  --shadow-hover: 0 6px 18px rgba(16,24,64,.09);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Public Sans", system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 14.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
svg { flex: none; }
::placeholder { color: #98a0b3; }

/* ---------- Shell ---------- */
.a-shell { display: flex; min-height: 100vh; }
.a-side { width: 246px; flex: none; background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%); color: #aeb6d6; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 18px 14px; }
.a-side-brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 20px; text-decoration: none !important; }
.a-side-brand img { height: 46px; }
.a-side-brand strong { color: #fff; font-weight: 800; font-size: 15px; display: block; line-height: 1.2; }
.a-side-brand em { font-style: normal; font-size: 11px; color: #8791b8; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.a-side-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.a-side-nav a, .a-side-bottom a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: #aeb6d6; font-weight: 600; font-size: 14px; text-decoration: none !important; transition: background .15s, color .15s; }
.a-side-nav a svg, .a-side-bottom a svg { width: 18px; height: 18px; }
.a-side-nav a:hover { background: rgba(255,255,255,.06); color: #dfe3f4; }
.a-side-nav a.active { background: var(--accent); color: #fff; }
.a-side-bottom { padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 3px; }
.a-side-bottom a:hover { color: #dfe3f4; background: rgba(255,255,255,.06); }
.a-side-bottom a.logout { color: #c98a8a; }
.a-side-bottom a.logout:hover { color: #e0a9a9; }

.a-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.a-top { background: transparent; padding: 0 44px; min-height: 0; display: flex; align-items: center; gap: 16px; }
.a-top-crumb { display: none; }
.a-top-user { display: none; }
.a-burger { display: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; padding: 8px 10px; margin: 12px 0 0 16px; }
.a-burger span { display: block; width: 20px; height: 2.5px; background: var(--navy); margin: 4px 0; border-radius: 2px; }

.a-main { max-width: 1180px; width: 100%; margin: 0 auto; padding: 34px 44px 80px; }
.a-eyebrow { margin-bottom: 6px; font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--text); margin-bottom: 6px; }
.a-sub { color: var(--muted); font-size: 14.5px; margin-bottom: 24px; max-width: 640px; }
h2 { font-size: 18px; font-weight: 800; color: var(--text); margin: 28px 0 14px; }

/* ---------- Flash / toast ---------- */
.flash { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 70; background: var(--navy); color: #fff; padding: 13px 20px; border-radius: 11px; font-size: 14px; font-weight: 600; box-shadow: 0 12px 30px rgba(9,13,35,.4); display: flex; align-items: center; gap: 10px; animation: mfkToast .2s ease; }
.flash::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #4be08f; flex: none; }
.flash.flash-err { position: static; transform: none; background: var(--danger-bg); border: 1px solid var(--danger-line); color: #7c2626; box-shadow: none; border-radius: 10px; margin-bottom: 18px; animation: none; }
.flash.flash-err::before { background: var(--danger); }
@keyframes mfkToast { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes mfkFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mfkPop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Tables ---------- */
table.grid { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow); }
.table-wrap table.grid { border: 0; border-radius: 0; box-shadow: none; }
table.grid th { background: #f7f8fb; border-bottom: 1px solid #e9edf4; text-align: left; padding: 13px 20px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gray-fg); white-space: nowrap; }
table.grid td { padding: 13px 20px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; font-size: 14px; color: var(--body); }
table.grid tr:last-child td { border-bottom: 0; }
table.grid tbody tr:hover td, table.grid tr:hover td { background: #fafbfd; }
table.grid td a { font-weight: 700; color: var(--text); }
table.grid td a:hover { color: var(--accent); }
tr.group-row td { background: #fbfcfe !important; padding: 13px 20px 9px; }
.group-head { display: flex; align-items: center; gap: 9px; }
.group-head .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.group-head .lbl { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.group-head .cnt { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 20px; font-size: 11.5px; font-weight: 700; background: var(--line-soft); color: var(--gray-fg); }
.num-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 26px; padding: 0 7px; border-radius: 7px; background: #f0f2f8; font-weight: 800; font-size: 13px; color: var(--body); }
.pos-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; vertical-align: 1px; }

.badge { display: inline-block; padding: 4px 11px; border-radius: 20px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok-fg); }
.badge.blue { background: var(--blue-bg); color: var(--blue-fg); }
.badge.muted { background: var(--gray-bg); color: var(--gray-fg); }
.badge.warn { background: #fdf3d8; color: #8a6a12; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff !important; padding: 11px 18px; border-radius: 10px; border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 14px; text-decoration: none !important; transition: .12s; white-space: nowrap; }
.btn:hover { filter: brightness(.93); }
.btn svg { width: 16px; height: 16px; }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 8px; }
.btn-ghost { background: #fff; color: var(--body) !important; border: 1px solid var(--input-line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent) !important; filter: none; }
.btn-danger { background: #fff; color: var(--danger) !important; border: 1px solid var(--danger-line); }
.btn-danger:hover { background: var(--danger-bg); border-color: #e9b4b0; filter: none; }
.btn-gold { background: var(--gold); color: var(--navy) !important; }
.btn-gold:hover { filter: brightness(1.05); }

/* ---------- Filter toolbar ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { position: relative; flex: 1; min-width: 220px; display: flex; align-items: center; }
.toolbar .search svg { position: absolute; left: 13px; width: 16px; height: 16px; color: #98a0b3; pointer-events: none; }
.toolbar .search input { width: 100%; padding: 11px 14px 11px 38px; border: 1px solid var(--input-line); border-radius: 10px; font: inherit; font-size: 14px; background: #fff; }
.toolbar select { width: auto; flex: none; padding: 11px 14px; border: 1px solid var(--input-line); border-radius: 10px; font: inherit; font-size: 14px; font-weight: 600; color: var(--body); background: #fff; cursor: pointer; }
.toolbar input:focus, .toolbar select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(75,91,214,.12); }
.empty-state { padding: 56px 20px; text-align: center; }
.empty-state .t { font-size: 15px; font-weight: 700; color: var(--body); margin-bottom: 4px; }
.empty-state .s { font-size: 13.5px; color: var(--faint); }

/* ---------- Forms / cards ---------- */
form.card, .card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 22px; box-shadow: var(--shadow); }
.card h2:first-child { margin-top: 0; margin-bottom: 16px; font-size: 16px; }
label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin: 16px 0 6px; }
input[type=text], input[type=number], input[type=url], input[type=datetime-local], input[type=password], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--input-line); border-radius: 9px; font: inherit; font-size: 14px; background: #fff; transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(75,91,214,.12); }
input[type=file] { font: inherit; font-size: 13.5px; }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }
textarea { min-height: 160px; }
textarea.tall { min-height: 400px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 20px; }
.hint { font-size: 13px; color: var(--faint); margin-top: 4px; }
.hint code, .card code { background: var(--blue-bg); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; color: var(--blue-fg); }
.thumb-sm { height: 42px; width: 66px; object-fit: cover; border-radius: 8px; display: block; }
.crest-xs { height: 20px; width: 20px; object-fit: contain; vertical-align: -4px; margin-right: 7px; display: inline-block; }
.p-row { display: inline-flex; align-items: center; gap: 9px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.avatar-ph { background: #eef0fb; color: #b9c1e0; overflow: hidden; }
.avatar-ph svg { width: 22px; height: 22px; margin-top: 6px; }
.flag-xs { height: 11px; width: auto; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.share-mini { padding: 7px 9px; }
.share-mini svg { width: 14px; height: 14px; }

/* aligned match row: home | crest | vs | crest | away */
.mrow { display: grid; grid-template-columns: 1fr 22px 36px 22px 1fr; align-items: center; gap: 9px; min-width: 380px; }
.mrow .m-home { text-align: right; font-size: 14.5px; }
.mrow .m-away { text-align: left; font-size: 14.5px; }
.mrow .m-x { text-align: center; color: #98a0b3; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.mrow .m-crest { display: inline-block; width: 22px; height: 22px; object-fit: contain; margin: 0; vertical-align: middle; }

.topbar { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.topbar .count { color: var(--muted); font-size: 14px; }
.topbar .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; margin: 4px 0 14px; }
.dash a { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: block; text-decoration: none !important; box-shadow: var(--shadow); transition: .15s; }
.dash a:hover { border-color: #c8cee0; box-shadow: var(--shadow-hover); }
.dash .dash-top { display: flex; justify-content: space-between; align-items: flex-start; }
.dash .icon { width: 38px; height: 38px; border-radius: 10px; background: #eef0fb; color: var(--accent); display: flex; align-items: center; justify-content: center; }
.dash .icon svg { width: 19px; height: 19px; }
.dash .go { font-size: 12px; color: var(--faint); font-weight: 600; }
.dash .num { font-size: 32px; font-weight: 800; margin-top: 12px; letter-spacing: -.03em; color: var(--accent); line-height: 1.1; }
.dash .lbl { font-size: 14px; color: var(--muted); font-weight: 600; }
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.guide-grid .g { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.guide-grid .n { width: 34px; height: 34px; border-radius: 9px; background: #eef0fb; color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; font-weight: 800; }
.guide-grid .t { font-weight: 700; margin-bottom: 6px; }
.guide-grid .d { font-size: 13.5px; color: var(--muted); line-height: 1.55; }

.syncbox { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: linear-gradient(120deg, var(--navy) 0%, #131c4d 100%); color: #aeb6d6; border-radius: var(--radius); padding: 18px 22px; margin-bottom: 22px; box-shadow: var(--shadow); }
.syncbox .t { font-size: 15px; font-weight: 800; color: #fff; margin-bottom: 2px; }
.syncbox .s { font-size: 13px; color: #8791b8; max-width: 620px; }
.syncbox .s a { color: var(--gold); }

/* ---------- Partner cards ---------- */
.partner-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.partner-cards .pc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); transition: .15s; }
.partner-cards .pc:hover { border-color: #c8cee0; box-shadow: var(--shadow-hover); }
.partner-cards .logo-area { height: 66px; border-radius: 10px; background: repeating-linear-gradient(135deg, #f1f3f9, #f1f3f9 7px, #f6f8fc 7px, #f6f8fc 14px); border: 1px solid #e6eaf2; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.partner-cards .logo-area img { max-height: 52px; max-width: 84%; width: auto; }
.partner-cards .initials { width: 40px; height: 40px; border-radius: 9px; background: var(--accent); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.partner-cards .name { font-weight: 700; font-size: 15px; line-height: 1.3; }
.partner-cards .name .badge { margin-left: 6px; vertical-align: 1px; }
.partner-cards .acts { display: flex; gap: 6px; margin-top: auto; }
.partner-cards .acts .btn-sm { flex: 1; justify-content: center; }
.partner-cards .acts form { display: contents; }

/* ---------- Confirm modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(9,13,35,.5); display: flex; align-items: center; justify-content: center; padding: 20px; animation: mfkFade .12s ease; }
.modal { background: #fff; border-radius: 16px; padding: 26px; max-width: 400px; width: 100%; box-shadow: 0 24px 60px rgba(9,13,35,.35); animation: mfkPop .16s ease; }
.modal .m-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--danger-bg); color: var(--danger); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.modal h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.modal p { font-size: 14px; color: var(--muted); line-height: 1.5; margin-bottom: 22px; }
.modal p b { color: var(--text); }
.modal .m-acts { display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- Login ---------- */
body.a-login { background: radial-gradient(1200px 600px at 50% -10%, #1b255c 0%, var(--navy-deep) 60%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-wrap { width: 100%; max-width: 400px; background: #fff; border-radius: 16px; padding: 38px 36px; text-align: center; box-shadow: 0 24px 60px rgba(4,7,25,.5); }
.login-wrap img { height: 88px; margin: 0 auto 14px; }
.login-wrap h1 { font-size: 22px; margin-bottom: 0; }
.login-wrap form { text-align: left; margin-top: 10px; }
.login-wrap .btn { width: 100%; justify-content: center; margin-top: 22px; padding: 12px; font-size: 15px; }
.err { background: var(--danger-bg); border: 1px solid var(--danger-line); color: #7c2626; padding: 10px 12px; border-radius: 10px; margin-top: 14px; font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .a-side { position: fixed; left: -260px; z-index: 100; transition: left .18s; box-shadow: 20px 0 50px rgba(4,7,25,.35); }
  .a-side.open { left: 0; }
  .a-burger { display: block; }
  .a-main { padding: 20px 16px 60px; }
  .row, .row3, .guide-grid { grid-template-columns: 1fr; }
  table.grid { display: block; overflow-x: auto; }
}
