@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --line: #e2e8f0;
  --ink: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-soft: #eff6ff;
  --danger: #dc2626;
  --success: #15803d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 90% -10%, #dbeafe 0, transparent 40%), var(--bg);
}

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.auth-page {
  width: min(920px, 95vw);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.auth-card h1, .auth-card h2 { margin: 0 0 8px; }
.auth-card p { margin: 0 0 14px; color: var(--muted); }
.auth-form { display: grid; gap: 10px; }
.auth-form label { color: var(--muted); font-size: 12px; }
.auth-form input {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px;
}

.btn-primary, .btn-secondary {
  border: 0;
  border-radius: 12px;
  color: #fff;
  padding: 11px 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary { background: linear-gradient(90deg, #2563eb, #1d4ed8); }
.btn-secondary { background: linear-gradient(90deg, #0f766e, #0f766e); }

.alert-danger {
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #991b1b;
  padding: 10px;
  margin-bottom: 10px;
}

.panel-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.side-nav {
  border-right: 1px solid var(--line);
  background: #0f172a;
  color: #e2e8f0;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand-wrap { display: flex; gap: 10px; align-items: center; }
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.brand-wrap h1 { margin: 0; font-size: 18px; }
.brand-wrap p { margin: 2px 0 0; font-size: 12px; color: #94a3b8; }

.menu-links { display: grid; gap: 8px; }
.menu-links a {
  text-decoration: none;
  color: #cbd5e1;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 10px 11px;
  font-weight: 600;
}
.menu-links a.active,
.menu-links a:hover { border-color: #334155; background: #1e293b; color: #fff; }

.logout-box { margin-top: auto; }
.logout-box button {
  width: 100%;
  border: 1px solid #334155;
  border-radius: 11px;
  background: #1f2937;
  color: #e2e8f0;
  padding: 10px;
  font-weight: 700;
  cursor: pointer;
}

.work-area { padding: 22px; }
.page-head h2 { margin: 0; font-size: 36px; letter-spacing: -0.4px; }
.page-head p { margin: 6px 0 14px; color: var(--muted); font-size: 15px; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 14px;
}
.metric-card span { color: var(--muted); font-size: 12px; display: block; }
.metric-card strong { font-size: 34px; font-weight: 800; }

.single-card { margin-bottom: 14px; }
.card-block {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 16px;
}
.card-block h3 { margin-top: 0; margin-bottom: 10px; font-size: 24px; }
.card-block h4 { margin: 0 0 8px; font-size: 15px; color: var(--muted); }
.note { margin: 0 0 12px; color: var(--muted); }

.form-grid {
  display: grid;
  gap: 10px;
}
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 12px;
  font: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
select:focus {
  outline: none;
  border-color: #7ba7ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--primary);
}

.password-field {
  position: relative;
  display: block;
}

.password-field > input[type="password"],
.password-field > input[type="text"] {
  padding-right: 42px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #64748b;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.password-toggle:hover {
  color: #1e293b;
}

.primary-btn {
  margin-top: 10px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(90deg, var(--primary), #1d4ed8);
  color: #fff;
  font-weight: 700;
  padding: 11px 14px;
  cursor: pointer;
}

.inline-tools {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 10px;
}

.ghost-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

.checklist {
  margin-top: 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  min-height: 110px;
  max-height: 240px;
  overflow: auto;
  padding: 10px;
}

.checklist label {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.lane-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.drop-zone {
  min-height: 220px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 10px;
  background: #f8fafc;
}

.drop-zone.drag-over {
  border-color: #3b82f6;
  background: var(--primary-soft);
}

.user-chip {
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #fff;
  padding: 9px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: grab;
}

.user-chip small { color: var(--muted); }

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  border-bottom: 1px solid #edf2f7;
  padding: 11px;
  text-align: left;
  vertical-align: top;
}
th { color: var(--muted); font-size: 12px; font-weight: 700; }

.action-row {
  display: flex;
  gap: 8px;
}

.action-btn {
  border: 1px solid #cdd8ea;
  border-radius: 10px;
  background: #fff;
  color: #1e293b;
  padding: 7px 10px;
  font-weight: 700;
  cursor: pointer;
}
.action-btn.danger {
  border-color: #fecaca;
  color: #991b1b;
  background: #fff1f2;
}

.message {
  min-height: 20px;
  font-weight: 700;
  color: var(--danger);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: grid;
  place-items: center;
  z-index: 9999;
}

.modal-card {
  width: min(520px, 94vw);
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 16px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.modal-head h4 { margin: 0; }
.modal-close { cursor: pointer; border: 0; background: transparent; font-size: 20px; }

.modal-grid { display: grid; gap: 10px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }

@media (max-width: 1100px) {
  .page-head h2 { font-size: 30px; }
  .form-grid.two, .metric-grid, .lane-grid { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
  .panel-shell { grid-template-columns: 1fr; }
  .auth-page { grid-template-columns: 1fr; }
}
