* { box-sizing: border-box; }
:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #dde3ee;
  --accent: #1d4ed8;
  --accent-soft: #dbeafe;
  --danger: #dc2626;
  --success: #15803d;
  --warning: #b45309;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 16px;
}
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.app-shell {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #0f172a;
  color: #fff;
  padding: 24px 18px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}
.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  display: grid;
  place-items: center;
  font-weight: 700;
}
.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  padding: 6px;
}
.brand-title { font-size: 20px; font-weight: 700; }
.brand-subtitle { font-size: 12px; color: #cbd5e1; }
.nav-menu { display: flex; flex-direction: column; gap: 8px; }
.nav-menu a {
  color: #e2e8f0;
  padding: 12px 14px;
  border-radius: 12px;
  display: block;
}
.nav-menu a:hover {
  background: rgba(255,255,255,.08);
  text-decoration: none;
}
.main-content { padding: 24px; }
.topbar h1 { margin: 0; font-size: 28px; }
.muted { color: var(--muted); }
.alert {
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-success { background: #ecfdf5; color: var(--success); border-color: #bbf7d0; }
.alert-error { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
.alert-warning { background: #fff7ed; color: var(--warning); border-color: #fed7aa; }
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}
.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}
.grid {
  display: grid;
  gap: 16px;
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}
input[type="text"],
input[type="date"],
input[type="password"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
}
textarea { min-height: 110px; resize: vertical; }
button, .btn {
  display: inline-block;
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 11px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
}
button:hover, .btn:hover { opacity: .95; text-decoration: none; }
.btn-secondary { background: #475569; }
.btn-danger { background: var(--danger); }
.btn-light {
  background: #e2e8f0;
  color: #0f172a;
}
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}
th, td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.status-pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.status-pending { background: #fff7ed; color: #b45309; }
.status-completed { background: #ecfdf5; color: #15803d; }
.login-wrap {
  max-width: 460px;
  margin: 60px auto;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.kpi {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.kpi-value { font-size: 32px; font-weight: 700; margin-top: 6px; }
.inline-form { display: inline; }
.small { font-size: 12px; }
.code-area {
  font-family: Consolas, monospace;
  min-height: 320px;
}
@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { padding-bottom: 10px; }
  .main-content { padding: 16px; }
  .grid-2, .grid-3, .kpis { grid-template-columns: 1fr; }
  .topbar h1 { font-size: 22px; }
}
