/*
 * SmartChair Design System
 * Source of truth: templates/template_conf/conf_portal_playground.html
 * Do not edit variables here without updating the playground.
 */

/* ── Variables ── */
:root {
  --bg: #edf4fb;
  --surface: #ffffff;
  --surface-soft: #f7fbff;
  --surface-accent: #e2eefb;
  --sidebar: #285c9c;
  --sidebar-deep: #174784;
  --primary: #1d63d8;
  --accent: #17b4b1;
  --accent-soft: #d9f4f2;
  --text: #12253d;
  --muted: #637b99;
  --line: #d0dded;
  --success: #11825f;
  --warning: #ca8f1a;
  --danger: #ca5160;
  --info: #3f7be0;
  --shadow-lg: 0 28px 52px rgba(17,41,84,0.13);
  --shadow-md: 0 16px 28px rgba(17,41,84,0.08);
  --shadow-sm: 0 8px 18px rgba(17,41,84,0.06);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 15px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, rgba(23,180,177,0.12), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }

/* ── Icons ── */
svg.icon {
  width: 18px; height: 18px; display: inline-block; flex: 0 0 auto;
  stroke: currentColor; fill: none;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}

/* ── Page Layout ── */
.page {
  width: min(1540px, calc(100vw - 34px));
  margin: 18px auto 28px;
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 22px;
}

/* ── Sidebar ── */
.sidebar {
  background: linear-gradient(180deg, var(--sidebar-deep) 0%, var(--sidebar) 100%);
  color: #edf5ff;
  border-radius: 28px;
  padding: 22px 16px;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  min-height: calc(100vh - 36px);
  position: sticky; top: 18px;
}
.brand {
  padding: 12px 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 14px;
}
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 5px;
  background: linear-gradient(135deg, #fff 0%, #d7ebff 100%);
  color: var(--sidebar-deep); font-size: 21px; font-weight: 800; margin-bottom: 12px;
}
.brand small {
  display: block; font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(255,255,255,0.6); margin-bottom: 4px;
}
.brand strong { display: block; font-size: 22px; letter-spacing: -0.04em; line-height: 1.1; }
.brand span { display: block; margin-top: 6px; font-size: 12px; color: rgba(255,255,255,0.7); line-height: 1.5; }
.nav-group { margin-top: 14px; }
.nav-label {
  padding: 0 10px; margin-bottom: 7px;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.5);
}
.nav-item {
  display: grid; grid-template-columns: 18px 1fr auto; align-items: center;
  gap: 10px; padding: 11px 12px; border-radius: 14px; color: #edf5ff;
  margin-bottom: 4px; font-size: 14px;
  transition: transform 0.14s ease, background 0.14s ease;
}
.nav-item:hover { transform: translateX(1px); background: rgba(255,255,255,0.07); }
.nav-item.active { background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(23,180,177,0.22)); }
.nav-icon { color: rgba(255,255,255,0.88); }
.nav-badge {
  font-size: 11px; color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.1); border-radius: 999px; padding: 3px 8px;
}
.sidebar-footer {
  margin-top: auto; padding: 14px 12px; border-radius: 16px;
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.78);
  font-size: 12px; line-height: 1.55;
}
.sidebar-footer strong { display: block; color: #fff; font-size: 13px; margin-bottom: 5px; }
.sidebar-footer a { color: rgba(255,255,255,0.85); text-decoration: underline; }

/* ── Content area ── */
.content { min-width: 0; }

/* ── Identity hero ── */
.identity {
  padding: 26px 28px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  margin-bottom: 18px;
  background:
    radial-gradient(circle at top right, rgba(23,180,177,0.14), transparent 40%),
    linear-gradient(180deg, #fff 0%, #f3f8ff 100%);
}
.identity-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin-bottom: 16px;
}
.identity-left small {
  display: block; font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.identity-left h1 { margin: 0 0 4px; font-size: clamp(26px, 4vw, 44px); letter-spacing: -0.045em; line-height: 1.0; }
.identity-left p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.status-badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.identity-meta {
  display: flex; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 14px;
}
.meta-item { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.meta-item svg.icon { width: 15px; height: 15px; color: var(--primary); }
.meta-item strong { color: var(--text); }
.meta-item a { color: var(--primary); }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.badge.green  { color: var(--success); background: color-mix(in srgb, var(--success) 12%, white); }
.badge.blue   { color: var(--info);    background: color-mix(in srgb, var(--info)    12%, white); }
.badge.orange { color: var(--warning); background: color-mix(in srgb, var(--warning) 12%, white); }
.badge.red    { color: var(--danger);  background: color-mix(in srgb, var(--danger)  12%, white); }
.badge.muted  { color: var(--muted);   background: color-mix(in srgb, var(--muted)   10%, white); }

/* ── Pills ── */
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 5px 10px; font-size: 11px; font-weight: 700; }
.pill.green  { color: var(--success); background: color-mix(in srgb, var(--success) 12%, white); }
.pill.orange { color: var(--warning); background: color-mix(in srgb, var(--warning) 12%, white); }
.pill.blue   { color: var(--info);    background: color-mix(in srgb, var(--info)    12%, white); }
.pill.teal   { color: var(--accent);  background: color-mix(in srgb, var(--accent)  12%, white); }
.pill.red    { color: var(--danger);  background: color-mix(in srgb, var(--danger)  12%, white); }
.pill.muted  { color: var(--muted);   background: color-mix(in srgb, var(--muted)   10%, white); }

/* ── Metrics row ── */
.metrics {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px; margin-bottom: 18px;
}
.metric {
  padding: 18px 20px; border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.metric-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.metric-icon {
  width: 40px; height: 40px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #eef6ff 0%, #dceeff 100%); color: var(--primary);
}
.metric-icon svg.icon { width: 19px; height: 19px; }
.metric small  { display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.metric strong { display: block; font-size: 32px; letter-spacing: -0.05em; line-height: 1; margin-bottom: 6px; }
.metric span   { color: var(--muted); font-size: 12px; line-height: 1.5; }
.metric.accent-teal    .metric-icon { background: linear-gradient(180deg, #e0f9f8 0%, #c6f4f2 100%); color: var(--accent); }
.metric.accent-warn    .metric-icon { background: color-mix(in srgb, var(--warning) 12%, white); color: var(--warning); }
.metric.accent-success .metric-icon { background: color-mix(in srgb, var(--success) 12%, white); color: var(--success); }

/* ── Two-column grid ── */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.grid2.wide { grid-template-columns: 1.3fr 0.7fr; }

/* ── Panel ── */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-xl); padding: 22px; box-shadow: var(--shadow-sm);
}
.panel-hd { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.panel-hd-left { display: flex; align-items: flex-start; gap: 12px; }
.panel-icon {
  width: 36px; height: 36px; border-radius: 12px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #eef6ff 0%, #dff2ff 100%); color: var(--primary);
}
.panel-title h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -0.03em; }
.panel-title p  { margin: 0; font-size: 12px; color: var(--muted); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 12px; border: none; cursor: pointer;
  font-size: 13px; font-weight: 700; font-family: inherit;
  transition: opacity 0.12s, transform 0.1s;
  text-decoration: none;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger  { background: var(--danger);  color: #fff; }
.btn-outline {
  background: var(--surface); color: var(--primary);
  border: 1.5px solid var(--line);
}
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 10px; }
.btn svg.icon { width: 15px; height: 15px; }

/* ── Form elements ── */
.sc-form-group { margin-bottom: 16px; }
.sc-form-group label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.05em; }
.sc-check-label { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.sc-input, .sc-select, .sc-textarea {
  width: 100%; padding: 10px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface);
  font-size: 14px; color: var(--text); font-family: inherit;
  transition: border-color 0.15s;
  outline: none;
}
.sc-input:focus, .sc-select:focus, .sc-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29,99,216,0.1);
}
.sc-textarea { resize: vertical; min-height: 90px; }

/* ── Data table ── */
.sc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sc-table thead th {
  text-align: left; padding: 10px 14px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1.5px solid var(--line);
}
.sc-table tbody tr { border-bottom: 1px solid var(--line); }
.sc-table tbody tr:last-child { border-bottom: none; }
.sc-table tbody td { padding: 12px 14px; vertical-align: middle; }
.sc-table tbody tr:hover { background: var(--surface-soft); }

/* ── Statistics text area ── */
.stat-area { font-size: 13px; color: var(--muted); line-height: 2.0; }
.stat-area a { color: var(--primary); font-weight: 600; }
.stat-area b, .stat-area strong { color: var(--text); }

/* ── Deadline timeline ── */
.deadline-list { display: grid; gap: 8px; }
.deadline-row {
  display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-soft);
}
.deadline-icon {
  width: 36px; height: 36px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #eef6ff 0%, #dceeff 100%); color: var(--primary);
}
.deadline-icon svg.icon { width: 16px; height: 16px; }
.deadline-row-label { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.deadline-row-date { font-size: 14px; font-weight: 700; color: var(--text); }
.deadline-row-date.empty { font-weight: 400; color: var(--muted); font-size: 13px; }

/* ── To-do checklist ── */
.todo-list { display: grid; gap: 8px; }
.todo-item {
  display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: flex-start;
  padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-soft);
}
.todo-item:has(> a.btn),
.todo-item:has(> button.btn),
.todo-item:has(> input.btn),
.todo-item:has(> input.btn-sm),
.todo-item:has(> input.btn-outline) {
  grid-template-columns: auto 1fr;
  align-items: center;
}
.todo-item > a.btn:first-child,
.todo-item > button.btn:first-child,
.todo-item > input.btn:first-child,
.todo-item > input.btn-sm:first-child,
.todo-item > input.btn-outline:first-child {
  min-width: 82px;
  justify-content: center;
}
.todo-dot {
  width: 28px; height: 28px; border-radius: 10px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}
.todo-dot.check { background: color-mix(in srgb, var(--success) 14%, white); color: var(--success); }
.todo-dot.warn  { background: color-mix(in srgb, var(--warning) 14%, white); color: var(--warning); }
.todo-dot.info  { background: color-mix(in srgb, var(--primary) 12%, white); color: var(--primary); }
.todo-dot.muted { background: color-mix(in srgb, var(--muted)   10%, white); color: var(--muted); }
.todo-text strong { display: block; font-size: 14px; margin-bottom: 2px; }
.todo-text span   { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ── Form list ── */
.form-list { display: grid; gap: 8px; }
.form-row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px;
  padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-soft);
}
.form-row-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.form-row-type { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.form-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--primary); font-weight: 700; }
.form-link svg.icon { width: 14px; height: 14px; }
.empty-note { font-size: 13px; color: var(--muted); padding: 10px 0; }

/* ── Alert / notification bar ── */
.sc-alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-radius: 14px; font-size: 13px; margin-bottom: 14px;
}
.sc-alert.info    { background: color-mix(in srgb, var(--info)    10%, white); border: 1px solid color-mix(in srgb, var(--info)    30%, white); color: var(--info); }
.sc-alert.success { background: color-mix(in srgb, var(--success) 10%, white); border: 1px solid color-mix(in srgb, var(--success) 30%, white); color: var(--success); }
.sc-alert.warning { background: color-mix(in srgb, var(--warning) 10%, white); border: 1px solid color-mix(in srgb, var(--warning) 30%, white); color: var(--warning); }
.sc-alert.danger  { background: color-mix(in srgb, var(--danger)  10%, white); border: 1px solid color-mix(in srgb, var(--danger)  30%, white); color: var(--danger); }
.sc-alert svg.icon { flex: 0 0 auto; margin-top: 1px; }

/* ── Responsive ── */
@media (max-width: 1300px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2, .grid2.wide { grid-template-columns: 1fr; }
}
@media (max-width: 1060px) {
  .page { grid-template-columns: 1fr; }
  .sidebar { position: static; min-height: auto; }
}
@media (max-width: 760px) {
  .page { width: min(100vw - 14px, 100%); margin: 8px auto 16px; }
  .identity, .panel { padding: 16px; border-radius: 18px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
