:root {
  --bg: #120a17; --side: #170e1f; --card: #1f1429; --card2: #2b1c38;
  --w: #fff; --t2: #baa8c7; --t3: #80708f;
  --oro: #e8c46a; --cera: #ffb859; --mor: #b44ce0; --mor9: #29083a;
  --rojo: #f2546a; --verde: #40bf80; --aviso: #faa826;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--w); font: 15px/1.45 Lato, system-ui, sans-serif; }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 900; margin: 0; }
h1 { font-size: 36px; line-height: 1.1; }
h2 { font-size: 22px; }
.kicker { font-weight: 900; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--cera); }
.muted { color: var(--t2); }
.error { color: var(--rojo); min-height: 1.2em; }
[hidden] { display: none !important; }

.btn { border: 0; border-radius: 999px; padding: 12px 18px; font: 900 14px Lato, sans-serif; background: var(--card2); color: var(--w); cursor: pointer; }
.btn.cera { background: var(--cera); color: var(--mor9); }
.btn.rojo { background: rgba(242, 84, 106, .16); color: var(--rojo); }
.btn:disabled { opacity: .5; cursor: default; }
.link { background: none; border: 0; color: var(--cera); font: 900 13px Lato, sans-serif; cursor: pointer; }
input, textarea, select { width: 100%; background: var(--card); color: var(--w); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 14px 16px; font: 15px Lato, sans-serif; }

.login { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.login-art { background: linear-gradient(160deg, #1f0530, #6b0f8e 55%, #ffad4d); display: grid; place-items: center; align-content: center; gap: 24px; padding: 40px; }
.login-art img { width: min(340px, 60%); }
.quote { font: italic 24px/1.3 Fraunces, serif; text-align: center; max-width: 480px; margin: 0; }
.login-form { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 40px max(40px, 8vw); max-width: 620px; }

.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: var(--side); padding: 26px 16px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; flex-direction: column; padding: 0 10px 22px; }
.brand strong { font: 900 26px Fraunces, serif; }
.side a { color: var(--t2); text-decoration: none; font-weight: 700; padding: 11px 12px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; }
.side a.on { background: var(--card2); color: var(--w); font-weight: 900; }
.count { background: var(--cera); color: var(--mor9); border-radius: 999px; padding: 1px 8px; font-size: 11px; }
.count:empty { display: none; }
.grow { flex: 1; }
.me { background: var(--card); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--t2); word-break: break-all; }
main { padding: 34px 40px 60px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.kpi { background: var(--card); border-radius: 20px; padding: 18px 20px; }
.kpi b { display: block; font: 900 44px/1.1 Fraunces, serif; }
.card { background: var(--card); border-radius: 22px; padding: 20px; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab { background: var(--card2); color: var(--t2); border: 0; border-radius: 999px; padding: 9px 16px; font: 900 13px Lato, sans-serif; cursor: pointer; }
.tab.on { background: var(--w); color: var(--mor9); }

.mod { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.tile { background: var(--card); border-radius: 18px; padding: 8px 8px 12px; cursor: pointer; border: 2px solid transparent; display: flex; flex-direction: column; gap: 6px; position: relative; }
.tile.sel { border-color: var(--cera); background: var(--card2); }
.tile video, .tile img.cover { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 12px; background: #000; }
.tile .who { font-weight: 900; font-size: 13px; }
.tile .when { color: var(--t3); font-size: 12px; }
.tile input[type=checkbox] { position: absolute; top: 14px; right: 14px; width: 20px; height: 20px; accent-color: var(--cera); }
.detail { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 12px; }
.detail video { width: 100%; max-height: 420px; border-radius: 16px; background: #000; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { border-radius: 999px; padding: 3px 10px; font: 900 11px Lato, sans-serif; background: rgba(64,191,128,.18); color: var(--verde); }
.badge.aviso { background: rgba(250,168,38,.18); color: var(--aviso); }
.badge.rojo { background: rgba(242,84,106,.18); color: var(--rojo); }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }
.empty { color: var(--t2); padding: 40px; text-align: center; }

.story { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 9/16; background: var(--card2); }
.story img, .story video { width: 100%; height: 100%; object-fit: cover; }
.story .top, .story .bottom { position: absolute; left: 10px; right: 10px; display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; font-weight: 900; }
.story .top { top: 10px; } .story .bottom { bottom: 10px; }
.pill { background: rgba(18,10,23,.65); border-radius: 999px; padding: 4px 10px; }

.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 20px; }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.06); }
.setting:first-of-type { border-top: 0; }
.setting small { display: block; color: var(--t2); font-size: 12px; }
.setting select { width: auto; padding: 8px 12px; }
.switch { appearance: none; width: 52px; height: 30px; border-radius: 999px; background: var(--card2); position: relative; cursor: pointer; flex: none; padding: 0; border: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--t3); transition: left .15s; }
.switch:checked { background: var(--cera); }
.switch:checked::after { left: 25px; background: var(--mor9); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--w); color: var(--mor9); font-weight: 900; padding: 12px 20px; border-radius: 999px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }

@media (max-width: 1100px) { .mod { grid-template-columns: 1fr; } .detail { position: static; } }
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-art { min-height: 260px; }
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; }
  .brand, .grow { display: none; }
  .mod { grid-template-columns: 1fr; }
  main { padding: 20px 16px; }
}
