/* Serfpos /hesap — stitch tokens (yeşil marka) */
:root {
  --primary: #004225;
  --primary-hover: #005C34;
  --primary-pressed: #012800;
  --primary-container: #E6F0EA;
  --on-primary-container: #012800;
  --surface: #F5F7F6;
  --surface-raised: #ffffff;
  --on-surface: #0A0A0A;
  --muted: #4A5560;
  --outline: #D5DDD8;
  --sidebar: #000000;
  --sidebar-hover: #1A1A1A;
  --sidebar-text: #F5F7F6;
  --sidebar-muted: #8A9A90;
  --ok: #079455;
  --ok-bg: #ecfdf3;
  --warn: #dc6803;
  --warn-bg: #fffaeb;
  --danger: #d92d20;
  --danger-bg: #fef3f2;
  --sidebar-w: 220px;
  --top-h: 56px;
  --font: "Lato", "Segoe UI", sans-serif;
  --display: "Montserrat", "Lato", sans-serif;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.hesap-app {
  font-family: var(--font);
  font-size: 14px;
  color: var(--on-surface);
  background: var(--surface);
  display: flex;
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
code { font-family: ui-monospace, Consolas, monospace; font-size: 0.92em; }

.hesap-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  z-index: 40;
  padding: 1rem 0.75rem;
}
.hesap-brand {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  color: inherit;
  padding: 0.35rem 0.5rem 1rem;
  border-bottom: 1px solid #1d2939;
  margin-bottom: 0.75rem;
}
.hesap-brand img { border-radius: 8px; }
.hesap-brand strong {
  display: block;
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.hesap-brand small { color: var(--sidebar-muted); font-size: 0.75rem; }
.hesap-nav { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; }
.hesap-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  color: var(--sidebar-muted);
  min-height: 44px;
}
.hesap-nav-link:hover { background: var(--sidebar-hover); color: var(--sidebar-text); }
.hesap-nav-link.is-active {
  background: var(--primary);
  color: #fff;
}
.hesap-nav-icon { width: 20px; height: 20px; display: grid; place-items: center; }
.hesap-nav-icon svg { width: 18px; height: 18px; }
.hesap-logout { margin-top: auto; }

.hesap-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.hesap-top {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--top-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--outline);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
}
.hesap-top h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
  flex: 1;
}
.hesap-top-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.hesap-link-quiet { color: var(--muted); }
.hesap-menu-btn {
  display: none;
  border: 0;
  background: transparent;
  font-size: 1.25rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}
.hesap-content {
  padding: 1.25rem;
  width: min(1120px, 100%);
  margin: 0 auto;
}
.hesap-demo-banner {
  margin: 0 0 1rem;
  padding: 0.55rem 0.85rem;
  background: var(--primary-container);
  color: var(--on-primary-container);
  border-radius: 8px;
  font-size: 0.85rem;
}

.hesap-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-primary-container);
}
.hesap-hint { margin: 0; color: var(--muted); }
.hesap-hero-admin {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: stretch;
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #E6F0EA 0%, #ffffff 55%, #F5F7F6 100%);
  border: 1px solid #B8C4BC;
}
.hesap-hero-admin--compact { margin-bottom: 1rem; }
.hesap-hero-admin h2 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: 1.35rem;
}
.hesap-hero-admin p { margin: 0; color: var(--muted); max-width: 36rem; line-height: 1.45; }
.hesap-hero-status {
  min-width: 10rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--outline);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
}
.hesap-hero-status span { color: var(--muted); font-size: 0.8rem; }
.hesap-hero-status strong { font-family: var(--display); }
.hesap-hero-status.is-ok { border-color: #abefc6; background: var(--ok-bg); }
.hesap-hero-status.is-ok strong { color: var(--ok); }
.hesap-hero-status.is-bad { border-color: #fecdca; background: var(--danger-bg); }
.hesap-hero-status.is-bad strong { color: var(--danger); }

.hesap-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.hesap-action {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  border-radius: 8px;
  background: var(--primary);
  color: #fff !important;
  font-weight: 700;
}
.hesap-action:hover { background: var(--primary-hover); color: #fff !important; }
.hesap-action--ghost {
  background: transparent;
  color: var(--on-surface) !important;
  border: 1px solid var(--outline);
}
.hesap-action--ghost:hover { background: var(--primary-container); color: var(--on-primary-container) !important; }

.hesap-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
  margin-bottom: 0;
}
@media (max-width: 960px) {
  .hesap-split { grid-template-columns: 1fr; }
}

.hesap-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.hesap-feed li {
  display: grid;
  gap: 0.15rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--outline);
}
.hesap-feed li:last-child { border-bottom: 0; padding-bottom: 0; }
.hesap-feed time { font-size: 0.75rem; color: var(--muted); }
.hesap-feed strong { font-size: 0.9rem; }
.hesap-feed span { color: var(--muted); }

.hesap-dl { margin: 0; display: grid; gap: 0.75rem; }
.hesap-dl > div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.5rem;
  align-items: baseline;
}
.hesap-dl dt { margin: 0; color: var(--muted); font-size: 0.85rem; }
.hesap-dl dd { margin: 0; }

.hesap-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.hesap-stats--admin {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}
.hesap-stat {
  background: var(--surface-raised);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.hesap-stat span { display: block; color: var(--muted); font-size: 0.8rem; margin-bottom: 0.35rem; }
.hesap-stat strong {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 700;
}

.hesap-card {
  background: var(--surface-raised);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.hesap-card h2 {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-size: 1rem;
}
.hesap-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}
.hesap-toolbar h2 { margin: 0; }
.hesap-count { color: var(--muted); font-weight: 400; }

.hesap-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.hesap-search input,
.hesap-search select,
.hesap-form input,
.hesap-form select,
.hesap-form textarea {
  min-height: 40px;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--outline);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}
.hesap-search input[type="search"] { min-width: 12rem; flex: 1 1 12rem; }
.hesap-search button,
.hesap-btn {
  min-height: 40px;
  padding: 0.45rem 1rem;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.hesap-btn:hover { background: var(--primary-hover); }
.hesap-btn--ghost {
  background: transparent;
  color: var(--on-surface);
  border: 1px solid var(--outline);
}
.hesap-btn--ghost:hover { background: var(--primary-container); color: var(--on-primary-container); }

.hesap-table-wrap { overflow-x: auto; }
table.hesap-table {
  width: 100%;
  border-collapse: collapse;
}
.hesap-table th,
.hesap-table td {
  text-align: left;
  padding: 0.7rem 0.55rem;
  border-bottom: 1px solid var(--outline);
  vertical-align: top;
}
.hesap-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--primary-container);
}
.hesap-table tr:hover td { background: #fafafa; }
.hesap-table .row-child td:first-child { padding-left: 1.5rem; }

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }

.hesap-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}
.hesap-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}
.hesap-form label.full { grid-column: 1 / -1; }
.hesap-form .actions { grid-column: 1 / -1; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.hesap-fieldset {
  grid-column: 1 / -1;
  border: 1px solid var(--border, #e4e7ec);
  border-radius: 8px;
  padding: 0.85rem 1rem 1rem;
  margin: 0 0 0.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.hesap-fieldset legend {
  padding: 0 0.35rem;
  font-weight: 700;
  font-size: 0.9rem;
}
.hesap-fieldset legend code {
  font-weight: 500;
  opacity: 0.7;
  margin-left: 0.35rem;
}
.hesap-fieldset label.full,
.hesap-fieldset .full { grid-column: 1 / -1; }
.hesap-fieldset textarea {
  min-height: 72px;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--outline);
  border-radius: 8px;
  font: inherit;
}
@media (max-width: 720px) {
  .hesap-fieldset { grid-template-columns: 1fr; }
}

.hesap-check {
  flex-direction: row !important;
  align-items: flex-start;
  gap: 0.55rem !important;
  font-weight: 500 !important;
}
.hesap-check input { margin-top: 0.2rem; width: auto; min-height: 0; }
.hesap-steps {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}
.hesap-steps li { margin-bottom: 0.35rem; }
.hesap-muted { color: var(--muted); font-size: 0.88rem; }
.hesap-license-key {
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  word-break: break-all;
}
.hesap-hint { color: var(--muted); font-size: 0.9rem; }

.hesap-mode-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.hesap-mode-opt {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--outline);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
}
.hesap-mode-opt:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-container, #E6F0EA);
  color: var(--on-primary-container, #012800);
}
.hesap-issue-result {
  border: 1px solid #bbf7d0;
  background: linear-gradient(180deg, #fff 0%, #f0fdf4 100%);
}
.hesap-mod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.45rem 0.75rem;
}

.hesap-alert {
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.hesap-alert.error { background: var(--danger-bg); color: var(--danger); }
.hesap-alert.success { background: var(--ok-bg); color: var(--ok); }

.hesap-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
}

/* Login */
body.hesap-login {
  display: grid;
  place-items: center;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(234, 88, 12, 0.18), transparent 55%),
    linear-gradient(160deg, #101828 0%, #1d2939 45%, #0c111d 100%);
  font-family: var(--font);
  margin: 0;
  padding: 1.5rem;
}
.hesap-login-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.hesap-login-card .brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.25rem;
}
.hesap-login-card .brand strong {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  display: block;
}
.hesap-login-card h1 {
  font-family: var(--display);
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
}
.hesap-login-card .muted { color: var(--muted); margin: 0 0 1.25rem; font-size: 0.9rem; }
.hesap-login-card label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.85rem;
}
.hesap-login-card input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--outline);
  border-radius: 8px;
  font: inherit;
}
.hesap-login-card button {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 0.5rem;
}
.hesap-login-card button:hover { background: var(--primary-hover); }
.hesap-login-hint {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}
.hesap-login-hint code {
  background: var(--primary-container);
  color: var(--on-primary-container);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

@media (max-width: 900px) {
  .hesap-sidebar {
    transform: translateX(-105%);
    transition: transform .25s ease;
  }
  body.hesap-nav-open .hesap-sidebar { transform: none; }
  .hesap-main { margin-left: 0; }
  .hesap-menu-btn { display: inline-grid; place-items: center; }
  .hesap-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(16, 24, 40, 0.45);
    z-index: 30;
  }
}
