/* ============================================
   GIRLEVİK — ADMIN PANEL STYLES
   ============================================ */

:root {
  --gold: #c9a35b;
  --gold-light: #e6c98a;
  --gold-dark: #8a6d2c;
  --espresso: #1a120b;
  --espresso-2: #251a10;
  --cream: #f7f1e6;
  --cream-2: #ede2cb;
  --burgundy: #6e1f23;
  --burgundy-2: #8a2a2f;
  --ink: #0f0a06;
  --muted: #9a8a72;
  --line: rgba(201, 163, 91, 0.25);
  --line-2: rgba(201, 163, 91, 0.12);
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --transition: 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { background: var(--ink); color: var(--cream); font-family: 'Inter', system-ui, sans-serif; }
body { line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; transition: var(--transition); }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 { font-family: 'Playfair Display', serif; font-weight: 600; line-height: 1.2; }

/* ============================================
   SHELL
   ============================================ */
.admin-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
@media (max-width: 1024px) { .admin-shell { grid-template-columns: 1fr; } }

/* ============================================
   SIDEBAR
   ============================================ */
.admin-sidebar {
  background: var(--espresso);
  border-right: 1px solid var(--line-2);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  z-index: 50;
}
.admin-brand {
  display: flex; align-items: center; gap: 14px;
  padding: 24px; border-bottom: 1px solid var(--line-2);
}
.admin-brand .brand-mark {
  width: 48px; height: 48px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--gold-light), var(--gold) 60%, var(--gold-dark));
  display: grid; place-items: center;
  color: var(--espresso); font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.2rem;
  box-shadow: 0 0 0 1px var(--gold), 0 6px 18px -6px rgba(201,163,91,0.5);
}
.admin-brand h2 { font-size: 1.3rem; }
.admin-brand small { color: var(--gold); font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; font-family: 'Inter', sans-serif; }

.admin-nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 8px;
  color: var(--cream-2); font-size: 0.92rem;
  transition: var(--transition);
}
.nav-item:hover { background: var(--espresso-2); color: var(--gold); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(201,163,91,0.15), transparent);
  color: var(--gold);
  border-left: 3px solid var(--gold);
  padding-left: 11px;
}
.nav-item i { width: 18px; text-align: center; }

.admin-sidebar-footer {
  padding: 16px 12px; border-top: 1px solid var(--line-2);
  display: flex; flex-direction: column; gap: 4px;
}
.admin-sidebar-footer a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  color: var(--muted); font-size: 0.85rem;
}
.admin-sidebar-footer a:hover { color: var(--gold); background: var(--espresso-2); }

/* ============================================
   MAIN
   ============================================ */
.admin-main { min-width: 0; }

.admin-topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 32px;
  background: var(--espresso);
  border-bottom: 1px solid var(--line-2);
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(8px);
}
.admin-menu-toggle { display: none; padding: 8px; color: var(--gold); }
.admin-page-title { font-size: 1.4rem; flex: 1; }
.admin-topbar-actions { display: flex; gap: 8px; }
.btn-icon {
  width: 40px; height: 40px; border-radius: 8px;
  display: grid; place-items: center;
  border: 1px solid var(--line-2);
  color: var(--muted);
  transition: var(--transition);
}
.btn-icon:hover { color: var(--gold); border-color: var(--gold); }

@media (max-width: 1024px) {
  .admin-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 280px;
    transform: translateX(-100%); transition: transform 0.3s ease;
  }
  .admin-sidebar.open { transform: translateX(0); box-shadow: 0 0 60px rgba(0,0,0,0.5); }
  .admin-menu-toggle { display: block; }
}

.admin-content { padding: 32px; }
@media (max-width: 700px) { .admin-content { padding: 16px; } }

/* ============================================
   FLASH MESSAGES
   ============================================ */
.admin-flash {
  padding: 14px 20px; border-radius: 8px; margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
  font-size: 0.92rem;
  transition: opacity 0.4s ease;
}
.admin-flash i { font-size: 1.1rem; }
.admin-flash-success { background: rgba(109, 190, 109, 0.15); color: #6dbe6d; border: 1px solid rgba(109, 190, 109, 0.3); }
.admin-flash-error { background: rgba(214, 90, 90, 0.15); color: #d65a5a; border: 1px solid rgba(214, 90, 90, 0.3); }

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--espresso);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px; flex-wrap: wrap;
}
.card-title { font-size: 1.15rem; display: flex; align-items: center; gap: 10px; }
.card-title i { color: var(--gold); }
.card-subtitle { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }

/* ============================================
   FORMS
   ============================================ */
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .form-row { grid-template-columns: 1fr; } }

.form-label {
  display: block;
  font-size: 0.78rem; color: var(--gold);
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 8px; font-weight: 500;
}
.form-label i { margin-right: 4px; }
.form-hint { color: var(--muted); font-size: 0.8rem; margin-top: 6px; }

.form-input, .form-textarea, .form-select {
  width: 100%; padding: 12px 16px;
  background: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  color: var(--cream);
  font-family: inherit; font-size: 0.95rem;
  transition: var(--transition);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none; border-color: var(--gold);
}
.form-textarea { min-height: 120px; line-height: 1.6; resize: vertical; }
.form-input-color { width: 60px; height: 40px; padding: 4px; border-radius: 8px; cursor: pointer; }

.form-file {
  padding: 12px 16px; background: var(--ink);
  border: 1px dashed var(--line);
  border-radius: 8px; color: var(--cream);
  width: 100%;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 8px;
  font-weight: 600; font-size: 0.88rem;
  letter-spacing: 0.05em; cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}
.btn-primary { background: var(--gold); color: var(--espresso); }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--cream); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-danger { background: var(--burgundy); color: white; }
.btn-danger:hover { background: var(--burgundy-2); }
.btn-success { background: #2d8659; color: white; }
.btn-success:hover { background: #38a06e; }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================
   TABLES
   ============================================ */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  text-align: left; padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
  font-size: 0.92rem;
}
.table th { color: var(--gold); font-weight: 500; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; }
.table tr:hover td { background: rgba(201, 163, 91, 0.04); }
.table-img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; }
.table-actions { display: flex; gap: 6px; }

/* ============================================
   LISTS
   ============================================ */
.list { display: flex; flex-direction: column; gap: 12px; }
.list-item {
  display: flex; align-items: center; gap: 16px;
  padding: 16px; background: var(--ink);
  border: 1px solid var(--line-2); border-radius: 10px;
  transition: var(--transition);
}
.list-item:hover { border-color: var(--gold); }
.list-item-img { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; background: var(--espresso-2); }
.list-item-body { flex: 1; min-width: 0; }
.list-item-title { font-weight: 600; margin-bottom: 4px; font-family: 'Playfair Display', serif; }
.list-item-desc { color: var(--muted); font-size: 0.85rem; }
.list-item-meta { color: var(--gold); font-size: 0.85rem; margin-top: 4px; }
.list-item-actions { display: flex; gap: 6px; }

@media (max-width: 600px) {
  .list-item { flex-wrap: wrap; }
  .list-item-img { width: 60px; height: 60px; }
  .list-item-actions { width: 100%; justify-content: flex-end; }
}

/* ============================================
   STATS
   ============================================ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--espresso);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 20px;
  display: flex; align-items: center; gap: 16px;
}
.stat-icon {
  width: 48px; height: 48px; border-radius: 10px;
  background: rgba(201, 163, 91, 0.15);
  display: grid; place-items: center;
  color: var(--gold); font-size: 1.3rem;
}
.stat-value { font-size: 1.8rem; font-family: 'Playfair Display', serif; line-height: 1; }
.stat-label { color: var(--muted); font-size: 0.82rem; margin-top: 4px; }

/* ============================================
   DASHBOARD
   ============================================ */
.welcome-card {
  background: linear-gradient(135deg, var(--espresso) 0%, var(--espresso-2) 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
  margin-bottom: 24px;
  position: relative; overflow: hidden;
}
.welcome-card::before {
  content: ""; position: absolute; top: 0; right: 0; width: 300px; height: 300px;
  background: radial-gradient(circle at top right, rgba(201,163,91,0.15), transparent 60%);
  pointer-events: none;
}
.welcome-card h2 { font-size: 1.8rem; margin-bottom: 8px; }
.welcome-card p { color: var(--muted); }

/* ============================================
   ACCORDION
   ============================================ */
.accordion { display: flex; flex-direction: column; gap: 12px; }
.accordion-item {
  background: var(--espresso);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  overflow: hidden;
}
.accordion-header {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
}
.accordion-header:hover { background: rgba(201, 163, 91, 0.04); }
.accordion-icon {
  width: 40px; height: 40px; border-radius: 8px;
  background: rgba(201, 163, 91, 0.15);
  color: var(--gold);
  display: grid; place-items: center;
}
.accordion-title { flex: 1; }
.accordion-title strong { display: block; }
.accordion-title small { color: var(--muted); font-size: 0.82rem; }
.accordion-toggle { color: var(--muted); transition: var(--transition); }
.accordion-item.open .accordion-toggle { transform: rotate(180deg); color: var(--gold); }
.accordion-body { display: none; padding: 0 20px 20px; border-top: 1px solid var(--line-2); padding-top: 20px; }
.accordion-item.open .accordion-body { display: block; }

/* ============================================
   MODAL
   ============================================ */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: none; place-items: center; z-index: 100;
  padding: 20px;
}
.modal-backdrop.open { display: grid; }
.modal {
  background: var(--espresso);
  border: 1px solid var(--line);
  border-radius: 14px;
  width: 100%; max-width: 600px;
  max-height: 90vh; overflow-y: auto;
  padding: 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title { font-size: 1.3rem; }
.modal-close { color: var(--muted); font-size: 1.4rem; }
.modal-close:hover { color: var(--gold); }
.modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-2);
}

/* ============================================
   GRID
   ============================================ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.flex-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ============================================
   LOGIN
   ============================================ */
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--ink); }
.login-card {
  background: var(--espresso);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 50px 40px;
  max-width: 420px; width: 100%;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.login-card .brand-mark {
  width: 70px; height: 70px; border-radius: 50%; margin: 0 auto 24px;
  background: radial-gradient(circle at 30% 30%, var(--gold-light), var(--gold) 60%, var(--gold-dark));
  display: grid; place-items: center;
  color: var(--espresso); font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.6rem;
  box-shadow: 0 0 0 1px var(--gold), 0 10px 30px -8px rgba(201, 163, 91, 0.5);
}
.login-card h2 { font-size: 1.6rem; margin-bottom: 8px; }
.login-card p { color: var(--muted); margin-bottom: 30px; font-size: 0.92rem; }
.login-card input {
  width: 100%; padding: 14px 18px;
  background: var(--ink); border: 1px solid var(--line);
  border-radius: 999px; color: var(--cream);
  font-family: inherit; font-size: 0.95rem; text-align: center;
  margin-bottom: 16px;
}
.login-card input:focus { outline: none; border-color: var(--gold); }
.login-card button {
  width: 100%; padding: 14px;
  background: var(--gold); color: var(--espresso);
  border-radius: 999px;
  font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  transition: var(--transition);
}
.login-card button:hover { background: var(--gold-light); }
.login-card .err { color: #d65a5a; font-size: 0.88rem; margin-top: 12px; }
.login-card .hint { color: rgba(154,138,114,0.5); font-size: 0.78rem; margin-top: 24px; }

/* ============================================
   TABS
   ============================================ */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-2); margin-bottom: 20px; flex-wrap: wrap; }
.tab {
  padding: 10px 16px; color: var(--muted);
  font-size: 0.88rem; font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  cursor: pointer;
}
.tab:hover { color: var(--cream); }
.tab.active { color: var(--gold); border-color: var(--gold); }

/* ============================================
   IMAGE PICKER
   ============================================ */
.image-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px; max-height: 400px; overflow-y: auto;
  padding: 12px; background: var(--ink); border-radius: 8px;
  border: 1px solid var(--line-2);
}
.image-pick {
  aspect-ratio: 1; border-radius: 6px; overflow: hidden;
  cursor: pointer; position: relative; border: 2px solid transparent;
  transition: var(--transition);
}
.image-pick img { width: 100%; height: 100%; object-fit: cover; }
.image-pick:hover { transform: scale(1.05); }
.image-pick.selected { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.image-pick.selected::after {
  content: "✓"; position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold); color: var(--espresso);
  display: grid; place-items: center; font-size: 0.78rem; font-weight: 700;
}

/* ============================================
   CHECKBOX
   ============================================ */
.checkbox-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.checkbox-row input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--gold);
}
.checkbox-row label { cursor: pointer; }

/* ============================================
   BADGE
   ============================================ */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-gold { background: rgba(201, 163, 91, 0.15); color: var(--gold); border: 1px solid var(--line); }
.badge-danger { background: rgba(214, 90, 90, 0.15); color: #d65a5a; }
.badge-success { background: rgba(109, 190, 109, 0.15); color: #6dbe6d; }

/* ============================================
   DIVIDER
   ============================================ */
.divider { height: 1px; background: var(--line-2); margin: 20px 0; }
.divider-title {
  display: flex; align-items: center; gap: 12px;
  margin: 24px 0 16px;
  color: var(--gold); font-size: 0.8rem;
  letter-spacing: 0.2em; text-transform: uppercase;
}
.divider-title::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }

/* ============================================
   EMPTY STATE
   ============================================ */
.empty {
  padding: 40px 20px; text-align: center; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 10px;
}
.empty i { font-size: 2.5rem; color: var(--line); display: block; margin-bottom: 12px; }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.card, .list-item, .stat-card { animation: fadeIn 0.4s ease; }
