/* ============================================================
   Acceltor TimeTrack dashboard
   Brand: near-black violet surfaces, Acceltor violet #5E28F5,
   bold geometric headings, pill buttons (matches acceltor.net)
   ============================================================ */
:root {
  --bg:        #0B0912;
  --bg-2:      #110E1A;
  --panel:     #16121F;
  --panel-2:   #1F1A2B;
  --field:     #1A1524;
  --line:      #2A2338;
  --line-2:    #362D48;
  --text:      #F4F2FA;
  --muted:     #9C93B0;
  --muted-2:   #6B6380;
  --accent:    #5E28F5;
  --accent-2:  #7A4CFF;
  --accent-3:  #A88BFF;
  --accent-soft: rgba(94, 40, 245, .14);
  --glow:      0 8px 28px rgba(94, 40, 245, .35);
  --green:     #3FCF82;
  --amber:     #F5B43B;
  --red:       #F06A77;
  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 18px 50px rgba(0, 0, 0, .45);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Outfit", "Inter", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-3); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.01em; }
::selection { background: var(--accent); color: #fff; }

/* ---------- Brand mark ---------- */
.brand { display: flex; align-items: center; gap: 11px; }
.brand svg { width: 34px; height: 34px; flex: 0 0 auto; }
.brand .words { display: flex; flex-direction: column; line-height: 1.1; }
.brand .words b { font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: .01em; }
.brand .words small { font-size: 11px; color: var(--accent-3); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-top: 2px; }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(700px 420px at 15% 10%, rgba(94,40,245,.28), transparent 60%),
    radial-gradient(600px 400px at 90% 90%, rgba(122,76,255,.16), transparent 60%),
    var(--bg);
}
.login-card {
  width: 100%; max-width: 410px; background: rgba(22,18,31,.92);
  border: 1px solid var(--line); border-radius: 20px;
  padding: 36px 34px; box-shadow: var(--shadow); backdrop-filter: blur(10px);
}
.login-card .brand { margin-bottom: 28px; }
.login-card h1 { font-size: 26px; font-weight: 700; }
.login-card p.sub { color: var(--muted); font-size: 14px; margin: 4px 0 8px; }
.login-card .forgot { display: block; text-align: center; margin-top: 16px; font-size: 13px; }

/* ---------- Forms ---------- */
label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin: 16px 0 7px; }
input, select, textarea {
  width: 100%; background: var(--field); border: 1px solid var(--line);
  color: var(--text); padding: 11px 14px; border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
  color-scheme: dark;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); padding: 0; }
input[type=file] { padding: 9px 12px; }
.check { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 13px; margin-top: 18px; cursor: pointer; }
.check input { flex: 0 0 auto; }
.hint { font-size: 12px; color: var(--muted); margin-top: 14px; line-height: 1.6; }

/* ---------- Buttons (pill, like acceltor.net) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; border: 0; padding: 11px 22px; border-radius: 999px;
  font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: transform .15s, box-shadow .15s, opacity .15s, background .15s;
}
.btn:hover { box-shadow: var(--glow); transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.btn.block { width: 100%; margin-top: 24px; padding: 13px; }
.btn.lg { padding: 14px 34px; font-size: 15px; min-width: 200px; }
.btn.ghost { background: transparent; border: 1px solid var(--line-2); color: var(--text); }
.btn.ghost:hover { background: var(--panel-2); box-shadow: none; border-color: var(--accent); }
.btn.danger { background: linear-gradient(135deg, #E04B5B, var(--red)); }
.btn.danger:hover { box-shadow: 0 8px 26px rgba(240,106,119,.3); }
.btn.sm { padding: 7px 14px; font-size: 12px; }

.form-error { color: var(--red); font-size: 13px; margin-top: 12px; min-height: 18px; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, #120E1D 0%, var(--bg-2) 100%);
  border-right: 1px solid var(--line);
  padding: 24px 16px 18px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { padding: 0 8px 26px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
  display: flex; align-items: center; gap: 12px; color: var(--muted);
  padding: 10px 12px; border-radius: 12px; font-weight: 500; font-size: 14px;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.nav a.active svg { color: var(--accent-3); }
.nav a svg { width: 18px; height: 18px; flex: 0 0 auto; }
.sidebar .spacer { flex: 1; }
.userbox { border-top: 1px solid var(--line); padding: 16px 8px 0; }
.userbox .who { font-size: 14px; font-weight: 600; }
.userbox .role { font-size: 12px; color: var(--accent-3); text-transform: capitalize; }

.main { padding: 34px 44px 48px; overflow-y: auto; height: 100vh;
  background: radial-gradient(900px 380px at 100% -5%, rgba(94,40,245,.10), transparent 60%); }
.main > * { max-width: 1280px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; gap: 16px; flex-wrap: wrap; }
.topbar h2 { font-size: 28px; font-weight: 700; }
.topbar .sub, .main p.sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.topbar .right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topbar .right input, .topbar .right select { width: auto; padding: 8px 12px; }

/* ---------- Cards / grid ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: 16px; margin-bottom: 24px; }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; position: relative; overflow: hidden;
}
.card::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent); opacity: .7; }
.card .k { font-size: 12px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.card .v { font-family: var(--display); font-size: 30px; font-weight: 700; margin-top: 6px; }
.card .v small { font-size: 13px; color: var(--muted); font-weight: 400; font-family: var(--font); }

/* ---------- Panels / tables ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel h3 { font-size: 16px; font-weight: 600; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel-body { padding: 20px 22px 24px; }
.panel-body > label:first-child, .panel-body .fields label { margin-top: 0; }
.panel > p, .panel > .muted, .panel > form, .panel > .row { padding: 16px 22px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px 18px; }
.actions { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.saved { font-size: 13px; color: var(--green); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 22px; font-size: 13.5px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; background: rgba(255,255,255,.015); }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--panel-2); }
tbody tr.clickable { cursor: pointer; }
td.empty { padding: 40px; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 4px 11px; border-radius: 999px; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; }
.badge.online { background: rgba(63,207,130,.12); color: var(--green); }
.badge.online .dot { background: var(--green); box-shadow: 0 0 8px var(--green); }
.badge.offline { background: rgba(156,147,176,.1); color: var(--muted); }
.badge.offline .dot { background: var(--muted-2); }
.badge.ot { background: var(--accent-soft); color: var(--accent-3); }
.badge.ot .dot { background: var(--accent-2); }
.badge.warn { background: rgba(245,180,59,.13); color: var(--amber); }
.badge.warn .dot { background: var(--amber); }
.badge.bad { background: rgba(240,106,119,.13); color: var(--red); }
.badge.bad .dot { background: var(--red); }
.badge.offday { background: rgba(156,147,176,.1); color: var(--muted); }
.badge.offday .dot { background: var(--muted-2); }
.pill { font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-3); text-transform: capitalize; }

/* ---------- Activity bar meter ---------- */
.meter { height: 7px; border-radius: 4px; background: var(--panel-2); overflow: hidden; min-width: 90px; }
.meter > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-3)); }

/* ---------- Activity timeline ---------- */
.timeline { display: flex; align-items: flex-end; gap: 2px; height: 130px; padding: 16px 22px; overflow-x: auto; }
.timeline .bar { flex: 0 0 5px; background: linear-gradient(180deg, var(--accent-3), var(--accent)); border-radius: 2px 2px 0 0; min-height: 2px; }
.timeline .bar.idle { background: var(--panel-2); }

/* ---------- Screenshot grid ---------- */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: 16px; align-items: start; align-content: start; grid-auto-rows: max-content; }
.shot { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color .15s, transform .15s; }
.shot:hover { border-color: var(--accent); transform: translateY(-2px); }
.shot img { width: 100%; height: 136px; object-fit: cover; display: block; background: var(--bg-2); cursor: zoom-in; }
.shot .meta { padding: 9px 12px; font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.shot .meta .app { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Modal / lightbox ---------- */
.overlay { position: fixed; inset: 0; background: rgba(6,4,12,.75); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 24px; z-index: 50; }
.modal { background: var(--panel); border: 1px solid var(--line-2); border-radius: 20px; width: 100%; max-width: 500px; max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow); }
.modal header { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal header h3 { font-size: 18px; font-weight: 600; }
.modal .body { padding: 6px 24px 22px; }
.modal footer { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 14px; }
.x { background: transparent; border: 0; color: var(--muted); font-size: 24px; line-height: 1; }
.x:hover { color: var(--text); }

/* ---------- Dashboard overview ---------- */
.ov-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ov-row { display: flex; align-items: center; gap: 12px; padding: 13px 22px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ov-row:last-child { border-bottom: 0; }
.ov-row:hover { background: var(--panel-2); }
.ov-name { display: flex; align-items: center; gap: 9px; min-width: 140px; font-size: 13.5px; font-weight: 500; }
.ov-val { font-size: 13.5px; font-weight: 600; min-width: 60px; text-align: right; }
.dot-s { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.warn-tri { color: var(--amber); font-size: 11px; }
@media (max-width: 900px) { .ov-grid { grid-template-columns: 1fr; } }

/* ---------- Web clock ---------- */
.clock-hero { display: flex; flex-direction: column; align-items: center; padding: 44px 24px 34px; margin-bottom: 20px; gap: 26px;
  background: radial-gradient(420px 220px at 50% 0%, rgba(94,40,245,.18), transparent 70%), var(--panel); }
.clock-ring { width: 230px; height: 230px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 2px solid var(--line-2); background: var(--bg-2); transition: border-color .3s, box-shadow .3s; }
.clock-ring.on { border-color: var(--accent); box-shadow: 0 0 0 8px var(--accent-soft), 0 0 60px rgba(94,40,245,.35); }
.clock-time { font-family: var(--display); font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; }
.clock-state { font-size: 13px; color: var(--muted); margin-top: 4px; }
.clock-ring.on .clock-state { color: var(--green); }

.empty { color: var(--muted); text-align: center; padding: 44px; font-size: 13.5px; }
.row { display: flex; gap: 10px; align-items: center; }
.muted { color: var(--muted); }
.note { font-size: 13px; color: var(--muted); background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 13px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; line-height: 1.6; }

/* ---------- Mobile ---------- */
.menu-btn { display: none; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; width: 260px; padding-top: 70px; transform: translateX(-100%); transition: transform .2s; }
  .app.nav-open .sidebar { transform: none; box-shadow: var(--shadow); }
  .menu-btn { display: inline-flex; position: fixed; top: 14px; left: 14px; z-index: 41; width: 40px; height: 40px; border-radius: 12px;
    background: var(--panel); border: 1px solid var(--line); color: var(--text); align-items: center; justify-content: center; }
  .main { height: auto; padding: 70px 16px 32px; }
  .topbar h2 { font-size: 23px; }
  th, td { padding: 12px 14px; }
  .panel { overflow-x: auto; }
}

/* action cells: keep them real table cells so borders line up */
td.row { display: table-cell; text-align: right; white-space: nowrap; }
td.row > * + * { margin-left: 8px; }
