/* Sports Mania admin — light, calm, generated-wallpaper backdrop */
:root { --red: #e11b23; --ink: #15151a; --ink-2: #4a4750; --mute: #7d7884; --bg: #f3f1f4; --panel: rgba(255,255,255,.82); --line: rgba(20,16,20,.1); --line-2: rgba(20,16,20,.18); --ok: #178a4c; --err: #b3121a; --info: #1e5fb3; --r: 14px; --side: 250px; --display: 'Barlow Condensed', sans-serif; --body: 'Manrope', system-ui, sans-serif; color-scheme: light; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body.adm { font-family: var(--body); font-size: 14.5px; line-height: 1.5; color: var(--ink); background: var(--bg); min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.aurora { position: fixed; inset: 0; z-index: -1; background: radial-gradient(40% 40% at 10% 10%, rgba(225,27,35,.14), transparent 70%), radial-gradient(35% 45% at 90% 20%, rgba(232,131,113,.18), transparent 70%), radial-gradient(45% 40% at 60% 100%, rgba(30,95,179,.10), transparent 70%), var(--bg); }
.aurora::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(20,16,20,.08) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent 80%); }
.ic { display: inline-flex; width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; }
.ic svg { width: 100%; height: 100%; }
.muted { color: var(--mute); }
.small { font-size: 12.5px; }
.ml-auto { margin-left: auto; }
.w0 { width: 1%; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.inline { display: inline-flex; gap: 6px; align-items: center; }
code { background: rgba(20,16,20,.06); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }

/* layout */
.side-toggle { position: absolute; opacity: 0; pointer-events: none; }
.side { position: fixed; top: 0; bottom: 0; left: 0; width: var(--side); background: #111114; color: #d8d3d6; display: flex; flex-direction: column; padding: 18px 14px; gap: 18px; z-index: 30; transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.side__brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px; color: #fff; }
.side__brand span { font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 20px; line-height: 1; display: flex; flex-direction: column; }
.side__brand small { font: 600 11px var(--body); letter-spacing: .1em; text-transform: uppercase; color: #8f8a8f; margin-top: 3px; }
.side__nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.side__nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-weight: 600; color: #bdb7bb; transition: background .2s, color .2s; position: relative; }
.side__nav a .ic { width: 20px; height: 20px; opacity: .85; }
.side__nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side__nav a.is-active { background: var(--red); color: #fff; }
.badge { margin-left: auto; background: #fff; color: var(--red); font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; }
.side__nav a.is-active .badge { background: #fff; }
.side__foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; }
.side__site { display: flex; align-items: center; gap: 8px; padding: 8px 12px; color: #bdb7bb; font-weight: 600; font-size: 13px; }
.side__site:hover { color: #fff; }
.side__user { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; }
.side__user:hover { background: rgba(255,255,255,.06); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 800; }
.side__user b { display: block; color: #fff; font-size: 13px; }
.side__user small { color: #8f8a8f; text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; }
.side__logout { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: none; border: 0; color: #bdb7bb; font-weight: 600; font-size: 13px; width: 100%; border-radius: 10px; }
.side__logout:hover { background: rgba(255,255,255,.06); color: #fff; }
.main { margin-left: var(--side); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px 28px; background: rgba(243,241,244,.8); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 26px; line-height: 1; }
.topbar__actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.burger { display: none; width: 40px; height: 40px; place-items: center; border-radius: 10px; cursor: pointer; }
.content { padding: 24px 28px 80px; width: min(1180px, 100%); }
.content--wide { width: 100%; }

/* panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; margin-bottom: 18px; backdrop-filter: blur(10px); box-shadow: 0 10px 30px -24px rgba(20,16,20,.4); }
.panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel > header h2 { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 20px; letter-spacing: .02em; }
.link { color: var(--red); font-weight: 700; font-size: 13px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cols .panel { margin-bottom: 0; }
.cols--2 { align-items: start; }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { display: flex; flex-direction: column; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); transition: transform .25s, box-shadow .25s; }
.kpi:hover { transform: translateY(-3px); box-shadow: 0 20px 30px -24px rgba(20,16,20,.5); }
.kpi b { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 40px; line-height: 1; color: var(--red); }
.kpi span { font-weight: 700; margin-top: 4px; }
.kpi small { color: var(--mute); font-size: 12px; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bars li { display: grid; grid-template-columns: 110px 1fr 30px; align-items: center; gap: 10px; font-size: 13px; }
.bars i { display: block; height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--red), #e88371); min-width: 4px; }
.bars b { text-align: right; }
.plain li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; align-items: center; }
.plain li:last-child { border-bottom: 0; }
.plain small { color: var(--mute); }
.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.tip { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .2s, transform .2s; }
.tip:hover { border-color: var(--red); transform: translateY(-2px); }
.tip .ic { width: 22px; height: 22px; color: var(--red); margin-bottom: 4px; }
.tip b { font-family: var(--display); text-transform: uppercase; font-size: 17px; }
.tip span { color: var(--mute); font-size: 12.5px; }
.check li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.check a { color: var(--red); font-weight: 700; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:hover td { background: rgba(255,255,255,.5); }
.tbl tr.is-new td { background: rgba(225,27,35,.05); }
.tbl a b { color: var(--ink); }
.tbl a:hover b { color: var(--red); }
.tbl small { display: block; color: var(--mute); }
.thumb { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--line); padding: 2px; }
.thumb--ph { display: block; background: rgba(20,16,20,.05); }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: rgba(20,16,20,.07); color: var(--ink-2); }
.chip--ok { background: rgba(23,138,76,.14); color: var(--ok); }
.chip--muted { opacity: .7; }
.chip--new { background: rgba(225,27,35,.14); color: var(--red); }
.chip--read { background: rgba(30,95,179,.14); color: var(--info); }
.chip--replied { background: rgba(23,138,76,.14); color: var(--ok); }
.chip--archived { opacity: .6; }
.drag { cursor: grab; color: var(--mute); display: inline-flex; }
tr.is-dragging td { opacity: .4; }
.searchrow, .pills { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.searchrow input { padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 10px; min-width: 240px; background: #fff; }
.pills a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-weight: 700; font-size: 13px; background: #fff; text-transform: capitalize; }
.pills a.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pills .sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 6px; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line-2); }
.tabs a { padding: 10px 14px; font-weight: 700; color: var(--mute); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.is-active { color: var(--red); border-color: var(--red); }
.dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 14px; font-size: 13.5px; margin-bottom: 16px; }
.dl dt { color: var(--mute); font-weight: 600; }
.dl dd { margin: 0; }
.dl a { color: var(--red); font-weight: 700; }
.message { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; white-space: pre-wrap; }
.message p { margin-bottom: 8px; }

/* forms */
.form { display: flex; flex-direction: column; gap: 0; }
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px 16px; }
.fld { display: flex; flex-direction: column; gap: 5px; grid-column: span 6; font-size: 13px; }
.fld--half { grid-column: span 3; } .fld--third { grid-column: span 2; } .fld--two-thirds { grid-column: span 4; }
.fld > span, .lbl { font-weight: 700; color: var(--ink-2); }
.lbl { display: block; margin-bottom: 5px; font-size: 13px; }
.fld input, .fld select, .fld textarea, .rte__area, .imgpick input, .searchrow input { padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; transition: border-color .2s, box-shadow .2s; }
.fld input:focus, .fld select:focus, .fld textarea:focus, .rte__area:focus, .imgpick input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(225,27,35,.15); }
.fld textarea { resize: vertical; min-height: 60px; }
.help { color: var(--mute); font-size: 12px; font-weight: 500; }
.fld--check { flex-direction: row; align-items: center; gap: 10px; padding-top: 22px; }
.fld--check input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--red); }
.fld--color .colorin { display: flex; gap: 8px; }
.fld--color input[type=color] { width: 44px; height: 42px; padding: 2px; border-radius: 10px; }
.group { grid-column: span 6; border: 1px solid var(--line-2); border-radius: 12px; padding: 14px 16px 16px; margin: 4px 0; background: rgba(255,255,255,.4); }
.group > legend { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 17px; padding: 0 8px; }
.group > .help { display: block; margin: -4px 0 10px; }
.group--list .list-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.list-item { border: 1px solid var(--line-2); border-radius: 10px; background: #fff; }
.list-item__bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: rgba(20,16,20,.03); border-radius: 10px 10px 0 0; font-size: 13px; }
.list-item__btns { margin-left: auto; display: flex; gap: 2px; }
.list-item__btns button { width: 30px; height: 30px; border: 0; background: none; border-radius: 8px; color: var(--mute); display: grid; place-items: center; }
.list-item__btns button:hover { background: rgba(20,16,20,.06); color: var(--ink); }
.list-item > .grid { padding: 12px; }
.list-item .group { background: rgba(20,16,20,.02); }
.rte { border: 1px solid var(--line-2); border-radius: 10px; background: #fff; overflow: hidden; }
.rte__bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: rgba(20,16,20,.03); }
.rte__bar button { border: 0; background: none; padding: 5px 9px; border-radius: 6px; font-weight: 700; font-size: 12.5px; color: var(--ink-2); }
.rte__bar button:hover { background: rgba(20,16,20,.08); }
.rte__area { min-height: 180px; border: 0; border-radius: 0; max-height: 60vh; overflow: auto; }
.rte__area:focus { box-shadow: none; }
.rte__area h2, .rte__area h3, .rte__area h4 { font-family: var(--display); text-transform: uppercase; margin: .8em 0 .3em; }
.rte__area ul { list-style: disc; padding-left: 1.4em; } .rte__area ol { list-style: decimal; padding-left: 1.4em; }
.rte__area a { color: var(--red); text-decoration: underline; }
.rte__area img { max-width: 100%; border-radius: 8px; }
.rte__area blockquote { border-left: 3px solid var(--red); margin: .6em 0; padding: 4px 12px; color: var(--ink-2); }
.rte.is-source .rte__area { display: none; }
.rte.is-source .rte__src { display: block !important; width: 100%; min-height: 200px; border: 0; padding: 12px; font-family: ui-monospace, monospace; font-size: 12.5px; }
.imgpick { display: flex; gap: 12px; align-items: flex-start; }
.imgpick__prev { width: 84px; height: 84px; flex: none; border: 1px solid var(--line-2); border-radius: 10px; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0/16px 16px; display: grid; place-items: center; overflow: hidden; color: var(--mute); }
.imgpick__prev img { width: 100%; height: 100%; object-fit: contain; }
.imgpick__ctl { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.imgpick__btns { display: flex; gap: 6px; flex-wrap: wrap; }
.imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.imgs__item { position: relative; width: 110px; height: 84px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); background: #fff; }
.imgs__item img { width: 100%; height: 100%; object-fit: cover; }
.imgs__item button { position: absolute; bottom: 4px; width: 24px; height: 24px; border: 0; border-radius: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 14px; line-height: 1; opacity: 0; transition: opacity .2s; }
.imgs__item:hover button { opacity: 1; }
.imgs__item [data-img-remove] { top: 4px; right: 4px; bottom: auto; }
.imgs__item [data-img-left] { left: 4px; } .imgs__item [data-img-right] { right: 4px; }
.savebar { position: sticky; bottom: 0; z-index: 10; display: flex; gap: 10px; align-items: center; padding: 14px 18px; margin: 4px -4px 0; background: rgba(243,241,244,.9); backdrop-filter: blur(10px); border-top: 1px solid var(--line-2); border-radius: 12px 12px 0 0; }
.savebar .is-dirty-note { color: var(--red); font-weight: 700; font-size: 13px; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font-weight: 700; font-size: 14px; transition: all .2s; white-space: nowrap; }
.btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn--primary { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 8px 20px -10px var(--red); }
.btn--primary:hover { border-color: var(--red); filter: brightness(1.05); }
.btn--ghost { background: transparent; }
.btn--danger { color: var(--err); border-color: rgba(179,18,26,.4); }
.btn--danger:hover { background: var(--err); color: #fff; border-color: var(--err); }
.btn--sm { padding: 7px 12px; font-size: 13px; }
.btn--full { width: 100%; justify-content: center; }
.copy { background: none; border: 0; padding: 0; color: var(--ink); font-weight: 700; font-size: 12.5px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.copy:hover { color: var(--red); }
.copy.is-done { color: var(--ok); }
.flash { padding: 12px 16px; border-radius: 10px; margin: 16px 28px 0; font-weight: 600; border: 1px solid; }
.content .flash, .login .flash { margin: 0 0 16px; }
.flash--ok { background: #e6f5ec; color: var(--ok); border-color: #b9e2c8; }
.flash--err { background: #fdeaea; color: var(--err); border-color: #f2b8bb; }
.flash--info { background: #e8f0fb; color: var(--info); border-color: #bcd2f0; }

/* media grid */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.mitem { margin: 0; position: relative; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.mitem > a { display: block; aspect-ratio: 4/3; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0/16px 16px; }
.mitem img { width: 100%; height: 100%; object-fit: contain; }
.mitem__file { display: grid; place-items: center; height: 100%; color: var(--mute); font-size: 12px; }
.mitem figcaption { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.mitem figcaption small { color: var(--mute); font-size: 11px; }
.mitem__del { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .2s; }
.mitem:hover .mitem__del { opacity: 1; }
.media-modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 20px; }
.media-modal[hidden] { display: none; }
.media-modal__panel { width: min(1000px, 100%); max-height: 90vh; background: var(--bg); border-radius: 16px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); }
.media-modal__panel header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); background: #fff; }
.media-modal__panel header input { margin-left: auto; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; }
.media-modal__grid { overflow: auto; padding: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.media-modal__grid button { border: 2px solid transparent; border-radius: 10px; background: #fff; padding: 0; aspect-ratio: 1; overflow: hidden; }
.media-modal__grid button:hover, .media-modal__grid button:focus { border-color: var(--red); outline: none; }
.media-modal__grid img { width: 100%; height: 100%; object-fit: cover; }
.media-modal__grid .empty { grid-column: 1/-1; color: var(--mute); text-align: center; padding: 30px; }
.confirm { border: 0; border-radius: 14px; padding: 22px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); max-width: 420px; }
.confirm::backdrop { background: rgba(0,0,0,.4); }
.confirm p { margin-bottom: 16px; font-weight: 600; }
.confirm menu { display: flex; justify-content: flex-end; gap: 8px; margin: 0; padding: 0; }

/* login */
.adm--login { display: grid; place-items: center; padding: 20px; }
.login { width: min(420px, 100%); background: rgba(255,255,255,.85); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 18px; padding: 34px 32px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 30px 60px -30px rgba(20,16,20,.5); }
.login img { filter: brightness(0); width: 140px; margin-bottom: 8px; }
.login h1 { font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 32px; line-height: 1; }
.login .form { gap: 12px; margin-top: 12px; }
.login .fld { grid-column: auto; }

@media (max-width: 1000px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .cols { grid-template-columns: 1fr; }
  .fld--half, .fld--third, .fld--two-thirds { grid-column: span 6; }
}
@media (max-width: 860px) {
  .side { transform: translateX(-100%); }
  .side-toggle:checked ~ .side { transform: none; box-shadow: 0 0 0 100vw rgba(0,0,0,.4); }
  .main { margin-left: 0; }
  .burger { display: grid; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
  .topbar h1 { font-size: 22px; }
  .tbl thead { display: none; }
  .tbl tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
  .tbl td { display: flex; gap: 10px; padding: 3px 0; border: 0; }
  .tbl td[data-label]::before { content: attr(data-label); color: var(--mute); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; min-width: 80px; }
  .tbl td.w0 { width: auto; }
  .kpi b { font-size: 32px; }
}
@media (pointer: coarse) { .btn, .imgs__item button, .list-item__btns button { min-height: 44px; } .imgs__item button, .mitem__del { opacity: 1; } }
