/* Yankı — temel stil. Build adımı yok (K-05). */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1b1f24;
  --muted: #5b6573;
  --border: #dde2e8;
  --primary: #2f5bea;
  --primary-contrast: #ffffff;
  --danger: #c62828;
  --warning: #b26a00;
  --success: #2e7d32;
  --radius: 10px;
  --space: 1rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151a;
    --surface: #1b2027;
    --text: #e6e9ee;
    --muted: #9aa4b2;
    --border: #2c333d;
    --primary: #7c9bff;
    --primary-contrast: #0d1117;
    color-scheme: dark;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
}

main { flex: 1; padding-block: calc(var(--space) * 2); }

a { color: var(--primary); }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }

.container {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: var(--space);
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: var(--space);
  top: var(--space);
  background: var(--surface);
  padding: .5rem 1rem;
  border-radius: var(--radius);
  z-index: 10;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
}
.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--space);
  color: var(--muted);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: calc(var(--space) * 1.5);
}

.lead { font-size: 1.125rem; }
.muted { color: var(--muted); }

.btn {
  display: inline-block;
  padding: .55rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-contrast);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.btn:focus-visible,
a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--border);
}
.btn-danger { background: var(--danger); color: #fff; }
.btn-small { padding: .3rem .65rem; font-size: .875rem; }

.link-button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--primary);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.link-button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Üst menü */
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem 1rem;
  font-size: .95rem;
}
.nav-tenant {
  color: var(--muted);
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
form.inline { display: inline-flex; align-items: center; gap: .4rem; margin: 0; }

/* Kartlar ve formlar */
.card + .card,
h1 + .card,
.alert + .card { margin-top: var(--space); }
.narrow { max-width: 30rem; margin-inline: auto; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.field { display: flex; flex-direction: column; gap: .25rem; margin-bottom: var(--space); }
.field label { font-weight: 600; }
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  padding: .55rem .7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
input[aria-invalid="true"],
select[aria-invalid="true"] { border-color: var(--danger); }
.input-short { width: auto !important; max-width: 11rem; }
fieldset.field { border: 0; padding: 0; margin: 0 0 var(--space); }
fieldset.field legend { font-weight: 600; padding: 0; margin-bottom: .25rem; }
.check { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-weight: 400 !important; margin-bottom: .4rem; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0 var(--space); }
.form-actions { margin-top: var(--space); }
.form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 var(--space); }
.form-row .field { flex: 1 1 14rem; }
.form-row .btn { margin-bottom: var(--space); }
.form-links { margin-top: var(--space); font-size: .95rem; }

.alert {
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: var(--radius);
  padding: .65rem .9rem;
  margin-bottom: var(--space);
  background: var(--surface);
}
.alert-success { border-left-color: var(--success); }
.alert-danger { border-left-color: var(--danger); }

/* Tablo ve liste */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: .875rem; color: var(--muted); font-weight: 600; }
td select { width: auto; }

.list { list-style: none; margin: 0; padding: 0; }
.list-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border);
}
.badge {
  display: inline-block;
  padding: .1rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--success);
  color: var(--success);
  font-size: .8rem;
}

.badge-muted { border-color: var(--border); color: var(--muted); }
.badge-past_due,
.badge-trial { border-color: var(--warning); color: var(--warning); }
.badge-expired { border-color: var(--danger); color: var(--danger); }

/* Abonelik durum şeridi */
.banner {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  padding-block: .5rem;
  font-size: .95rem;
}
.banner-warning { border-left-color: var(--warning); }

/* Tanım listesi (abonelik özeti) */
.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .4rem 1.25rem;
  margin: 0 0 var(--space);
}
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; }
th[scope="row"] { width: 50%; color: var(--text); font-weight: 500; font-size: 1rem; }

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

/* Süper yönetici */
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
  margin-bottom: var(--space);
  border-bottom: 1px solid var(--border);
  padding-bottom: .5rem;
}
.subnav a[aria-current="page"] { font-weight: 700; text-decoration: none; color: var(--text); }
.subnav + .card,
.subnav + .alert,
form > .card + .card { margin-top: var(--space); }
.pager { display: flex; gap: 1rem; align-items: center; margin-top: var(--space); }
pre.code {
  margin: .4rem 0 0;
  padding: .5rem;
  max-width: 32rem;
  overflow-x: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .8rem;
}
