/* WorkAutomation: dark glass. One stylesheet for the dashboard and the login page. */
:root {
  --bg: #07060c; --ink: #f3f2f8; --mut: #9a97ab; --dim: #6b6880; --line: rgba(255,255,255,.09);
  --glass: rgba(255,255,255,.045); --glass2: rgba(255,255,255,.08);
  --vio: #a78bfa; --vio2: #7c3aed; --cy: #4fd1c5; --ok: #34d399; --warn: #fbbf24; --bad: #f87171;
  --red: var(--bad); --amber: var(--warn); --green: var(--ok); --muted: var(--mut);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; min-height: 100vh; overflow-x: hidden; }
.blob { position: fixed; border-radius: 50%; filter: blur(90px); opacity: .5; z-index: 0; pointer-events: none; }
.b1 { width: 520px; height: 520px; background: #5b21b6; top: -160px; left: -120px; }
.b2 { width: 460px; height: 460px; background: #0e7490; bottom: -180px; right: -100px; }
.b3 { width: 340px; height: 340px; background: #9d174d; top: 40%; left: 45%; opacity: .3; }
a { color: var(--vio); }
h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
h2 { font-size: 18px; margin: 0 0 12px; letter-spacing: -.01em; }
h3 { font-size: 15px; margin: 0 0 8px; }
.mut, .muted { color: var(--mut); }
.small { font-size: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 12px; }
.spacer { flex: 1; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.dot.warn { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.dot.bad { background: var(--bad); box-shadow: 0 0 10px var(--bad); }
.dot.vio { background: var(--vio); box-shadow: 0 0 10px var(--vio); }
.dot.off { background: var(--dim); box-shadow: none; }

/* layout */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side { padding: 22px 16px; border-right: 1px solid var(--line); background: rgba(10,9,18,.5); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; margin: 0 6px 22px; }
.mark { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, var(--vio), var(--cy)); box-shadow: 0 0 22px rgba(167,139,250,.55), inset 0 1px 0 rgba(255,255,255,.5); display: grid; place-items: center; flex: none; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; color: var(--mut); text-decoration: none; font-weight: 500; cursor: pointer; }
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { color: var(--ink); background: var(--glass); }
.nav a.on { color: #fff; background: var(--glass2); box-shadow: inset 0 0 0 1px var(--line), 0 0 24px rgba(167,139,250,.15); }
.badge { margin-left: auto; font: 700 11px var(--mono); background: rgba(251,191,36,.15); color: var(--warn); padding: 1px 7px; border-radius: 999px; }
.sidefoot { margin-top: auto; padding: 12px; border-radius: 14px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; color: var(--mut); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.link { background: none; border: 0; color: var(--vio); font: inherit; cursor: pointer; padding: 0; margin-left: auto; }
main { padding: 26px 30px 40px; min-width: 0; }
.mobilebar { display: none; }
.top { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.sub { color: var(--mut); font-size: 13px; }
.run { margin-left: auto; display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 999px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(20px); cursor: pointer; color: var(--ink); font-size: 14px; }
.tog { appearance: none; width: 52px; height: 30px; border-radius: 999px; background: rgba(255,255,255,.12); position: relative; border: 0; padding: 0; margin: 0; cursor: pointer; transition: background .2s; }
.tog::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .2s; }
.tog:checked { background: linear-gradient(135deg, #34d399, #0ea5e9); box-shadow: 0 0 18px rgba(52,211,153,.45); }
.tog:checked::after { left: 25px; }

/* glass */
.card { position: relative; border-radius: 22px; padding: 18px; background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.025)); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 0 0 1px var(--line), 0 20px 50px -20px rgba(0,0,0,.6); backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px); min-width: 0; margin-bottom: 16px; }
.grid .card { margin-bottom: 0; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.c3 { grid-column: span 3; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c12 { grid-column: span 12; }
.lab { font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); display: flex; align-items: center; gap: 8px; }
.lab .r { margin-left: auto; letter-spacing: .04em; }
.lab .warn, .warn-t { color: var(--warn); }
.big { font: 700 40px/1 var(--mono); letter-spacing: -.03em; margin-top: 12px; }
.big small { font-size: 15px; color: var(--mut); font-weight: 500; margin-left: 6px; }
.chips { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.chip, .tag { display: inline-flex; align-items: center; gap: 6px; font: 600 11px var(--mono); padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--mut); white-space: nowrap; }
.chip.ok, .tag.ok { background: rgba(52,211,153,.12); color: var(--ok); }
.chip.warn, .tag.warn { background: rgba(251,191,36,.12); color: var(--warn); }
.chip.bad, .tag.bad { background: rgba(248,113,113,.12); color: var(--bad); }
.chip.vio, .tag.blue { background: rgba(167,139,250,.14); color: var(--vio); }

/* buttons and fields */
.b, button.pill, a.pill { font: 600 13px Inter, sans-serif; padding: 8px 14px; border-radius: 999px; background: var(--glass2); border: 0; box-shadow: inset 0 0 0 1px var(--line); color: #fff; cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.b:hover, button.pill:hover { background: rgba(255,255,255,.13); }
.b.p, button.primary { background: linear-gradient(135deg, var(--vio), var(--vio2)); box-shadow: 0 0 16px rgba(167,139,250,.45), inset 0 1px 0 rgba(255,255,255,.35); }
.b.danger, button.danger { background: rgba(248,113,113,.12); color: var(--bad); box-shadow: inset 0 0 0 1px rgba(248,113,113,.25); }
.b.sm { padding: 5px 10px; font-size: 12px; }
button:disabled { opacity: .45; cursor: default; }
input, select, textarea { font: inherit; border: 0; border-radius: 12px; padding: 8px 11px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
select option { background: #15131f; }
textarea { width: 100%; min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: inset 0 0 0 1px var(--vio), 0 0 0 3px rgba(167,139,250,.2); }
input[type=checkbox]:not(.tog) { width: 18px; height: 18px; accent-color: var(--vio); padding: 0; box-shadow: none; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--mut); }
.toolbar { margin-bottom: 16px; }

/* overview */
.next { display: flex; gap: 16px; align-items: center; margin-top: 14px; min-width: 0; }
.next .thumb { width: 92px; height: 116px; border-radius: 16px; flex: none; overflow: hidden; background: linear-gradient(160deg, #f472b6, #7c3aed 55%, #0ea5e9); box-shadow: 0 10px 30px rgba(124,58,237,.45); }
.next .thumb img, .next .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.next h3 { margin: 0 0 4px; font-size: 16px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.next p { margin: 0; color: var(--mut); font-size: 13px; }
.count { font: 700 30px var(--mono); margin-top: 10px; background: linear-gradient(90deg, #fff, var(--vio)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.empty { color: var(--mut); font-size: 13px; padding: 14px 0; }
.screens { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 14px; }
.mini { display: flex; flex-direction: column; gap: 8px; cursor: pointer; min-width: 0; }
.mini .scr { aspect-ratio: 9 / 19; border-radius: 18px; background: #0d0c14; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 0 0 4px rgba(255,255,255,.03), 0 14px 30px -12px rgba(0,0,0,.7); overflow: hidden; display: grid; place-items: center; position: relative; }
.mini .scr img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini .scr .ph { color: var(--dim); font-size: 11px; padding: 10px; text-align: center; }
.mini.busy .scr { box-shadow: inset 0 0 0 2px var(--vio), 0 0 22px rgba(167,139,250,.45); }
.mini .nm { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; min-width: 0; }
.mini .nm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.ai { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: rgba(251,191,36,.06); box-shadow: inset 0 0 0 1px rgba(251,191,36,.18); flex-wrap: wrap; }
.ai .shot { width: 44px; height: 92px; align-self: flex-start; border-radius: 8px; background: #111; flex: none; overflow: hidden; display: grid; place-items: center; color: var(--warn); font-weight: 800; }
.ai .shot img { width: 100%; height: 100%; object-fit: cover; }
.ai .tx { min-width: 0; flex: 1; }
.ai b { display: block; font-size: 13px; }
.ai small { color: var(--mut); font-size: 12px; display: block; }
.ai .btns { display: flex; gap: 6px; flex-wrap: wrap; flex-basis: 100%; padding-left: 56px; }
.tl { margin-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.tr { display: grid; grid-template-columns: 52px 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 6px; border-radius: 12px; }
.tr:nth-child(odd) { background: rgba(255,255,255,.025); }
.tr time { font: 600 12px var(--mono); color: var(--mut); }
.tr .s { font: 600 11px var(--mono); color: var(--mut); white-space: nowrap; }
.tr .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr.done { opacity: .5; }
.bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: end; height: 150px; margin-top: 16px; }
.barc { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar { width: 100%; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, var(--cy), rgba(79,209,197,.15)); box-shadow: 0 0 14px rgba(79,209,197,.25); min-height: 4px; }
.bar.t { background: linear-gradient(180deg, var(--vio), rgba(167,139,250,.15)); box-shadow: 0 0 14px rgba(167,139,250,.35); }
.barc span { font: 500 11px var(--mono); color: var(--dim); }
.barc b { font: 700 12px var(--mono); }
.pi { width: 22px; height: 22px; border-radius: 7px; display: inline-grid; place-items: center; font: 700 9px Inter, sans-serif; color: #fff; flex: none; }
.pi.instagram { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.pi.tiktok, .pi.x { background: #111; box-shadow: inset 0 0 0 1px #333; }
.pi.facebook { background: #1877f2; } .pi.linkedin { background: #0a66c2; } .pi.reddit { background: #ff4500; } .pi.quora { background: #b92b27; }

/* phones tab */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tile { border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.025)); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 0 0 1px var(--line), 0 20px 50px -20px rgba(0,0,0,.6); backdrop-filter: blur(26px); }
.tile .screen { margin: 12px 12px 0; border-radius: 16px; background: #0d0c14; aspect-ratio: 9 / 19; display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.tile .screen img { width: 100%; height: 100%; object-fit: contain; }
.tile .screen .ph { color: var(--dim); font-size: 13px; padding: 16px; text-align: center; }
.tile .info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.tile .name { font-weight: 700; font-size: 15px; }
.tile input { width: 90px; }

/* banners */
.banner { border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; box-shadow: inset 0 0 0 1px var(--line); }
.banner.warn { background: rgba(251,191,36,.08); color: var(--warn); }
.banner.bad { background: rgba(248,113,113,.08); color: var(--bad); }
.banner.info { background: rgba(167,139,250,.08); color: var(--vio); }

/* content */
.acc { border-radius: 16px; padding: 14px; margin-bottom: 12px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line); }
.acc-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.posts { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.post { width: 210px; flex: 0 0 auto; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line); }
.post .thumb { height: 140px; background: #0d0c14; display: flex; align-items: center; justify-content: center; }
.post .thumb img, .post .thumb video { width: 100%; height: 100%; object-fit: cover; }
.post .body { padding: 9px 10px; display: flex; flex-direction: column; gap: 7px; font-size: 12px; }
.post .cap { max-height: 54px; overflow: hidden; white-space: pre-wrap; color: var(--mut); }
.post .acts { display: flex; flex-wrap: wrap; gap: 4px; }
.post .acts .b { padding: 4px 9px; font-size: 11px; }
.add { display: grid; grid-template-columns: 1fr 2fr auto; gap: 10px; align-items: end; margin-top: 12px; }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.cal .dh { font: 600 11px var(--mono); color: var(--dim); text-align: center; padding: 4px 0; }
.cal .d { min-height: 74px; border-radius: 12px; padding: 7px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal .d.out { opacity: .35; }
.cal .d.today { box-shadow: inset 0 0 0 1px var(--vio), 0 0 18px rgba(167,139,250,.25); }
.cal .d.sel { background: rgba(167,139,250,.12); }
.cal .d .n { font: 700 12px var(--mono); color: var(--mut); }
.cal .d .c { font: 700 11px var(--mono); padding: 2px 6px; border-radius: 999px; align-self: flex-start; }
.cal .d .c.p { background: rgba(79,209,197,.14); color: var(--cy); }
.cal .d .c.q { background: rgba(167,139,250,.14); color: var(--vio); }

/* history */
.hist { display: flex; flex-direction: column; gap: 16px; }
.hday h3 { font: 600 12px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .1em; margin: 0 0 8px; }
.hrow { display: grid; grid-template-columns: 52px 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; border-radius: 14px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 6px; }
.hrow .th { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: #0d0c14; }
.hrow .th img, .hrow .th video { width: 100%; height: 100%; object-fit: cover; }
.hrow .cp { color: var(--mut); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* tables */
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font: 600 11px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
td input[type=number] { width: 64px; } td input[type=time] { width: 110px; }

/* dialogs */
dialog { border: 0; border-radius: 24px; padding: 22px; max-width: min(780px, 94vw); width: 100%; color: var(--ink); background: rgba(22,20,34,.92); backdrop-filter: blur(30px); box-shadow: inset 0 0 0 1px var(--line), 0 30px 80px rgba(0,0,0,.6); }
dialog.wide { max-width: min(1000px, 96vw); }
dialog::backdrop { background: rgba(4,3,8,.6); backdrop-filter: blur(6px); }
.live { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.frame { border-radius: 28px; padding: 10px; background: #0d0c14; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 0 40px rgba(167,139,250,.2); display: flex; justify-content: center; }
.frame img { max-width: 100%; max-height: 76vh; object-fit: contain; border-radius: 20px; cursor: crosshair; display: block; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: rgba(30,27,45,.95); box-shadow: inset 0 0 0 1px var(--line), 0 10px 30px rgba(0,0,0,.5); color: #fff; padding: 10px 18px; border-radius: 999px; z-index: 100; max-width: 90vw; }
.errs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.errs a { display: block; font-size: 11px; color: var(--mut); text-decoration: none; word-break: break-all; }
.errs img { width: 100%; border-radius: 12px; background: #111; aspect-ratio: 9/19; object-fit: contain; box-shadow: inset 0 0 0 1px var(--line); }
ol.steps { padding-left: 18px; color: var(--mut); } ol.steps li { margin-bottom: 6px; }
code { background: rgba(255,255,255,.08); border-radius: 6px; padding: 1px 5px; font: 12px var(--mono); }
.login { max-width: 380px; margin: 16vh auto; position: relative; z-index: 1; }

@media (max-width: 1100px) { .c3 { grid-column: span 6; } .c5, .c7 { grid-column: span 12; } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; transform: translateX(-105%); transition: transform .25s; }
  .side.open { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.6); }
  main { padding: 14px max(16px, env(safe-area-inset-right)) 40px max(16px, env(safe-area-inset-left)); }
  .mobilebar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 16px; border-radius: 18px; background: rgba(20,18,32,.6); backdrop-filter: blur(20px); box-shadow: inset 0 0 0 1px var(--line); position: sticky; top: 10px; z-index: 10; }
  .mobilebar .brand { margin: 0; } .mobilebar .b { margin-left: auto; }
  .run { margin-left: 0; }
  .c6 { grid-column: span 12; }
  .screens { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
  .live { grid-template-columns: 1fr; }
  .add { grid-template-columns: 1fr; }
  .cal .d { min-height: 54px; padding: 5px; }
  .hrow { grid-template-columns: 44px 44px minmax(0, 1fr); } .hrow .s { display: none; } .hrow .th { width: 44px; height: 44px; }
}

.pairqr{background:#fff;border-radius:16px;padding:14px;width:min(240px,70vw);margin:6px auto 14px}
.pairqr svg{display:block;width:100%;height:auto}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;word-break:break-all}
.pairpage{max-width:520px;margin:0 auto;padding:28px max(16px,env(safe-area-inset-left)) 40px max(16px,env(safe-area-inset-right))}
.pairpage h1{margin:14px 0 10px}
.pairpage .steps li{margin:0 0 16px}
.pairpage .steps .b{display:inline-block;margin-bottom:6px;text-decoration:none}

.libgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px}
.libitem{background:var(--card,rgba(255,255,255,.05));border:1px solid var(--line,rgba(255,255,255,.08));border-radius:16px;padding:10px;display:flex;flex-direction:column;gap:8px;min-width:0}
.libpic{position:relative;aspect-ratio:1;border-radius:12px;overflow:hidden;background:rgba(0,0,0,.3)}
.libpic img,.libpic video{width:100%;height:100%;object-fit:cover;display:block}
.libpic .badge{position:absolute;top:8px;right:8px}
.libitem .cp{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chipsel{display:inline-flex;flex-direction:row;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;border:1px solid var(--line,rgba(255,255,255,.12));cursor:pointer}
#libDlgBody{display:flex;flex-direction:column;gap:10px;max-height:60vh;overflow:auto}
