/* =====================================================================
   Hesap Merkezi - Arayuz
   Sade, hizli, harici bagimliliksiz. Nginx/Apache farketmez.
   Palet: cam yesili kimlik + kagit zemin + grafit metin
   ===================================================================== */

:root {
  --ink:        #23282e;   /* ana metin */
  --ink-soft:   #5d6570;   /* ikincil metin */
  --paper:      #f5f4ef;   /* zemin */
  --card:       #ffffff;
  --line:       #e3e1d8;
  --pine:       #1d5c3f;   /* marka / birincil eylem */
  --pine-dark:  #14432e;
  --pine-soft:  #e7f0ea;
  --amber:      #b45309;   /* uyari vurgusu */
  --danger:     #b3261e;
  --danger-soft:#fbeae9;
  --ok-soft:    #e5f2e8;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(30,40,35,.06), 0 8px 24px rgba(30,40,35,.07);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
a { color: var(--pine); }
img { max-width: 100%; }

:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------------------------ */
/* Giris / sade sayfalar                                               */
/* ------------------------------------------------------------------ */
.auth-wrap {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  gap: 14px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--pine);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 28px 26px;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 4px;
}
.brand-mark {
  width: 14px; height: 14px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--pine) 55%, var(--pine-dark) 55%);
  display: inline-block;
  flex: 0 0 auto;
}
.auth-card h1 { font-size: 21px; margin: 12px 0 4px; }
.auth-sub { color: var(--ink-soft); font-size: 14px; margin: 0 0 18px; }
.auth-project {
  display: flex; align-items: center; gap: 8px;
  background: var(--pine-soft);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13.5px;
  margin-bottom: 16px;
}
.auth-foot { font-size: 13.5px; color: var(--ink-soft); text-align: center; }

/* ------------------------------------------------------------------ */
/* Form elemanlari                                                     */
/* ------------------------------------------------------------------ */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 5px; }
.field .hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }
input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], input[type="url"], select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  color: var(--ink);
  transition: border-color .15s;
}
input:focus, select:focus { border-color: var(--pine); outline: none; box-shadow: 0 0 0 3px rgba(29,92,63,.13); }
input[type="file"] { font: inherit; font-size: 13.5px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 16px; height: 16px; accent-color: var(--pine); }

.btn {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background .15s, border-color .15s;
}
.btn-primary { background: var(--pine); color: #fff; }
.btn-primary:hover { background: var(--pine-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-soft); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13.5px; }
.btn-block { display: block; width: 100%; }

/* ------------------------------------------------------------------ */
/* Uyarilar                                                            */
/* ------------------------------------------------------------------ */
.alert {
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid transparent;
  width: 100%;
  max-width: 400px;
}
.content-inner .alert { max-width: none; }
.alert-success { background: var(--ok-soft); color: #14532d; border-color: #bcdcc6; }
.alert-error   { background: var(--danger-soft); color: var(--danger); border-color: #f0c8c5; }
.alert-info    { background: #eef2f7; color: #33445c; border-color: #d6dfeb; }

/* ------------------------------------------------------------------ */
/* Panel iskeleti (yan menu)                                           */
/* ------------------------------------------------------------------ */
.shell { display: flex; min-height: 100dvh; }
.sidebar {
  width: 248px;
  flex: 0 0 auto;
  background: var(--pine-dark);
  color: #e9efe9;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  /* Sol alt sabit: sidebar ekran boyunda kalir, sayfa uzasa da
     kullanici bilgisi + Abmelden hep gorunur; uzun menu kendi icinde kayar */
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: hidden;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; padding: 2px 8px 18px; color: #fff; }
.brand .brand-mark { background: linear-gradient(135deg, #7fbf9a 55%, #4c8f6c 55%); }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.nav-group {
  font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: #9dbfa9; padding: 14px 8px 5px;
}
.nav a {
  color: #dfe9df;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 14.5px;
}
.nav a:hover { background: rgba(255,255,255,.08); }
.nav a.active { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; }
.sidebar-foot { border-top: 1px solid rgba(255,255,255,.14); padding-top: 14px; margin-top: auto; flex: 0 0 auto; }
.sidebar-foot .btn-ghost { color: #e9efe9; border-color: rgba(255,255,255,.25); }
.sidebar-foot .btn-ghost:hover { border-color: #fff; }
.me { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 0 4px; }
.me-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.me-text strong { font-size: 13.5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text span { font-size: 12px; color: #9dbfa9; }

.content { flex: 1 1 auto; min-width: 0; }
.content-inner { max-width: none; padding: 34px 34px 60px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 23px; margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--ink-soft); font-size: 14px; }

/* ------------------------------------------------------------------ */
/* Kartlar, tablolar, rozetler                                         */
/* ------------------------------------------------------------------ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 20px;
}
.card h2 { font-size: 16.5px; margin: 0 0 14px; }
.card .card-sub { color: var(--ink-soft); font-size: 13.5px; margin: -8px 0 16px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.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(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat b { display: block; font-size: 26px; letter-spacing: -.02em; }
.stat span { font-size: 13px; color: var(--ink-soft); }

.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-soft); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.list td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
.cell-user { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.cell-user small { display: block; color: var(--ink-soft); }

.badge { display: inline-block; padding: 2.5px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-green { background: var(--ok-soft); color: #14532d; }
.badge-gray  { background: #ecebe5; color: #565d55; }
.badge-amber { background: #fdf0e2; color: var(--amber); }
.badge-red   { background: var(--danger-soft); color: var(--danger); }

.avatar { border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.avatar-letter {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--pine-soft); color: var(--pine-dark); font-weight: 700;
}

.key-box {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  background: #f1f0ea;
  border: 1px dashed #c9c6ba;
  border-radius: 8px;
  padding: 10px 12px;
  word-break: break-all;
  user-select: all;
}
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.muted { color: var(--ink-soft); font-size: 13.5px; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* ------------------------------------------------------------------ */
/* Mobil                                                               */
/* ------------------------------------------------------------------ */
.nav-toggle {
  display: none;
  position: fixed;
  top: 12px; left: 12px;
  z-index: 40;
  width: 42px; height: 42px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow);
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .shell { flex-direction: column; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 262px;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 0 0 40px rgba(0,0,0,.25);
  }
  .sidebar.open { transform: translateX(0); }
  .content-inner { padding: 70px 18px 50px; }
  .grid-2 { grid-template-columns: 1fr; }
}