/* melihmandaci.com — admin ve uye panelleri */

:root {
  --bg: #0e0f12;
  --surface: #16181d;
  --surface-2: #1d2026;
  --line: #2a2e37;
  --text: #e8eaee;
  --muted: #9aa1ae;
  --accent: #e2ff3d;
  --accent-ink: #10130a;
  --ok: #3ddc84;
  --error: #ff6b6b;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Ust bar ------------------------------------------------------------ */
.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.brand { font-weight: 700; letter-spacing: .02em; color: var(--text); }
.topbar nav { display: flex; gap: 18px; }
.topbar nav a { color: var(--muted); font-size: 14px; }
.topbar nav a:hover { color: var(--text); text-decoration: none; }
.who { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--muted); }
.logout { color: var(--muted); }

.panel { max-width: 1160px; margin: 0 auto; padding: 28px 20px 80px; }
.panel h1 { font-size: 26px; margin: 0 0 20px; }

/* --- Kartlar ------------------------------------------------------------ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 22px;
}
.card h2 { font-size: 16px; margin: 0 0 12px; font-weight: 600; }
.count {
  font-size: 12px; color: var(--muted); background: var(--surface-2);
  padding: 2px 8px; border-radius: 20px; margin-left: 6px;
}
.hint { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.hint code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--muted); }

/* --- Bildirim ----------------------------------------------------------- */
.flash {
  padding: 11px 14px; border-radius: var(--radius); margin-bottom: 18px;
  border: 1px solid var(--line); background: var(--surface-2); font-size: 14px;
}
.flash-ok { border-color: rgba(61, 220, 132, .4); color: var(--ok); }
.flash-error { border-color: rgba(255, 107, 107, .45); color: var(--error); }

/* --- Ders hakki serdi --------------------------------------------------- */
.credit-bar {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 22px;
  display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
}
.credit-bar strong { font-size: 26px; color: var(--accent); }
.credit-bar span { color: var(--muted); font-size: 13px; }
.credit-empty strong { color: var(--error); }

/* --- Formlar ------------------------------------------------------------ */
label { display: block; font-size: 13px; color: var(--muted); }
input, select, button {
  font: inherit; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

button {
  cursor: pointer; background: var(--accent); color: var(--accent-ink);
  border-color: transparent; font-weight: 600;
}
button:hover { filter: brightness(1.08); }

.btn-ghost {
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); font-weight: 500;
  padding: 6px 12px; border-radius: 8px; font-size: 13px;
  display: inline-block; text-decoration: none;
}
.btn-ghost:hover { background: #262a33; text-decoration: none; }
.btn-ghost.disabled { opacity: .35; pointer-events: none; }

.btn-mini {
  background: transparent; color: var(--muted); border: 1px solid var(--line);
  font-size: 11px; padding: 2px 7px; border-radius: 6px; font-weight: 500;
  margin-top: 4px; width: 100%;
}
.btn-mini:hover { color: var(--error); border-color: var(--error); filter: none; }

.form-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.form-row label { display: flex; flex-direction: column; gap: 4px; }
.inline { display: inline-flex; gap: 6px; align-items: center; margin: 4px 0 0; }

/* --- Hafta izgarasi ----------------------------------------------------- */
.week-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px; font-size: 14px; flex-wrap: wrap;
}

.week-grid, .rule-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px;
}
.day-col {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px; min-width: 0;
}
.day-col.is-today { border-color: var(--accent); }
.day-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 4px; margin-bottom: 8px; padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.day-name { font-size: 12px; font-weight: 600; }
.day-date { font-size: 11px; color: var(--muted); }
.day-empty { color: var(--muted); font-size: 12px; text-align: center; margin: 12px 0; }

/* --- Slotlar ------------------------------------------------------------ */
.slot {
  display: block; width: 100%; text-align: center;
  border-radius: 6px; padding: 6px 4px; margin-bottom: 5px;
  font-size: 13px; font-weight: 600; border: 1px solid transparent;
  background: var(--surface); color: var(--text);
}
.slot small { display: block; font-size: 10px; font-weight: 400; opacity: .75; }

.slot-free { border-color: var(--line); cursor: pointer; }
button.slot-free:hover { background: var(--accent); color: var(--accent-ink); }
.slot-taken { background: #2b2230; color: var(--muted); border-color: #3a2f42; }
.slot-mine { background: rgba(61, 220, 132, .12); border-color: var(--ok); color: var(--ok); }
.slot-past { opacity: .3; }
.slot-locked { opacity: .45; border: 1px dashed var(--line); }
.admin-slot { text-align: left; padding: 7px; }
.admin-slot small { text-align: left; }

/* --- Randevu listesi ---------------------------------------------------- */
.appt-list { list-style: none; margin: 0; padding: 0; }
.appt-list li {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.appt-list li:last-child { border-bottom: none; }
.appt-when { font-weight: 600; }
.appt-locked { font-size: 12px; color: var(--muted); }

/* --- Tablo -------------------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 12px; color: var(--muted); font-weight: 600;
  padding: 8px; border-bottom: 1px solid var(--line);
}
.table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.row-passive { opacity: .5; }
.tag {
  font-size: 10px; background: var(--surface-2); color: var(--muted);
  padding: 1px 6px; border-radius: 10px; margin-left: 6px;
}
.credits { font-size: 17px; font-weight: 700; color: var(--accent); margin-right: 6px; }
.credits.zero { color: var(--error); }
.actions details { margin-bottom: 6px; }
.actions summary { cursor: pointer; font-size: 13px; color: var(--muted); }

/* --- Giris sayfasi ------------------------------------------------------ */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-card {
  width: 100%; max-width: 360px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; padding: 32px 28px;
}
.login-brand { display: block; font-size: 20px; font-weight: 700; color: var(--text); }
.login-sub { color: var(--muted); font-size: 14px; margin: 4px 0 22px; }
.login-card label { margin-bottom: 5px; }
.login-card input { width: 100%; margin-bottom: 16px; }
.login-card button { width: 100%; padding: 11px; }
.login-note { font-size: 12px; color: var(--muted); margin: 20px 0 0; line-height: 1.6; }

/* --- Dar ekran ---------------------------------------------------------- */
@media (max-width: 900px) {
  .week-grid, .rule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table { display: block; overflow-x: auto; }
}
@media (max-width: 520px) {
  .week-grid, .rule-grid { grid-template-columns: 1fr; }
  .panel { padding: 20px 14px 60px; }
  .topbar { padding: 12px 14px; gap: 14px; }
}
