/* SarVirüs Lisans — paylaşılan görsel tema. Yalnızca stil; hiçbir form alanı adı, handler veya davranış değişmez. */

:root {
  --ink: #10131c;
  --ink-muted: #5b6478;
  --ink-faint: #8b93a6;
  --paper: #f5f6fa;
  --card: #ffffff;
  --border: #e6e8f0;
  --border-strong: #d7dae6;

  --brand: #f2b400;
  --brand-dark: #c89300;
  --brand-ink: #1a1400;
  --brand-soft: #fdf1cf;

  --ok-bg: #e6f6ee;
  --ok-ink: #15804a;
  --ok-dot: #1fae63;
  --warn-bg: #fff3e0;
  --warn-ink: #9a5b00;
  --warn-dot: #f2a83c;
  --bad-bg: #fdecee;
  --bad-ink: #b3202f;
  --bad-dot: #e5484d;
  --muted-bg: #eef0f5;
  --muted-ink: #5b6478;

  --side-bg: #12141f;
  --side-bg-raise: #191c2a;
  --side-border: rgba(255, 255, 255, 0.07);
  --side-ink: #aab0c3;
  --side-ink-active: #ffffff;

  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px -14px rgba(15, 23, 42, 0.16);
  --shadow-lg: 0 24px 60px -20px rgba(10, 12, 20, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--brand-dark);
  outline-offset: 2px;
}

svg {
  display: block;
}

/* ---------- Üst bar ---------- */

.topbar {
  background: var(--side-bg);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.1px;
  color: #fff;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--brand);
  color: var(--brand-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex: 0 0 auto;
}

.topbar .brand .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok-dot);
  box-shadow: 0 0 0 3px rgba(31, 174, 99, 0.22);
  flex: 0 0 auto;
}

.topbar .session {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 12.5px;
  color: var(--side-ink);
}

.topbar .session .session-email {
  color: #dfe2ec;
}

.topbar .session a {
  color: var(--side-ink);
}

.topbar .session a:hover {
  color: #fff;
  text-decoration: none;
}

.topbar form {
  margin: 0;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  padding: 6px;
  margin-right: 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.menu-toggle:hover {
  background: var(--side-bg-raise);
}

.btn-link {
  background: none;
  border: none;
  color: var(--side-ink);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-link:hover {
  color: #fff;
  text-decoration: underline;
}

/* ---------- Sayfa iskeleti ---------- */

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.page-narrow {
  max-width: 408px;
  margin: 72px auto;
  padding: 0 24px;
}

h1 {
  font-size: 20px;
  font-weight: 650;
  margin: 0 0 4px;
  color: var(--ink);
  letter-spacing: -0.2px;
}

h2 {
  font-size: 14px;
  font-weight: 650;
  margin: 0 0 16px;
  color: var(--ink);
  letter-spacing: -0.1px;
}

/* ---------- Bayrak mesajları / Toast ---------- */

/* JS çalışmıyorsa (admin.js yüklenemedi/engellenmiş) bu statik bayrak tek bildirim kaynağı olarak kalır;
   admin.js çalışırsa bunu bir toast'a çevirip kaldırır - bildirim hiçbir durumda sessizce kaybolmaz. */
.flash,
.alert {
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  margin: 0 0 18px;
  font-size: 13px;
}

.flash {
  background: var(--ok-bg);
  color: var(--ok-ink);
}

.alert {
  background: var(--bad-bg);
  color: var(--bad-ink);
}

.toast-region {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.toast {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast .toast-icon {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--ok-dot);
}

.toast.toast-error .toast-icon {
  color: var(--bad-dot);
}

.toast .toast-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #aab0c3;
  cursor: pointer;
  padding: 0 0 0 8px;
  line-height: 1;
}

.toast .toast-close:hover {
  color: #fff;
}

/* ---------- Kartlar ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin: 0 0 20px;
}

.card:last-child {
  margin-bottom: 0;
}

.card-danger {
  border-color: rgba(179, 32, 47, 0.3);
}

.card-danger h2 {
  color: var(--bad-ink);
}

.card-login {
  padding: 30px 28px 26px;
}

.card-login h1 {
  text-align: center;
}

.brand-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 28px;
}

.brand-login .brand-mark {
  width: 30px;
  height: 30px;
  font-size: 14px;
}

.brand-login span.brand-name {
  color: var(--ink-muted);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

/* ---------- Formlar ---------- */

form {
  margin: 0;
}

.field {
  display: block;
  margin: 0 0 14px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-muted);
}

.field:last-of-type {
  margin-bottom: 18px;
}

.field-hint {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-faint);
}

.field-error {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--bad-ink);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="search"],
select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px 11px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.12s, box-shadow 0.12s;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--brand-dark);
  box-shadow: 0 0 0 3px rgba(242, 180, 0, 0.22);
}

input:disabled,
select:disabled,
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

input::placeholder {
  color: var(--ink-faint);
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.inline-form > * {
  flex: 1 1 160px;
}

.inline-form input,
.inline-form select {
  margin-top: 0;
}

.inline-form button {
  flex: 0 0 auto;
}

/* ---------- Butonlar ---------- */

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 650;
  font-family: inherit;
  color: var(--brand-ink);
  background: var(--brand);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, opacity 0.12s;
}

button:hover {
  background: var(--brand-dark);
}

button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.btn-full {
  width: 100%;
}

.btn-danger {
  background: var(--bad-ink);
  color: #fff;
}

.btn-danger:hover {
  background: #8f1a26;
}

.btn-muted {
  background: var(--card);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-muted:hover {
  background: var(--muted-bg);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
  border-color: transparent;
  padding: 9px 10px;
}

.btn-ghost:hover {
  background: var(--muted-bg);
  color: var(--ink);
}

.btn-small {
  padding: 6px 11px;
  font-size: 12px;
}

.btn[disabled] {
  pointer-events: none;
}

.btn-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

/* Form gönderimi sırasında (admin.js) - çift gönderimi engellemek için buton metni gizlenip spinner gösterilir. */
button.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

button.is-loading::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: currentColor;
  color: var(--brand-ink);
  animation: spin 0.6s linear infinite;
}

.btn-danger.is-loading::after,
.btn-muted.is-loading::after {
  color: var(--ink);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Tablolar ---------- */

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

th {
  color: var(--ink-faint);
  font-weight: 650;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--border-strong);
}

tbody tr {
  transition: background 0.1s;
}

tbody tr:hover {
  background: var(--paper);
}

.empty-row td {
  color: var(--ink-faint);
  text-align: center;
  padding: 36px 20px;
  font-size: 13.5px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.row-actions form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
}

.row-actions form input,
.row-actions form select {
  width: auto;
  min-width: 110px;
  padding: 6px 8px;
  font-size: 12.5px;
  margin-top: 0;
}

.table-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.device-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.device-name {
  font-size: 12px;
  color: var(--ink-faint);
}

.mono {
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12.5px;
}

details summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.log-detail {
  margin: 8px 0 0;
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  color: var(--ink-muted);
  white-space: pre-wrap;
  max-width: 320px;
}

/* ---------- Rozetler ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

.badge-ok {
  background: var(--ok-bg);
  color: var(--ok-ink);
}

.badge-warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
}

.badge-bad {
  background: var(--bad-bg);
  color: var(--bad-ink);
}

.badge-muted {
  background: var(--muted-bg);
  color: var(--muted-ink);
}

/* Aktivite türüne göre küçük nokta (Activity sayfası) - durum rozetlerinden ayrı, sade. */
.event-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 8px;
  background: var(--ink-faint);
}

.event-dot.ok {
  background: var(--ok-dot);
}

.event-dot.warn {
  background: var(--warn-dot);
}

.event-dot.bad {
  background: var(--bad-dot);
}

/* ---------- Tanım listesi ---------- */

dl.summary {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 11px 16px;
  margin: 0 0 4px;
}

dl.summary dt {
  color: var(--ink-faint);
  font-size: 12.5px;
  font-weight: 650;
  padding-top: 2px;
}

dl.summary dd {
  margin: 0;
  font-size: 13.5px;
}

.device-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.device-list li {
  padding: 8px 12px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

/* ---------- Yönetici kabuğu ---------- */

.shell {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - 56px);
}

.sidebar {
  flex: 0 0 224px;
  background: var(--side-bg);
  padding: 16px 12px;
  position: sticky;
  top: 56px;
  align-self: flex-start;
  height: calc(100vh - 56px);
  overflow-y: auto;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--side-ink);
  border-left: 2px solid transparent;
}

.sidebar a:hover {
  background: var(--side-bg-raise);
  text-decoration: none;
  color: #fff;
}

.sidebar a.active {
  background: var(--side-bg-raise);
  color: var(--side-ink-active);
  border-left-color: var(--brand);
}

.sidebar a.active .icon {
  color: var(--brand);
}

.sidebar .icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: inherit;
  opacity: 0.9;
}

.sidebar-section-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #656d82;
  padding: 16px 12px 6px;
}

.main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 28px 28px 64px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 20px;
}

.page-header .page-lede {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 13px;
}

.page-header-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

/* ---------- İstatistik kartları (Dashboard) ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 24px;
  box-shadow: var(--shadow);
}

.stat-card {
  background: var(--card);
  padding: 16px 18px;
}

.stat-card .stat-label {
  font-size: 11.5px;
  font-weight: 650;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin: 0 0 8px;
}

.stat-card .stat-value {
  font-size: 25px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.4px;
}

.stat-card .stat-value.warn {
  color: var(--warn-ink);
}

.stat-card .stat-value.bad {
  color: var(--bad-ink);
}

/* ---------- Arama / filtre çubuğu ---------- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 16px;
}

.toolbar input[type="search"],
.toolbar input[type="text"] {
  margin: 0;
  width: auto;
  flex: 1 1 220px;
}

.toolbar select {
  margin: 0;
  width: auto;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-pills a {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  color: var(--ink-muted);
  background: var(--muted-bg);
}

.filter-pills a:hover {
  text-decoration: none;
  background: var(--border-strong);
}

.filter-pills a.active {
  background: var(--ink);
  color: #fff;
}

/* ---------- Geri bağlantı / nefes alanı ---------- */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-muted);
}

.back-link:hover {
  color: var(--ink);
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 16px;
}

.section-title h1 {
  margin: 0;
}

.muted {
  color: var(--ink-muted);
  font-size: 13px;
}

/* ---------- Modal / onay diyaloğu ---------- */

dialog.modal {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  width: min(420px, calc(100vw - 32px));
  box-shadow: var(--shadow-lg);
}

dialog.modal::backdrop {
  background: rgba(10, 12, 20, 0.45);
}

.modal-body {
  padding: 22px 22px 18px;
}

.modal-body h2 {
  margin: 0 0 8px;
  font-size: 15px;
}

.modal-body p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  background: var(--paper);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* Yeni müşteri drawer'ı - mevcut mimariye (tam sayfa) ek, ayrı bir sayfa değil. */
dialog.drawer {
  border: none;
  padding: 0;
  margin: 0 0 0 auto;
  height: 100vh;
  max-height: 100vh;
  width: min(420px, 100vw);
  box-shadow: var(--shadow-lg);
}

dialog.drawer::backdrop {
  background: rgba(10, 12, 20, 0.4);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.drawer-head h2 {
  margin: 0;
  font-size: 15px;
}

.drawer-body {
  padding: 20px;
}

.drawer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: var(--card);
}

@media (min-width: 540px) {
  dialog[open].drawer {
    animation: drawer-in 0.16s ease-out;
  }
}

@keyframes drawer-in {
  from {
    transform: translateX(16px);
    opacity: 0.6;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ---------- TOTP (2FA) giriş kutuları ---------- */

.otp-group {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.otp-box {
  width: 40px;
  height: 46px;
  text-align: center;
  font-size: 18px;
  font-weight: 650;
  padding: 0;
  font-family: "Cascadia Code", Consolas, monospace;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* input[type="text"] genel kuralı (width:100%) gizli alanı da genişletip yatay kaydırmaya yol açıyordu */
input.sr-only {
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  margin: -1px;
}

/* ---------- Yardımcı sınıflar ----------
   CSP "default-src 'self'" inline style="..." uygulamayı engeller (kasıtlı sertleştirme, zayıflatılmadı).
   Küçük, tekrar eden ayarlamalar (boşluk/genişlik) burada tutulur; sayfa içinde style="" kullanılmaz. */

.license-code {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  font-family: "Cascadia Code", Consolas, monospace;
}

.ml-10 {
  margin-left: 10px;
}

.mt-0 {
  margin-top: 0;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-16 {
  margin-bottom: 16px;
}

.mt-16 {
  margin-top: 16px;
}

.page-lede {
  margin: -8px 0 16px;
}

.center-lede {
  text-align: center;
  margin: 0 0 20px;
  color: var(--ink-muted);
  font-size: 13.5px;
}

.list-item-note {
  color: var(--ink-faint);
}

.device-list-link {
  margin: 20px 0 0;
}

.muted-text {
  color: var(--ink-muted);
}

.badge-row {
  margin: 0 0 18px;
}

.w-70 {
  width: 70px;
}

.w-120 {
  width: 120px;
}

.w-140 {
  width: 140px;
}

.max-w-360 {
  max-width: 360px;
}

.strong-link {
  font-weight: 700;
  color: var(--ink);
}

.search-inline {
  flex: 1 1 220px;
  display: flex;
  gap: 10px;
}

/* ---------- Küçük ekranlar ---------- */

@media (max-width: 900px) {
  .menu-toggle {
    display: inline-flex;
  }

  .shell {
    position: relative;
  }

  .sidebar {
    position: fixed;
    inset: 56px auto auto 0;
    bottom: 0;
    width: 240px;
    height: auto;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.16s ease;
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 56px 0 0 0;
    background: rgba(10, 12, 20, 0.35);
    z-index: 35;
  }

  .sidebar-backdrop.open {
    display: block;
  }

  .main {
    padding: 20px 16px 48px;
  }

  .page-header {
    flex-direction: column;
  }
}

/* ---------- Gelişmiş Buton Stilleri ---------- */

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: var(--brand-ink);
  border: none;
  box-shadow: 0 2px 8px rgba(242, 180, 0, 0.3);
  font-weight: 700;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(242, 180, 0, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(242, 180, 0, 0.3);
}

.btn-secondary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--brand-dark);
  border: 2px solid var(--brand-dark);
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  background: var(--brand);
  color: var(--brand-ink);
  transform: translateY(-1px);
}

.btn-icon-only {
  padding: 10px;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-only:hover {
  transform: scale(1.1);
}

/* ---------- Gelişmiş Form Alanları ---------- */

.field-enhanced {
  position: relative;
}

.field-enhanced input,
.field-enhanced select {
  padding: 12px 14px;
  font-size: 14px;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius);
  transition: all 0.2s ease;
  background: #fff;
}

.field-enhanced input:focus,
.field-enhanced select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(242, 180, 0, 0.15);
  transform: translateY(-1px);
}

.field-enhanced label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.2px;
}

.field-enhanced .field-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.4;
}

/* ---------- Gelişmiş Tablo Stilleri ---------- */

.table-enhanced th {
  background: linear-gradient(180deg, var(--paper) 0%, #fff 100%);
  padding: 14px 16px;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 2px solid var(--border-strong);
}

.table-enhanced td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.table-enhanced tbody tr {
  transition: all 0.2s ease;
}

.table-enhanced tbody tr:hover {
  background: linear-gradient(90deg, var(--paper) 0%, #fff 100%);
  transform: scale(1.002);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* ---------- Gelişmiş Kart Stilleri ---------- */

.card-enhanced {
  background: linear-gradient(145deg, #fff 0%, #fafbff 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
  padding: 24px;
  margin: 0 0 24px;
  transition: all 0.3s ease;
}

.card-enhanced:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.card-enhanced h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

/* ---------- Action Button Stilleri ---------- */

.action-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 13px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.action-button-suspend {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.action-button-suspend:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.action-button-revoke {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.action-button-revoke:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.action-button-extend {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.action-button-extend:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* ---------- Log Detail Geliştirmeleri ---------- */

.log-detail-enhanced {
  margin: 12px 0 0;
  padding: 16px;
  background: linear-gradient(145deg, #1e1e2e 0%, #2d2d3d 100%);
  border: 1px solid #3d3d4d;
  border-radius: var(--radius);
  font-size: 12px;
  color: #e0e0e0;
  white-space: pre-wrap;
  max-width: 100%;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  line-height: 1.6;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.log-detail-enhanced::before {
  content: "JSON DETAY";
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #888;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ---------- Animasyonlar ---------- */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 8px rgba(242, 180, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 16px rgba(242, 180, 0, 0.5);
  }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}

.animate-slide-in {
  animation: slideIn 0.3s ease-out;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

/* ---------- Status Indicators ---------- */

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-indicator-active {
  background: linear-gradient(135deg, var(--ok-bg) 0%, #d1fae5 100%);
  color: var(--ok-ink);
  border: 1px solid var(--ok-dot);
}

.status-indicator-suspended {
  background: linear-gradient(135deg, var(--warn-bg) 0%, #fef3c7 100%);
  color: var(--warn-ink);
  border: 1px solid var(--warn-dot);
}

.status-indicator-revoked {
  background: linear-gradient(135deg, var(--bad-bg) 0%, #fee2e2 100%);
  color: var(--bad-ink);
  border: 1px solid var(--bad-dot);
}

.status-indicator-expired {
  background: linear-gradient(135deg, var(--warn-bg) 0%, #fef3c7 100%);
  color: var(--warn-ink);
  border: 1px solid var(--warn-dot);
}

.status-indicator-none {
  background: linear-gradient(135deg, var(--muted-bg) 0%, #e2e6ef 100%);
  color: var(--muted-ink);
  border: 1px solid var(--border-strong);
}

/* ---------- Device Status ---------- */

.device-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
}

.device-status-online {
  background: var(--ok-bg);
  color: var(--ok-ink);
}

.device-status-stale {
  background: var(--warn-bg);
  color: var(--warn-ink);
}

.device-status-offline {
  background: var(--muted-bg);
  color: var(--muted-ink);
}

/* ---------- Enhanced Copy Button ---------- */

.copy-btn-enhanced {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.copy-btn-enhanced:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.4);
}

.copy-btn-enhanced:active {
  transform: translateY(0);
}

.copy-btn-enhanced.copied {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

/* ---------- Enhanced Detail Link ---------- */

.detail-link-enhanced {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--card) 0%, #f8fafc 100%);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  transition: all 0.2s ease;
  text-decoration: none;
}

.detail-link-enhanced:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(242, 180, 0, 0.2);
}

/* ---------- Compact Stat Cards ---------- */

.stat-compact {
  display: inline-flex;
  flex-direction: column;
  padding: 12px 16px;
  background: linear-gradient(145deg, #fff 0%, #f8fafc 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  min-width: 100px;
}

.stat-compact .label {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}

.stat-compact .value {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

@media (max-width: 640px) {
  .page {
    padding: 20px 16px 48px;
  }

  .topbar {
    padding: 0 12px;
  }

  .topbar .session .session-email {
    display: none;
  }

  dl.summary {
    grid-template-columns: 1fr;
  }

  .row-actions {
    flex-direction: column;
  }

  .stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }

  .otp-box {
    width: 36px;
  }
}
