/* NetWatch — PAMGC yeşil temasıyla uyumlu arayüz. */
:root {
  --brand: #1ab394;
  --brand-dark: #17a085;
  --brand-darker: #0f7b6c;
  --bg: #f3f4f6;
  --card: #ffffff;
  --border: #e5e7eb;
  --text: #1f2937;
  --text-muted: #6b7280;
  --up: #16a34a;
  --down: #dc2626;
  --warn: #f59e0b;
  --unknown: #9ca3af;
  --maint: #3b82f6;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

/* --- üst şerit --- */
.topbar {
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  height: 52px;
  box-shadow: var(--shadow);
}
.topbar .brand {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .3px;
  margin-right: 22px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.topbar .brand .logo {
  width: 26px; height: 26px;
  background: #fff;
  color: var(--brand);
  border-radius: 5px;
  display: grid; place-items: center;
  font-weight: 800;
}
.topbar nav { display: flex; gap: 4px; flex: 1; }
.topbar nav a {
  color: rgba(255,255,255,.9);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: var(--radius);
  font-weight: 500;
  transition: background .15s;
}
.topbar nav a:hover { background: rgba(255,255,255,.14); color: #fff; }
.topbar nav a.active { background: rgba(0,0,0,.18); color: #fff; }
.topbar .user { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.topbar .user a { color: rgba(255,255,255,.85); text-decoration: none; }
.topbar .user a:hover { color: #fff; text-decoration: underline; }

.wrap { max-width: 1560px; margin: 0 auto; padding: 20px; }

/* --- özet kartları --- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr));
         gap: 14px; margin-bottom: 20px; }
.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--unknown);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.stat .label { color: var(--text-muted); font-size: 12px; text-transform: uppercase;
               letter-spacing: .5px; font-weight: 600; }
.stat .value { font-size: 30px; font-weight: 700; line-height: 1.15; margin-top: 4px; }
.stat .sub { color: var(--text-muted); font-size: 12px; }
.stat.up    { border-left-color: var(--up); }
.stat.up .value    { color: var(--up); }
.stat.down  { border-left-color: var(--down); }
.stat.down .value  { color: var(--down); }
.stat.warn  { border-left-color: var(--warn); }
.stat.warn .value  { color: var(--warn); }
.stat.info  { border-left-color: var(--brand); }
.stat.info .value  { color: var(--brand-darker); }

/* --- kart --- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.card > header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  font-weight: 600;
}
.card > header .spacer { flex: 1; }
.card .body { padding: 16px; }
.card .body.flush { padding: 0; }

/* --- tablo --- */
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; padding: 10px 14px;
  font-size: 12px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--text-muted); font-weight: 600;
  border-bottom: 1px solid var(--border);
  background: #fafafa;
  white-space: nowrap;
}
td { padding: 9px 14px; border-bottom: 1px solid #f3f4f6; }
tbody tr:hover { background: #f9fafb; }
tbody tr.row-down { background: #fef2f2; }
tbody tr.row-down:hover { background: #fee2e2; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.muted { color: var(--text-muted); }
.small { font-size: 12px; }

/* --- durum rozeti --- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 11px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%;
                 background: currentColor; }
.badge.up      { background: #dcfce7; color: #15803d; }
.badge.down    { background: #fee2e2; color: #b91c1c; }
.badge.unknown { background: #f3f4f6; color: #4b5563; }
.badge.maintenance { background: #dbeafe; color: #1d4ed8; }
.badge.suppressed  { background: #fef3c7; color: #92400e; }

/* --- düğme --- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand); color: #fff;
  border: none; border-radius: var(--radius);
  padding: 7px 14px; font-size: 13px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: background .15s;
}
.btn:hover { background: var(--brand-dark); }
.btn.sec { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn.sec:hover { background: #f9fafb; }
.btn.danger { background: var(--down); }
.btn.danger:hover { background: #b91c1c; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* --- form --- */
label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted);
        margin-bottom: 4px; text-transform: uppercase; letter-spacing: .3px; }
input[type=text], input[type=password], input[type=number], input[type=datetime-local],
select, textarea {
  width: 100%; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; font-family: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26,179,148,.12);
}
.field { margin-bottom: 13px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.grid3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 13px; }
.checkbox { display: flex; align-items: center; gap: 7px; }
.checkbox input { width: auto; }
.checkbox label { margin: 0; text-transform: none; font-size: 13px; color: var(--text); }
.hint { font-size: 11px; color: var(--text-muted); margin-top: 3px; text-transform: none;
        letter-spacing: 0; font-weight: 400; }

/* --- filtre çubuğu --- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
           margin-bottom: 14px; }
.toolbar input[type=text], .toolbar select { width: auto; min-width: 150px; }
.toolbar .spacer { flex: 1; }

/* --- modal --- */
.modal-bg {
  position: fixed; inset: 0; background: rgba(17,24,39,.5);
  display: none; align-items: flex-start; justify-content: center;
  z-index: 50; overflow-y: auto; padding: 40px 20px;
}
.modal-bg.open { display: flex; }
.modal {
  background: #fff; border-radius: 8px; width: 100%; max-width: 660px;
  box-shadow: 0 20px 40px rgba(0,0,0,.2);
}
.modal header { padding: 15px 20px; border-bottom: 1px solid var(--border);
                font-weight: 600; font-size: 16px; display: flex; }
.modal header .spacer { flex: 1; }
.modal .body { padding: 20px; }
.modal footer { padding: 14px 20px; border-top: 1px solid var(--border);
                display: flex; gap: 9px; justify-content: flex-end; }
.close { background: none; border: none; font-size: 22px; cursor: pointer;
         color: var(--text-muted); line-height: 1; padding: 0 4px; }

/* --- timeline şeridi --- */
.timeline { display: flex; gap: 1px; height: 26px; border-radius: 3px;
            overflow: hidden; background: var(--border); }
.timeline .slot { flex: 1; min-width: 2px; }
.timeline .slot.up   { background: #4ade80; }
.timeline .slot.warn { background: var(--warn); }
.timeline .slot.down { background: var(--down); }
.timeline-mini { height: 16px; }

/* --- grafik --- */
.chart { width: 100%; height: 190px; }

/* --- giriş sayfası --- */
.login-page {
  min-height: 100vh; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-darker) 100%);
}
.login-box {
  background: #fff; padding: 34px; border-radius: 9px;
  box-shadow: 0 12px 34px rgba(0,0,0,.22); width: 370px;
}
.login-box h1 { margin: 0 0 5px; font-size: 21px; text-align: center; }
.login-box .sub { text-align: center; color: var(--text-muted);
                  margin-bottom: 22px; font-size: 13px; }
.login-box .btn { width: 100%; justify-content: center; padding: 10px; }
.alert { background: #fee2e2; color: #b91c1c; padding: 9px 12px;
         border-radius: var(--radius); font-size: 13px; margin-bottom: 14px; }
.alert.ok { background: #dcfce7; color: #15803d; }

/* --- bildirim balonu --- */
.toast {
  position: fixed; bottom: 22px; right: 22px; z-index: 100;
  background: var(--text); color: #fff; padding: 11px 17px;
  border-radius: var(--radius); box-shadow: 0 5px 18px rgba(0,0,0,.28);
  font-size: 13px; opacity: 0; transform: translateY(9px);
  transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.err { background: var(--down); }
.toast.ok  { background: var(--up); }

.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--border);
        margin-bottom: 17px; }
.tabs button {
  background: none; border: none; padding: 9px 17px; cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.active { color: var(--brand-darker);
                      border-bottom-color: var(--brand); }

.empty { text-align: center; padding: 38px; color: var(--text-muted); }
