/* Reliability Hub design tokens — Uptime Hub family, teal accent */
:root {
  --navy: #0F1E3D; --navy-2: #1B2E57; --navy-line: #1E3A6E;
  --accent: #14B8A6; --accent-text: #0F766E; --accent-dark: #115E59; --accent-soft: #E6F4F1;
  --bg: #F4F6FA; --card: #FFFFFF; --line: #E2E8F0; --line-2: #CBD5E1;
  --text: #0F172A; --muted: #475569; --faint: #94A3B8;
  --red-bg: #FEE2E2; --red: #991B1B; --amber-bg: #FEF3C7; --amber: #92400E; --green-bg: #DCFCE7; --green: #166534;
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
a { color: var(--accent-text); } a:hover { color: var(--accent-dark); }
h1 { margin: 0; font-size: 26px; font-weight: 700; }
h2 { margin: 0; font-size: 16px; font-weight: 600; }
.muted { color: var(--muted); }

/* layout */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.sidebar { flex: 1 1 240px; max-width: 100%; background: var(--navy); color: #CBD5E1; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
@media (min-width: 900px) { .sidebar { flex: 0 0 248px; } }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 22px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); display: flex; align-items: center; justify-content: center; }
.brand-name { color: #fff; font-weight: 700; font-size: 16px; display: block; }
.brand-sub { font-size: 11px; color: var(--faint); }
.nav-label { font-size: 11px; letter-spacing: .08em; color: var(--faint); padding: 14px 10px 6px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 8px; color: #CBD5E1; text-decoration: none; }
.nav-link:hover { background: var(--navy-2); color: #fff; }
.nav-link.active { background: var(--navy-2); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.nav-link .soon { margin-left: auto; font-size: 10px; color: var(--faint); border: 1px solid var(--navy-line); border-radius: 999px; padding: 1px 7px; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--navy-line); padding: 14px 10px 0; font-size: 12px; color: var(--faint); display: flex; flex-direction: column; gap: 10px; }
.me { display: flex; align-items: center; gap: 10px; color: #E2E8F0; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--navy-2); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.main { flex: 999 1 560px; min-width: 0; padding: 28px 32px; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 640px) { .main { padding: 20px 16px; } }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; }
.page-head .sub { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* components */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi .k { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi .v { font-size: 28px; font-weight: 700; }
.kpi .s { font-size: 12px; color: var(--muted); }
.btn { height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--accent-text); border-color: var(--accent-text); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn-ghost { background: transparent; border-color: var(--navy-line); color: #CBD5E1; }
.btn-ghost:hover { color: #fff; border-color: var(--faint); }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); font-weight: 500; }
.field input, .field select, select.inline { height: 42px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 12px; font: inherit; font-size: 14px; color: var(--text); background: #fff; }
.field input:focus, .field select:focus, select.inline:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent-text); }
select.inline { height: 34px; }
.form-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; }
.alert { border-radius: 8px; padding: 11px 14px; font-size: 14px; }
.alert-error { background: var(--red-bg); color: var(--red); }
.alert-ok { background: var(--green-bg); color: var(--green); }
.badge { display: inline-block; font-weight: 700; font-size: 12px; padding: 3px 9px; border-radius: 999px; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-grey { background: #F1F5F9; color: var(--muted); }
.badge-blue { background: #DBEAFE; color: #1E40AF; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--muted); font-weight: 600; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 8px; border-bottom: 1px solid #F1F5F9; vertical-align: middle; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.empty { text-align: center; padding: 34px 20px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.empty strong { color: var(--text); font-size: 16px; }

/* login */
.login-wrap { min-height: 100vh; display: flex; flex-wrap: wrap; }
.login-side { flex: 1 1 420px; background: var(--navy); color: #CBD5E1; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.login-side h2 { color: #fff; font-size: 30px; line-height: 1.25; max-width: 460px; }
.login-side ul { margin: 0; padding-left: 18px; line-height: 1.9; }
.login-main { flex: 1 1 420px; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
