/* Kiki Presenter OS — visual system derived from The Kiki Deal Show logo:
   neon rainbow on near-black, rounded bold display type, hot-pink primary. */
:root {
  --bg: #080B20; --bg2: #0E1333; --panel: #131A40; --panel2: #1A2252; --line: rgba(255,255,255,.08);
  --text: #F5F6FF; --muted: #A7ADD6; --dim: #6E76A8;
  --red: #FF3B3B; --orange: #FF8A00; --yellow: #FFE11A; --green: #22E36F; --cyan: #14D3FF; --blue: #3B7BFF; --violet: #9B4DFF; --pink: #FF2E93;
  --primary: var(--pink);
  --rainbow: linear-gradient(90deg, #FF3B3B, #FF8A00, #FFE11A, #22E36F, #14D3FF, #3B7BFF, #9B4DFF, #FF2E93);
  --ok: #22E36F; --warn: #FFB020; --bad: #FF4D5E;
  --r: 18px; --r-sm: 12px;
  --display: 'Fredoka', 'Plus Jakarta Sans', system-ui, sans-serif;
  --body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 15px; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; background: radial-gradient(1200px 600px at 10% -10%, rgba(155,77,255,.18), transparent 60%), radial-gradient(900px 500px at 110% 10%, rgba(255,46,147,.14), transparent 60%), var(--bg); background-attachment: fixed; }
a { color: var(--cyan); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; margin: 0 0 .4em; letter-spacing: .2px; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .7em; line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { display: grid; place-items: center; height: 100vh; } .boot img { width: min(320px, 70vw); border-radius: 16px; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .55; } }

/* Layout */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 14px; background: linear-gradient(180deg, #0B0F2A, #090C22); border-right: 1px solid var(--line); }
.side .logo { display: block; width: 100%; border-radius: 14px; margin-bottom: 18px; box-shadow: 0 0 30px rgba(255,46,147,.25); }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; margin: 2px 0; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 600; }
.nav a:hover { background: rgba(255,255,255,.05); color: var(--text); }
.nav a.on { background: linear-gradient(90deg, var(--pink), #FF5FAF); color: #fff; box-shadow: 0 6px 20px rgba(255,46,147,.35); }
.nav .ico { width: 22px; text-align: center; font-size: 1.05rem; }
.nav .soon { margin-left: auto; font-size: .62rem; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.08); color: var(--dim); }
.nav .count { margin-left: auto; background: var(--pink); color: #fff; font-size: .72rem; padding: 1px 7px; border-radius: 9px; }
.side .who { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.main { padding: 22px 26px 120px; max-width: 1280px; width: 100%; }
.top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.top .greet { flex: 1; min-width: 200px; }
.top .greet h1 { margin: 0; }
.top .greet .sub { color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-weight: 600; font-size: .9rem; }
.iconbtn { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; cursor: pointer; font-size: 1.1rem; }
.iconbtn .dot { position: absolute; top: -3px; right: -3px; background: var(--pink); color: #fff; font-size: .7rem; min-width: 19px; height: 19px; border-radius: 10px; display: grid; place-items: center; padding: 0 4px; font-weight: 700; }

/* Back link: sits just above the page title, in both apps */
.pback { display: inline-flex; align-items: center; gap: 2px; min-height: 40px; padding: 0 10px 0 0; margin: -4px 0 2px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: .9rem; letter-spacing: .2px; -webkit-tap-highlight-color: transparent; }
.pback:hover, .pback:active { color: var(--pink); }

/* Mobile */
.mtop { display: none; }
.tabbar { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 14px 14px calc(96px + var(--safe-b)); }
  .mtop { display: flex; align-items: center; gap: 10px; padding: 10px 14px; position: sticky; top: 0; z-index: 20; background: rgba(8,11,32,.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .mtop img { height: 34px; border-radius: 8px; }
  .mtop .sp { flex: 1; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(10,13,38,.96); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + var(--safe-b)); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 6px 0; color: var(--dim); text-decoration: none; font-size: .68rem; font-weight: 700; letter-spacing: .3px; }
  .tabbar a .ico { font-size: 1.3rem; }
  .tabbar a.on { color: var(--pink); }
  h1 { font-size: 1.45rem; }
  .top .pill.date { display: none; }
  .hide-m { display: none; }
}

/* Cards */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.card { background: linear-gradient(180deg, var(--panel), #10163A); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; position: relative; overflow: hidden; }
.card.glow::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: var(--rainbow); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; opacity: .8; }
.card.hot { background: linear-gradient(135deg, #3A0F5C 0%, #7A1460 55%, #C21F7A 100%); border-color: rgba(255,46,147,.4); }
.card.gold { background: linear-gradient(135deg, #3A2A05, #6B4A06); border-color: rgba(255,225,26,.35); }
.card.teal { background: linear-gradient(135deg, #062D3A, #0A4D5A); border-color: rgba(20,211,255,.3); }
.label { display: inline-block; font-family: var(--display); font-weight: 600; font-size: .78rem; letter-spacing: .8px; text-transform: uppercase; padding: 4px 10px; border-radius: 8px; background: rgba(0,0,0,.35); margin-bottom: 10px; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: .85rem; } .tiny { font-size: .75rem; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .between { justify-content: space-between; } .grow { flex: 1; }
.stack > * + * { margin-top: 12px; }
.hr { height: 1px; background: var(--line); margin: 14px 0; }
.empty { text-align: center; padding: 30px 14px; color: var(--muted); }
.price { font-family: var(--display); font-size: 1.9rem; font-weight: 700; }
.strike { text-decoration: line-through; color: var(--dim); }

/* Do now / next / later */
.donow { padding: 22px; }
.donow .big { font-family: var(--display); font-size: 1.6rem; font-weight: 700; line-height: 1.15; margin: 4px 0 8px; }
.timechip { font-family: var(--display); font-weight: 600; background: rgba(0,0,0,.3); padding: 4px 10px; border-radius: 8px; }
.list { display: grid; gap: 8px; }
.item { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.item .t { font-family: var(--display); font-weight: 600; min-width: 54px; color: var(--muted); }
.item .body { flex: 1; min-width: 0; }
.item .title { font-weight: 700; } .item .meta { font-size: .8rem; color: var(--muted); }
.item.done { opacity: .5; } .item.done .title { text-decoration: line-through; }
.item.now { border-color: var(--pink); background: rgba(255,46,147,.1); }
.item.clickable { cursor: pointer; } .item.clickable:hover { background: rgba(255,255,255,.06); }

/* Quick actions */
.qa { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
@media (max-width: 640px) { .qa { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.qa a, .qa button { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 16px 8px; border-radius: 16px; border: 1px solid var(--line); text-decoration: none; color: #fff; font-family: var(--display); font-weight: 600; font-size: .95rem; cursor: pointer; }
.qa .ico { font-size: 1.5rem; }
.qa .s { font-family: var(--body); font-size: .72rem; font-weight: 500; opacity: .85; }
.c-pink { background: linear-gradient(135deg, #FF2E93, #C0157A); } .c-violet { background: linear-gradient(135deg, #7A3CFF, #4A1FB0); } .c-blue { background: linear-gradient(135deg, #2F6BFF, #1740B8); }
.c-green { background: linear-gradient(135deg, #17B85A, #0C7A3C); } .c-gold { background: linear-gradient(135deg, #F2B705, #B07A00); } .c-teal { background: linear-gradient(135deg, #0FB5C9, #087485); }
.c-red { background: linear-gradient(135deg, #FF3B3B, #B3141E); } .c-grey { background: linear-gradient(135deg, #2A3160, #1A1F45); color: var(--muted) !important; }

/* Status chips */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 800; letter-spacing: .5px; padding: 5px 10px; border-radius: 999px; text-transform: uppercase; white-space: nowrap; }
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.ok { background: rgba(34,227,111,.14); color: var(--ok); } .chip.warn { background: rgba(255,176,32,.14); color: var(--warn); }
.chip.bad { background: rgba(255,77,94,.15); color: var(--bad); } .chip.info { background: rgba(20,211,255,.13); color: var(--cyan); } .chip.off { background: rgba(255,255,255,.07); color: var(--dim); }
.ready-banner { font-family: var(--display); font-size: 1.25rem; font-weight: 700; padding: 14px 16px; border-radius: 14px; text-align: center; letter-spacing: .5px; }
.ready-banner.ok { background: rgba(34,227,111,.15); color: var(--ok); border: 1px solid rgba(34,227,111,.4); }
.ready-banner.warn { background: rgba(255,176,32,.13); color: var(--warn); border: 1px solid rgba(255,176,32,.35); }
.ready-banner.bad { background: rgba(255,77,94,.13); color: var(--bad); border: 1px solid rgba(255,77,94,.4); }
.alert { padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255,176,32,.35); background: rgba(255,176,32,.08); color: #FFD58A; font-size: .88rem; }
.alert.bad { border-color: rgba(255,77,94,.4); background: rgba(255,77,94,.08); color: #FFB3BB; }
.alert.info { border-color: rgba(20,211,255,.3); background: rgba(20,211,255,.06); color: #BDEFFF; }

/* Forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; min-height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .08s, filter .15s; }
.btn:hover { filter: brightness(1.12); } .btn:active { transform: scale(.98); }
.btn.primary { background: linear-gradient(135deg, var(--pink), #D81B7C); border-color: transparent; color: #fff; box-shadow: 0 6px 20px rgba(255,46,147,.3); }
.btn.green { background: linear-gradient(135deg, #1FCB66, #0E8D45); color: #fff; border-color: transparent; }
.btn.amber { background: linear-gradient(135deg, #FFB020, #D67D00); color: #1a1000; border-color: transparent; }
.btn.red { background: linear-gradient(135deg, #FF4D5E, #B3141E); color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; } .btn.sm { padding: 7px 12px; min-height: 36px; font-size: .85rem; border-radius: 10px; }
.btn.block { width: 100%; } .btn[disabled] { opacity: .45; pointer-events: none; }
label.f { display: block; font-size: .8rem; font-weight: 700; color: var(--muted); margin: 0 0 6px; text-transform: uppercase; letter-spacing: .5px; }
.field { margin-bottom: 14px; }
input.i, select.i, textarea.i { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: #0B1030; color: var(--text); outline: none; font-size: 16px; }
input.i:focus, select.i:focus, textarea.i:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255,46,147,.2); }
textarea.i { min-height: 90px; resize: vertical; line-height: 1.45; }
.hint { font-size: .78rem; color: var(--dim); margin-top: 5px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; gap: 6px; align-items: center; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--line); cursor: pointer; font-size: .88rem; }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .6px; color: var(--dim); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.scroll-x { overflow-x: auto; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(3,5,18,.72); backdrop-filter: blur(4px); z-index: 50; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: min(620px, 100%); max-height: 90vh; overflow-y: auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
@media (max-width: 640px) { .modal-bg { place-items: end stretch; padding: 0; } .modal { border-radius: 20px 20px 0 0; max-height: 92vh; padding-bottom: calc(22px + var(--safe-b)); } }
@keyframes fade { from { opacity: 0; } }

/* Toast */
#toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(460px, 92vw); pointer-events: none; }
#toast .t { padding: 12px 16px; border-radius: 12px; background: #1C2458; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.4); font-weight: 600; animation: fade .2s; }
#toast .t.err { background: #4A0E1A; border-color: rgba(255,77,94,.5); } #toast .t.ok { background: #0C3A22; border-color: rgba(34,227,111,.45); }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .box { width: min(420px, 100%); }
.login img { width: 100%; border-radius: 18px; margin-bottom: 22px; box-shadow: 0 0 60px rgba(155,77,255,.3); }

/* Progress ring */
.ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--green) calc(var(--p) * 1%), rgba(255,255,255,.08) 0); }
.ring > div { width: 94px; height: 94px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; text-align: center; font-family: var(--display); font-size: 1.6rem; font-weight: 700; }
.ring small { display: block; font-family: var(--body); font-size: .62rem; color: var(--muted); font-weight: 600; }

/* Telecast */
.tc { position: fixed; inset: 0; z-index: 40; background: #000; color: #fff; display: flex; flex-direction: column; }
.tc.contrast { background: #000; } .tc.contrast .tc-line { color: #FFF; } .tc.contrast .tc-line.cur { color: #FFE11A; }
.tc-bar { flex: none; display: flex; gap: 8px; align-items: center; padding: 10px 12px calc(10px); background: #0A0A12; border-bottom: 1px solid #222; flex-wrap: wrap; }
.tc-bar .btn { min-height: 40px; padding: 8px 12px; }
.tc-facts { flex: none; display: flex; gap: 14px; overflow-x: auto; padding: 8px 14px; background: #10101C; border-bottom: 1px solid #222; font-size: .85rem; white-space: nowrap; }
.tc-facts b { color: var(--yellow); }
.tc-view { flex: 1; overflow-y: scroll; scroll-behavior: auto; padding: 40vh 7vw 60vh; }
.tc-view.mirror { transform: scaleX(-1); }
.tc-sec { font-family: var(--display); color: var(--pink); text-transform: uppercase; letter-spacing: 2px; margin: 1.4em 0 .5em; font-size: .55em; border-top: 2px solid #333; padding-top: .6em; }
.tc-line { line-height: 1.35; margin: 0 0 .6em; color: #8C8CA8; transition: color .2s; font-weight: 600; }
.tc-line.cur { color: #fff; }
.tc-line.flag { color: var(--warn) !important; }
.tc-guide { position: fixed; left: 0; right: 0; top: 40%; height: 0; border-top: 2px dashed rgba(255,46,147,.5); pointer-events: none; }
@media (max-width: 700px) { .tc-bar { gap: 5px; padding: 8px; } .tc-bar .small { display: none; } .tc-bar .btn { min-height: 36px; padding: 6px 10px; } .tc-bar .chip { font-size: .62rem; } }
.tc-count { position: fixed; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 30vw; color: var(--pink); background: rgba(0,0,0,.85); z-index: 45; }
.safe { position: fixed; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); z-index: 46; background: #14102E; border: 2px solid var(--pink); border-radius: 18px; padding: 16px; font-size: 1.05rem; box-shadow: 0 0 60px rgba(255,46,147,.4); }
.safe h3 { color: var(--pink); }
.safe .k { font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-top: 8px; }

video.preview, img.preview { width: 100%; max-height: 60vh; border-radius: 14px; background: #000; }
.seg { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); } .seg:last-child { border: 0; }
.seg .n { width: 26px; height: 26px; border-radius: 50%; background: var(--panel2); display: grid; place-items: center; font-size: .78rem; font-weight: 800; flex: none; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.tabs a { padding: 8px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); text-decoration: none; font-weight: 700; font-size: .85rem; white-space: nowrap; }
.tabs a.on { background: var(--pink); color: #fff; border-color: transparent; }
.notif { padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.notif.unread { border-color: rgba(255,46,147,.45); background: rgba(255,46,147,.07); }

/* Logo floats on the page: transparent PNG, no box, frame or shadow behind it */
.side .logo, .mtop img, .login img, .boot img, .k-stage img, .kiki-app .side .logo { border-radius: 0 !important; box-shadow: none !important; background: transparent !important; }
.side .logo { filter: drop-shadow(0 0 18px rgba(255,46,147,.25)); }
.login img { filter: drop-shadow(0 0 30px rgba(155,77,255,.25)); }
.mtop img { height: 38px; }
