/* EREN YÖNETİM Panel — tema değişkenleri ana siteden */

:root {
  --bg: #050a14;
  --surface: #0b1220;
  --surface-2: #111b2e;
  --border: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(212, 175, 55, 0.28);
  --text: #f1f5f9;
  --text-muted: rgba(241, 245, 249, 0.55);
  --gold: #d4af37;
  --gold-bright: #f0cc5a;
  --gold-dim: rgba(212, 175, 55, 0.12);
  --emerald: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 260px;
}

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

body.panel-body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.panel-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(212, 175, 55, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(59, 130, 246, 0.06) 0%, transparent 55%);
  z-index: 0;
}

.panel-layout {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
}

.panel-sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #050a14;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: 'Syne', sans-serif;
}

.sidebar-title { font-weight: 700; font-size: 0.9rem; }
.sidebar-sub { font-size: 0.7rem; color: var(--text-muted); }

.sidebar-building {
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}
.sidebar-building-label { display: block; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); }

.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 0.25rem; }
.sidebar-link {
  display: block;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.sidebar-link:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.sidebar-link.active { background: var(--gold-dim); color: var(--gold-bright); border: 1px solid var(--border-gold); }

.sidebar-footer { border-top: 1px solid var(--border); padding-top: 1rem; font-size: 0.85rem; }
.sidebar-user { margin-bottom: 0.5rem; }
.sidebar-logout { color: var(--text-muted); text-decoration: none; }
.sidebar-logout:hover { color: var(--gold); }

.panel-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
}

.panel-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 18, 32, 0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
}

.panel-page-title {
  margin: 0;
  font-size: 1.25rem;
  font-family: 'Syne', sans-serif;
}

.panel-content { padding: 1.5rem; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.card-header h2 { margin: 0; font-size: 1rem; font-family: 'Syne', sans-serif; }
.card-body { padding: 1.25rem; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.stats-grid-1 { grid-template-columns: 1fr; max-width: 320px; }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 1.5rem; font-weight: 700; margin-top: 0.25rem; color: var(--gold-bright); }
.stat-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

/* Forms */
.form-stack { display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label { font-size: 0.85rem; color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group-end { display: flex; align-items: flex-end; }
.form-input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  color: var(--text);
  font: inherit;
  width: 100%;
}
.form-input:focus { outline: none; border-color: var(--border-gold); }
.form-input-sm { width: auto; min-width: 180px; }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.form-divider { border: none; border-top: 1px solid var(--border); margin: 0.5rem 0; }

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all 0.2s;
}
.btn-primary { background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: #050a14; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid transparent; }
.btn-ghost:hover { color: var(--text); border-color: var(--border); }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
.btn-block { width: 100%; }

/* Table */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th, .data-table td { padding: 0.75rem 1.25rem; text-align: left; border-bottom: 1px solid var(--border); }
.data-table th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 600; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.actions { white-space: nowrap; }

/* Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-success { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-warning { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-danger { background: rgba(239,68,68,0.15); color: #f87171; }
.badge-info { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge-muted { background: rgba(255,255,255,0.06); color: var(--text-muted); }

.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.8rem; }
.mt-4 { margin-top: 1.25rem; }
.inline-form { display: inline; }

/* Alerts */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.alert-success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }
.alert-error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }

/* Login */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1rem; }
.login-container { width: 100%; max-width: 420px; position: relative; z-index: 1; }
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.login-brand { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.5rem; }
.login-brand h1 { margin: 0; font-size: 1.1rem; font-family: 'Syne', sans-serif; }
.login-brand p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }

.login-tabs { display: flex; gap: 0.25rem; margin-bottom: 1.25rem; background: var(--surface-2); border-radius: var(--radius-sm); padding: 0.25rem; }
.login-tab {
  flex: 1;
  padding: 0.5rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
}
.login-tab.active { background: var(--gold-dim); color: var(--gold-bright); }
.login-back { text-align: center; margin-top: 1.25rem; font-size: 0.85rem; }
.login-back a { color: var(--text-muted); }
.login-hint { text-align: center; font-size: 0.8rem; margin-top: 1rem; }

/* Modal */
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0;
  max-width: 480px;
  width: calc(100% - 2rem);
}
.modal::backdrop { background: rgba(0,0,0,0.6); }
.modal-form { padding: 1.5rem; }
.modal-form h3 { margin: 0 0 1rem; font-family: 'Syne', sans-serif; }
.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1rem; }

/* Module chips */
.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; }
.module-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  font-size: 0.85rem;
}
.module-chip strong { display: block; margin-bottom: 0.25rem; }

/* Calendar list */
.calendar-list { list-style: none; margin: 0; padding: 0; }
.calendar-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.calendar-list li.overdue strong { color: var(--danger); }

/* Messages */
.message-thread { display: flex; flex-direction: column; gap: 0.75rem; }
.message-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}
.message-item.staff { border-color: var(--border-gold); background: var(--gold-dim); }
.message-head { display: flex; justify-content: space-between; margin-bottom: 0.35rem; font-size: 0.85rem; }
.ticket-meta { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; font-size: 0.9rem; }

.info-list { display: grid; grid-template-columns: 120px 1fr; gap: 0.5rem 1rem; margin: 0; }
.info-list dt { color: var(--text-muted); font-size: 0.85rem; }
.info-list dd { margin: 0; }

.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.action-card {
  display: block;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  transition: border-color 0.2s;
}
.action-card:hover { border-color: var(--border-gold); color: var(--gold-bright); }

.welcome-card h2 { margin: 0 0 0.25rem; font-family: 'Syne', sans-serif; }

code { background: var(--surface-2); padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.85em; }

@media (max-width: 768px) {
  .panel-sidebar { transform: translateX(-100%); }
  .panel-sidebar.open { transform: translateX(0); }
  .panel-main { margin-left: 0; }
  .sidebar-toggle { display: block; }
  .form-row { grid-template-columns: 1fr; }
}
