/* Seren Klinik - Influencer Promo Paneli
   Premium tema: lacivert / beyaz / altın */
:root {
  --navy:        #0e2a47;
  --navy-2:      #143a61;
  --navy-deep:   #0a1f35;
  --gold:        #c8a45c;
  --gold-soft:   #e3cf9e;
  --ink:         #1c2733;
  --muted:       #6b7785;
  --line:        #e7ebf0;
  --bg:          #f5f7fa;
  --white:       #ffffff;
  --ok:          #1f9d6b;
  --warn:        #d98e04;
  --danger:      #d2453f;
  --radius:      14px;
  --shadow:      0 10px 30px rgba(14, 42, 71, 0.08);
  --shadow-lg:   0 18px 50px rgba(14, 42, 71, 0.16);
  --font:        "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--navy-2); text-decoration: none; }
a:hover { color: var(--gold); }
h1, h2, h3 { color: var(--navy); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 1.7rem; margin: 0 0 .4rem; }
h2 { font-size: 1.25rem; }
small, .muted { color: var(--muted); }

/* ---------- Layout ---------- */
.topbar {
  background: linear-gradient(110deg, var(--navy-deep), var(--navy) 55%, var(--navy-2));
  color: #fff;
  border-bottom: 3px solid var(--gold);
}
.topbar .wrap {
  max-width: 1180px; margin: 0 auto; padding: 0 22px;
  display: flex; align-items: center; gap: 26px; height: 64px;
}
.brand { display: flex; align-items: baseline; gap: 8px; font-weight: 800; font-size: 1.15rem; color: #fff; }
.brand .dot { color: var(--gold); }
.brand .sub { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-soft); font-weight: 600; }
.brand:hover { color: #fff; }
.brand-logo { height: 38px; width: auto; display: block; }
.brand-logo-lg { height: 86px; width: auto; display: block; position: relative; margin-bottom: 6px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
  color: #d7e1ec; padding: 8px 14px; border-radius: 9px; font-size: .92rem; font-weight: 500;
  transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.active { background: var(--gold); color: var(--navy-deep); font-weight: 700; }
.nav .who { color: var(--gold-soft); font-size: .82rem; margin-left: 8px; }
.nav .logout { color: #f3c6c4; }

.container { max-width: 1180px; margin: 30px auto 60px; padding: 0 22px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }

/* ---------- Cards & stats ---------- */
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card .card-body { padding: 22px 24px; }
.card .card-head { padding: 16px 24px; border-bottom: 1px solid var(--line); font-weight: 700; color: var(--navy); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: 18px; margin-bottom: 26px; }
.stat {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat::after { content:""; position:absolute; right:-20px; top:-20px; width:78px; height:78px; border-radius:50%; background: linear-gradient(135deg, var(--gold-soft), transparent); opacity:.5; }
.stat .label { color: var(--muted); font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.stat .value { font-size: 1.9rem; font-weight: 800; color: var(--navy); margin-top: 6px; }
.stat .value.gold { color: var(--gold); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
thead th {
  text-align: left; padding: 13px 16px; background: #fbfcfe; color: var(--muted);
  font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; border-bottom: 1px solid var(--line); font-weight: 700;
}
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: #fafbfd; }
tbody tr:last-child td { border-bottom: none; }
.code-pill { font-family: ui-monospace, Menlo, monospace; background: var(--navy); color: var(--gold-soft); padding: 4px 10px; border-radius: 7px; font-size: .85rem; font-weight: 600; letter-spacing: .04em; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.st-yeni    { background: #eef2f7; color: #46607c; }
.st-gorusme { background: #fff4dc; color: #9a6b06; }
.st-olumlu  { background: #e2f0ff; color: #1d6fb8; }
.st-tedavi  { background: #e3f7ee; color: #137a52; }
.st-iptal   { background: #fde7e6; color: #b5302b; }
.badge.on  { background: #e3f7ee; color: #137a52; }
.badge.off { background: #fde7e6; color: #b5302b; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1px solid transparent; border-radius: 10px; padding: 10px 18px;
  font-size: .92rem; font-weight: 600; font-family: inherit; transition: all .15s; text-decoration: none;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); color:#fff; }
.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { background: #d8b772; color: var(--navy-deep); }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-sm { padding: 6px 12px; font-size: .82rem; border-radius: 8px; }
.btn-danger { background: var(--danger); color:#fff; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }
label.field { display: block; }
label.field .lbl { display: block; font-size: .85rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: .95rem; color: var(--ink); background: #fff; transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,164,92,.18); }
textarea { min-height: 90px; resize: vertical; }
.hint { font-size: .78rem; color: var(--muted); margin-top: 5px; }
.form-actions { margin-top: 22px; display: flex; gap: 10px; }

/* ---------- Flash ---------- */
.flash { padding: 13px 18px; border-radius: 11px; margin-bottom: 16px; font-weight: 600; font-size: .92rem; border: 1px solid; }
.flash.success { background: #e9f8f0; border-color: #b8e6d0; color: #137a52; }
.flash.error   { background: #fdecec; border-color: #f3c2c0; color: #b5302b; }
.flash.info    { background: #eaf2fb; border-color: #c4ddf6; color: #1d6fb8; }

/* ---------- Auth (login & public) ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-side {
  background: linear-gradient(150deg, var(--navy-deep), var(--navy) 60%, var(--navy-2));
  color: #fff; padding: 56px 60px; display: flex; flex-direction: column; justify-content: center; position: relative;
}
.auth-side::before { content:""; position:absolute; inset:0; background: radial-gradient(circle at 80% 20%, rgba(200,164,92,.18), transparent 45%); }
.auth-side .brand-lg { font-size: 2rem; font-weight: 800; position: relative; }
.auth-side .brand-lg .dot { color: var(--gold); }
.auth-side .brand-sub { letter-spacing: .22em; text-transform: uppercase; font-size: .78rem; color: var(--gold-soft); margin-top: 8px; position: relative; }
.auth-side .tagline { font-size: 1.45rem; font-weight: 300; line-height: 1.4; margin-top: 40px; max-width: 380px; position: relative; }
.auth-side .feats { margin-top: 34px; position: relative; }
.auth-side .feats li { list-style: none; padding: 7px 0 7px 26px; position: relative; color: #cdd9e6; }
.auth-side .feats li::before { content:"✦"; position:absolute; left:0; color: var(--gold); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--bg); }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h1 { margin-bottom: 4px; }
.auth-box .sub { color: var(--muted); margin-bottom: 26px; }
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .form-grid { grid-template-columns: 1fr; }
}

.center-narrow { max-width: 560px; margin: 0 auto; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .big { font-size: 2.4rem; margin-bottom: 6px; }

/* filters bar */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filters input, .filters select { width: auto; min-width: 160px; }

.row-actions { display: flex; gap: 6px; }
.copy-code { cursor: pointer; }
.badge-select { padding: 6px 10px; font-size: .82rem; border-radius: 8px; min-width: 170px; cursor: pointer; font-weight: 600; }

/* ============================================================
   MOBİL UYUMLULUK (Responsive) — tüm sayfalar
   Aşağıdaki kurallar yalnızca eklemedir; üstteki hiçbir kural
   değiştirilmedi. Küçük ekranlarda devreye girer.
   ============================================================ */

/* Hamburger butonu — masaüstünde gizli, mobilde görünür.
   Saf CSS ile çalışır (header.php'deki gizli checkbox ile). */
.nav-toggle {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}
.nav-burger {
  display: none; margin-left: auto;
  width: 44px; height: 42px; padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px; cursor: pointer;
}
.nav-burger span {
  display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
.nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-toggle:focus-visible ~ .nav-burger { outline: 2px solid var(--gold-soft); outline-offset: 2px; }

@media (max-width: 860px) {
  /* Üst menü → tıklayınca açılan panel */
  .topbar { position: relative; }
  .topbar .wrap { gap: 12px; }
  .nav-burger { display: flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--navy-deep); border-bottom: 3px solid var(--gold);
    box-shadow: var(--shadow-lg); padding: 10px 16px 16px; z-index: 60;
  }
  .nav-toggle:checked ~ .nav { display: flex; }
  .nav a { padding: 12px; border-radius: 9px; font-size: 1rem; }
  .nav .who {
    order: -1; margin: 0 0 4px; padding: 10px 12px 12px;
    border-bottom: 1px solid rgba(255,255,255,.12); font-size: .9rem;
  }
  .nav .logout { margin-top: 4px; padding: 12px; border-top: 1px solid rgba(255,255,255,.12); }

  /* Genel boşluklar */
  .container { margin: 22px auto 48px; padding: 0 16px; }
  .page-head { margin-bottom: 18px; }
  .card .card-head { padding: 14px 16px; }
  .card .card-body { padding: 18px 16px; }

  /* Tablolar yatay kaydırılır (akıcı) */
  .table-wrap { -webkit-overflow-scrolling: touch; }

  /* Filtre çubuğu alt alta */
  .filters { flex-direction: column; align-items: stretch; }
  .filters input, .filters select { width: 100%; min-width: 0; }

  /* Form aksiyon butonları sığmazsa alt satıra */
  .form-actions { flex-wrap: wrap; }

  /* Uzun linkler / kod blokları taşmasın */
  code { overflow-wrap: anywhere; word-break: break-word; }

  /* Public & login formu */
  .auth-main { padding: 36px 20px; }
}

@media (max-width: 560px) {
  h1 { font-size: 1.45rem; }

  /* İstatistik kartları telefonlarda 2'li */
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat { padding: 16px; }
  .stat .value { font-size: 1.55rem; }

  /* Başlık + aksiyon butonu alt alta ve tam genişlik */
  .page-head { align-items: stretch; }
  .page-head > div:first-child { flex: 1 1 100%; }
  .page-head > .btn,
  .page-head .row-actions { width: 100%; }
  .page-head .row-actions .btn { flex: 1 1 0; justify-content: center; }
}
