/* Orqit — global light theme (enterprise SaaS baseline) */
:root {
  --bg-deep: #f1f5f9;
  --bg-panel: #ffffff;
  --bg-card: #ffffff;
  --bg-muted: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --danger: #dc2626;
  --warn: #d97706;
  --ok: #15803d;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--accent-2); }

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

.itzen-sidebar {
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  padding: 1.25rem 0;
  box-shadow: var(--shadow-sm);
}

.itzen-brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  padding: 0 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.itzen-brand span {
  color: var(--accent);
}

.itzen-nav a {
  display: block;
  padding: 0.55rem 1.25rem;
  color: var(--muted);
  border-left: 3px solid transparent;
  font-size: 0.925rem;
  font-weight: 500;
}

.itzen-nav a:hover {
  background: var(--accent-soft);
  color: var(--text);
  text-decoration: none;
}

.itzen-nav a.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-left-color: var(--accent);
  font-weight: 600;
}

.itzen-main {
  padding: 1.5rem 2rem 3rem;
  background: var(--bg-deep);
}

.itzen-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.itzen-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--text);
}

.itzen-user {
  color: var(--muted);
  font-size: 0.9rem;
}

.itzen-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.itzen-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-sm);
}

.itzen-card .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}

.itzen-card .value {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 0.35rem;
  color: var(--text);
}

.itzen-card.warn .value { color: var(--warn); }
.itzen-card.danger .value { color: var(--danger); }
.itzen-card.ok .value { color: var(--ok); }

.itzen-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 960px) {
  .itzen-shell { grid-template-columns: 1fr; }
  .itzen-sidebar { display: none; }
  .itzen-grid-2 { grid-template-columns: 1fr; }
}

.itzen-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.itzen-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.itzen-panel p, .itzen-panel li {
  color: var(--text);
  line-height: 1.55;
}

table.itzen-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

table.itzen-table th,
table.itzen-table td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

table.itzen-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-muted);
}

table.itzen-table tbody tr:hover td {
  background: #fafbfc;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-open { background: #dbeafe; color: #1d4ed8; }
.badge-progress { background: #fef3c7; color: #b45309; }
.badge-hold { background: #e2e8f0; color: #475569; }
.badge-resolved { background: #d1fae5; color: #047857; }
.badge-closed { background: #f1f5f9; color: #64748b; }
.badge-crit { background: #fee2e2; color: #b91c1c; }
.breach { color: var(--danger); font-weight: 700; }

.itzen-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin: 0.75rem 0 0.35rem;
}

.itzen-form input[type=text],
.itzen-form input[type=password],
.itzen-form input[type=email],
.itzen-form input[type=date],
.itzen-form input[type=search],
.itzen-form select,
.itzen-form textarea {
  width: 100%;
  max-width: 520px;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.itzen-form input:hover,
.itzen-form select:hover,
.itzen-form textarea:hover {
  border-color: var(--border-strong);
}

.itzen-form input:focus,
.itzen-form select:focus,
.itzen-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.itzen-form textarea { min-height: 120px; resize: vertical; }

/* Buttons — consistent with portal actions */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  font-family: inherit;
  margin-top: 0.75rem;
  margin-right: 0.5rem;
  line-height: 1.25;
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

a.btn:hover {
  text-decoration: none;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.28);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-muted);
  border-color: var(--border-strong);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-muted);
  color: var(--text);
  border-color: var(--border-strong);
}

.flash-ok {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #047857;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.flash-err {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(165deg, #e8eefa 0%, #f1f5f9 40%, #f8fafc 100%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(15, 23, 42, 0.03);
}

.login-card h1 {
  margin: 0 0 0.25rem;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.login-card .sub {
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.login-card code {
  font-size: 0.8rem;
  background: var(--bg-muted);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.chart-box {
  position: relative;
  height: 260px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  align-items: flex-end;
}

.filters label { margin: 0; font-weight: 600; font-size: 0.8rem; color: var(--text); }
.filters input, .filters select {
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 0.9rem;
}

.filters input:focus, .filters select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
}

.timeline li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.timeline strong { color: var(--text); }

.itzen-muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.itzen-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.itzen-subnav a {
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  color: var(--muted);
  border: 1px solid transparent;
  font-size: 0.88rem;
  font-weight: 500;
}

.itzen-subnav a:hover {
  color: var(--text);
  background: var(--bg-muted);
  text-decoration: none;
}

.itzen-subnav a.active {
  color: var(--accent);
  border-color: var(--border);
  background: var(--accent-soft);
  font-weight: 600;
}

.itzen-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.itzen-filter-row label {
  margin: 0;
  min-width: 140px;
}

.itzen-table-scroll {
  overflow-x: auto;
  max-width: 100%;
}

table.itzen-table.itzen-table--dense th,
table.itzen-table.itzen-table--dense td {
  font-size: 0.8rem;
  white-space: nowrap;
}

.itzen-cell-clip {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
