:root { --brand: #1bb2ad; --brand-dark: #0f7f7b; --ink: #17302e; --muted: #667876; --line: #e1e8e7; --bg: #f4f7f7; --side: #0c2e2c; }
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Cairo', system-ui, sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; }
a { color: var(--brand-dark); text-decoration: none; }
h1 { font-size: 1.6rem; margin: 0; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
h2 { font-size: 1.1rem; margin: 0 0 .8rem; }
.muted { color: var(--muted); } .small { font-size: .9rem; } .warn { color: #b45309; font-weight: 700; }
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--side); color: #cfe3e1; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 1rem .8rem; }
.side-brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-weight: 800; padding: .3rem .5rem 1.2rem; }
.side-brand img { height: 42px; }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.side nav a { color: #cfe3e1; padding: .55rem .8rem; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; }
.side nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side nav a.on { background: var(--brand); color: #fff; }
.side nav b { background: #f59e0b; color: #fff; font-size: .75rem; border-radius: 999px; padding: 0 .55em; }
.side-sep { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; opacity: .5; padding: 1rem .8rem .3rem; }
.side-foot { border-top: 1px solid rgba(255,255,255,.1); padding-top: .8rem; display: flex; flex-direction: column; gap: .3rem; }
.side-foot a, .side-foot button { color: #cfe3e1; background: none; border: 0; font: inherit; text-align: start; padding: .3rem .8rem; cursor: pointer; }
.side-foot button:hover, .side-foot a:hover { color: #fff; }
.main { padding: 1.6rem 2rem 4rem; min-width: 0; }
.page-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.page-top .btn + .btn { margin-inline-start: .4rem; }
.back { color: var(--muted); }
.btn { display: inline-flex; align-items: center; gap: .3em; background: var(--brand); color: #fff; border: 0; border-radius: 8px; padding: .55em 1.1em; font: inherit; font-weight: 700; cursor: pointer; }
.btn:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--brand-dark); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: #eef7f6; }
.btn-sm { padding: .35em .8em; font-size: .9rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-wa { background: #25d366; } .btn-wa:hover { background: #1da851; }
.lnk { background: none; border: 0; color: var(--brand-dark); font: inherit; cursor: pointer; padding: 0; }
.danger { color: #c62828 !important; }
.inline { display: inline; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.4rem; margin-bottom: 1.2rem; overflow-x: auto; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .6rem; }
.panel-head h2 { margin: 0; }
.cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.2rem; align-items: start; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; color: var(--ink); display: flex; flex-direction: column; }
.kpi span { color: var(--muted); font-size: .88rem; }
.kpi strong { font-size: 1.9rem; line-height: 1.2; }
.kpi strong.sm { font-size: 1.1rem; margin-top: .4rem; }
.kpi.hl { background: var(--brand); color: #fff; border-color: var(--brand); }
.kpi.hl span { color: #e3f7f6; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: start; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: .5rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: .65rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr.link { cursor: pointer; } .tbl tr.link:hover td { background: #f6fbfb; }
.tbl tr.unread td:first-child { box-shadow: inset 3px 0 0 #f59e0b; }
.tbl tr.dim td { opacity: .55; }
.tbl small { color: var(--muted); }
.acts { white-space: nowrap; } .acts > * + * { margin-inline-start: .8rem; }
.mini { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.tag { display: inline-block; font-size: .75rem; background: #eef7f6; color: var(--brand-dark); border-radius: 6px; padding: 0 .5em; font-weight: 700; }
.tag-dark { background: var(--ink); color: #fff; }
.st { display: inline-block; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: .1em .7em; white-space: nowrap; }
.st-new { background: #fff4d6; color: #92600a; } .st-contacted { background: #e0ecff; color: #1d4ed8; }
.st-confirmed { background: #dcf5ea; color: #146c43; } .st-paid { background: #0f7f7b; color: #fff; }
.st-cancelled { background: #f1f1f1; color: #777; text-decoration: line-through; }
.st-published { background: #dcf5ea; color: #146c43; } .st-draft { background: #fff4d6; color: #92600a; } .st-archived { background: #f1f1f1; color: #777; }
.bar { height: 6px; background: #eef2f2; border-radius: 6px; margin-top: .3rem; overflow: hidden; } .bar i { display: block; height: 100%; background: var(--brand); }
.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.toolbar input[name=q] { flex: 1; min-width: 220px; }
input, select, textarea { font: inherit; padding: .5em .75em; border: 1px solid #ccd9d7; border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
.toolbar input, .toolbar select { width: auto; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
input[type=checkbox] { width: auto; }
.fgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem 1rem; }
.fgrid label { display: flex; flex-direction: column; gap: .25rem; font-weight: 600; font-size: .9rem; }
.fgrid label small { color: var(--muted); font-weight: 400; }
.fgrid label.check, .toolbar .check { flex-direction: row; align-items: center; gap: .5rem; align-self: end; padding-bottom: .5rem; }
.fsec { grid-column: 1 / -1; margin: .8rem 0 0; font-size: .95rem; color: var(--brand-dark); border-bottom: 1px solid var(--line); padding-bottom: .3rem; }
.fsec:first-of-type { margin-top: 0; }
.span1 { grid-column: span 1; } .span2 { grid-column: span 2; } .span4 { grid-column: 1 / -1; }
.factions { display: flex; gap: .6rem; margin-top: .4rem; }
.thumb-row { display: flex; align-items: center; gap: 1rem; margin-bottom: .4rem; }
.thumb { height: 110px; border-radius: 8px; }
.narrow-form { max-width: 640px; }
.alert { padding: .8rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-weight: 600; }
.alert-success { background: #e6f7ef; color: #146c43; } .alert-error { background: #fdecec; color: #a12626; }
.empty { color: var(--muted); text-align: center; padding: 2rem 1rem; }
blockquote { margin: 0; background: #f6fbfb; border-inline-start: 3px solid var(--brand); padding: .8rem 1rem; border-radius: 6px; white-space: pre-wrap; }
.msg.unread { border-inline-start: 4px solid #f59e0b; }
.pre { white-space: pre-wrap; margin: .4rem 0 0; }
.login-page { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #0c2e2c, #1bb2ad); }
.login { background: #fff; padding: 2.2rem; border-radius: 16px; width: min(400px, 92vw); display: flex; flex-direction: column; gap: .9rem; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.login label { display: flex; flex-direction: column; gap: .25rem; font-weight: 600; }
.login h1 { justify-content: center; }
.login-logo { height: 80px; margin: 0 auto; }
.login a { text-align: center; }
@media (max-width: 1000px) { .cols { grid-template-columns: 1fr; } .fgrid { grid-template-columns: 1fr 1fr; } .span2 { grid-column: 1 / -1; } }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .side nav { flex-direction: row; flex-wrap: wrap; }
  .side-sep { display: none; }
  .main { padding: 1rem; }
  .fgrid { grid-template-columns: 1fr; }
}

/* ================= v2: luminous dashboard ================= */
:root { --grad: linear-gradient(120deg, #1bb2ad 0%, #3fd4c9 35%, #f4dca3 70%, #d9b46a 100%); --night: #04181a; --ease: cubic-bezier(.22,1,.36,1); }
body { background: radial-gradient(1200px 600px at 100% -10%, rgba(27,178,173,.12), transparent 60%), radial-gradient(900px 500px at 30% 110%, rgba(217,180,106,.12), transparent 60%), #f3f7f6; background-attachment: fixed; }
.side { background: linear-gradient(180deg, #072528 0%, #04181a 100%); overflow: hidden; isolation: isolate; }
.side::before { content: ''; position: absolute; width: 320px; height: 320px; top: -120px; left: -120px; border-radius: 50%; background: #0f8c87; filter: blur(80px); opacity: .45; z-index: -1; animation: sdrift 16s ease-in-out infinite alternate; }
.side::after { content: ''; position: absolute; width: 260px; height: 260px; bottom: -100px; right: -120px; border-radius: 50%; background: #b8893a; filter: blur(80px); opacity: .3; z-index: -1; animation: sdrift 20s ease-in-out infinite alternate-reverse; }
@keyframes sdrift { to { transform: translate(40px, 60px) scale(1.2); } }
.side nav a { transition: background .3s, color .3s, transform .3s var(--ease); }
.side nav a:hover { transform: translateX(4px); }
.side nav a.on { background: var(--grad); color: #04211f; font-weight: 700; box-shadow: 0 8px 24px -10px rgba(27,178,173,.9); }
.side nav b { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.25); animation: bpulse 2s infinite; }
@keyframes bpulse { 50% { box-shadow: 0 0 0 6px rgba(245,158,11,0); } }
.main { animation: mainin .6s var(--ease); }
@keyframes mainin { from { opacity: 0; transform: translateY(12px); } }
h1 { font-weight: 800; letter-spacing: -.01em; }
.btn { background: var(--grad); background-size: 200% auto; color: #04211f; border-radius: 999px; padding: .6em 1.25em; box-shadow: 0 8px 22px -10px rgba(27,178,173,.8); transition: background-position .5s var(--ease), transform .3s var(--ease), box-shadow .3s; }
.btn:hover { background: var(--grad); background-size: 200% auto; background-position: right center; transform: translateY(-2px); }
.btn-ghost { background: rgba(255,255,255,.8); color: #0f7f7b; box-shadow: inset 0 0 0 1px rgba(13,43,42,.12); }
.btn-ghost:hover { background: #fff; box-shadow: inset 0 0 0 1px #1bb2ad; }
.btn-wa { background: linear-gradient(120deg, #25d366, #1faa53); color: #fff; }
.panel { background: rgba(255,255,255,.82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.9); border-radius: 18px; box-shadow: 0 10px 40px -18px rgba(4,24,26,.25); }
.kpi { position: relative; overflow: hidden; border-radius: 18px; border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.82); backdrop-filter: blur(16px); box-shadow: 0 10px 40px -18px rgba(4,24,26,.25); transition: transform .4s var(--ease), box-shadow .4s; animation: kpiin .7s var(--ease) backwards; }
.kpi:nth-child(2) { animation-delay: .06s; } .kpi:nth-child(3) { animation-delay: .12s; } .kpi:nth-child(4) { animation-delay: .18s; } .kpi:nth-child(5) { animation-delay: .24s; } .kpi:nth-child(6) { animation-delay: .3s; }
@keyframes kpiin { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.kpi::after { content: ''; position: absolute; inset: auto -30% -60% auto; width: 140px; height: 140px; border-radius: 50%; background: var(--grad); opacity: .12; filter: blur(10px); transition: opacity .4s; }
.kpi:hover { transform: translateY(-4px); box-shadow: 0 20px 50px -20px rgba(4,24,26,.35); }
.kpi:hover::after { opacity: .3; }
.kpi strong { font-weight: 900; }
.kpi.hl { background: linear-gradient(135deg, #072528, #0f7f7b); border-color: transparent; }
.kpi.hl strong { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kpi.hl::after { opacity: .35; }
.tbl tr.link:hover td { background: rgba(27,178,173,.06); }
.st-paid { background: var(--grad); color: #04211f; }
.bar i { background: var(--grad); }
.fsec { color: #0f7f7b; display: flex; align-items: center; gap: .5rem; }
.fsec::before { content: ''; width: 5px; height: 1em; border-radius: 3px; background: var(--grad); }
input:focus, select:focus, textarea:focus { outline: none; border-color: #1bb2ad; box-shadow: 0 0 0 4px rgba(27,178,173,.16); }
.alert { animation: mainin .5s var(--ease); }
.login-page { position: relative; overflow: hidden; background: #04181a; isolation: isolate; }
.login-page::before, .login-page::after { content: ''; position: absolute; border-radius: 50%; filter: blur(90px); z-index: -1; animation: sdrift 14s ease-in-out infinite alternate; }
.login-page::before { width: 60vw; height: 60vw; background: #0f8c87; top: -25%; left: -15%; opacity: .55; }
.login-page::after { width: 45vw; height: 45vw; background: #b8893a; bottom: -25%; right: -10%; opacity: .35; animation-direction: alternate-reverse; }
.login { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(24px) saturate(1.3); -webkit-backdrop-filter: blur(24px) saturate(1.3); color: #fff; animation: kpiin .8s var(--ease); }
.login h1 { color: #fff; }
.login label { color: #cfe3e1; }
.login input { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: #fff; }
.login a { color: #9fbcb9; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
