:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --accent: #2563eb;
  --good: #12b76a;
  --bad: #f04438;
  --warn: #f79009;
  --purple: #7c3aed;
  --shadow: 0 14px 40px rgba(16, 24, 40, .08);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Segoe UI, Arial, sans-serif; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; }
button { border: 0; background: var(--accent); color: white; padding: 10px 14px; border-radius: 10px; cursor: pointer; font-weight: 700; }
button:hover { filter: brightness(.96); }
button.secondary { background: #eef4ff; color: #175cd3; }
button.ghost { background: transparent; color: var(--muted); }
button.danger { background: #fee4e2; color: #b42318; }
button.full { width: 100%; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
code { background: #f2f4f7; padding: 2px 5px; border-radius: 6px; }
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 270px; padding: 22px; background: #0f172a; color: white; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 12px; align-items: center; }
.brand span { display: block; color: #cbd5e1; font-size: 13px; margin-top: 2px; }
.logo { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: #2563eb; font-weight: 900; }
nav { display: grid; gap: 8px; }
.nav { text-align: left; background: transparent; color: #cbd5e1; border-radius: 12px; padding: 12px; }
.nav.active, .nav:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-foot { margin-top: auto; display: grid; gap: 8px; }
.main { flex: 1; padding: 28px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
h1 { margin: 0; font-size: 28px; }
p { color: var(--muted); }
.hidden { display: none !important; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 18px; }
.login { max-width: 460px; margin: 12vh auto; display: grid; gap: 14px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.stat { display: grid; gap: 8px; }
.stat b { font-size: 32px; }
.stat span { color: var(--muted); }
.message { padding: 12px 14px; border-radius: 12px; margin: 14px 0; background: #eff8ff; border: 1px solid #b2ddff; color: #175cd3; }
.message.error { background: #fef3f2; border-color: #fecdca; color: #b42318; }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 999px; background: #f2f4f7; font-weight: 700; font-size: 12px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot.work { background: var(--good); }
.dot.off { background: var(--bad); }
.dot.paused, .dot.warning { background: var(--warn); }
.dot.vacation { background: var(--purple); }
.dot.sick { background: #ec4899; }
.dot.training { background: #06aed4; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: white; }
table { border-collapse: collapse; width: 100%; min-width: 760px; }
th, td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; white-space: nowrap; }
th { background: #f8fafc; color: var(--muted); font-size: 12px; position: sticky; top: 0; z-index: 1; }
.schedule-cell { text-align: center; min-width: 42px; cursor: pointer; font-weight: 800; }
.schedule-cell.work { background: #ecfdf3; color: #027a48; }
.schedule-cell.off { background: #fef3f2; color: #b42318; }
.schedule-cell.vacation { background: #f4f3ff; color: #5925dc; }
.schedule-cell.sick { background: #fdf2fa; color: #c11574; }
.schedule-cell.training { background: #ecfdff; color: #0e7090; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.employee-card { display: grid; gap: 12px; }
.employee-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.employee-head h3 { margin: 0; }
.small { font-size: 12px; color: var(--muted); }
.warning-card { border-left: 5px solid var(--warn); }
.warning-card.danger { border-left-color: var(--bad); }
.warning-card.info { border-left-color: var(--accent); }
pre { white-space: pre-wrap; background: #0f172a; color: #e2e8f0; padding: 14px; border-radius: 12px; overflow: auto; }
@media (max-width: 900px) {
  .layout { display: block; }
  .sidebar { width: auto; height: auto; position: relative; }
  .main { padding: 16px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .form-grid { grid-template-columns: 1fr; }
  .topbar { display: grid; }
}
.copy-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; }
.connect-checks { display: grid; gap: 10px; margin: 14px 0; color: var(--muted); }
.connect-checks b { color: var(--text); }
.okmark, .badmark { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 999px; font-weight: 900; margin-right: 6px; }
.okmark { background: #dcfae6; color: #027a48; }
.badmark { background: #fee4e2; color: #b42318; }
.steps { color: var(--muted); line-height: 1.8; }
.steps b { color: var(--text); }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
textarea { resize: vertical; }
@media (max-width: 900px) { .copy-row { grid-template-columns: 1fr; } }
.copy-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.connect-checks { display: grid; gap: 8px; margin: 12px 0; }
.okmark, .badmark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-weight: 900; margin-right: 8px; }
.okmark { background: #dcfae6; color: #027a48; }
.badmark { background: #fee4e2; color: #b42318; }
.steps { color: var(--muted); display: grid; gap: 8px; padding-left: 22px; }
hr { border: 0; border-top: 1px solid var(--line); width: 100%; margin: 16px 0; }
textarea { min-height: 84px; resize: vertical; }
