/* Admin Panel Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Manrope', system-ui, sans-serif;
  background: #f1f5f9;
  color: #0f172a;
  line-height: 1.5;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

:root {
  --ink: #0a0f1e;
  --brand: #0b3d91;
  --brand-2: #1e40af;
  --accent: #06b6d4;
  --accent-2: #0ea5e9;
  --gold: #f59e0b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --text: #334155;
  --text-muted: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
}

/* ===== LOGIN ===== */
.login-wrap {
  min-height: 100vh;
  display: flex;
  background: linear-gradient(135deg, #0a0f1e 0%, #1e293b 100%);
  position: relative;
  overflow: hidden;
}
.login-wrap::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(6,182,212,0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(245,158,11,0.15) 0%, transparent 50%);
  pointer-events: none;
}
.login-card {
  position: relative;
  margin: auto;
  width: 100%;
  max-width: 440px;
  background: white;
  border-radius: 20px;
  padding: 48px 40px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.4);
}
.login-logo {
  display: flex; align-items: center; gap: 12px; margin-bottom: 32px;
}
.login-logo .mark {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, #06b6d4, #1e40af);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 900; letter-spacing: 0.08em;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.4);
}
.login-logo .txt { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.login-logo .txt b { display: block; font-size: 17px; letter-spacing: -0.01em; color: var(--ink); font-family: 'Fraunces', serif; font-weight: 600; text-transform: none; }

.login-title { font-family: 'Fraunces', serif; font-size: 32px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink); }
.login-sub { margin-top: 8px; font-size: 14px; color: var(--text-muted); }

.role-picker { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-btn {
  padding: 14px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: white;
  text-align: left;
  transition: all 0.2s;
}
.role-btn:hover { border-color: #cbd5e1; }
.role-btn.active { border-color: var(--ink); background: var(--ink); color: white; }
.role-btn svg { width: 18px; height: 18px; margin-bottom: 8px; opacity: 0.6; }
.role-btn.active svg { color: #67e8f9; opacity: 1; }
.role-btn .t { font-size: 13px; font-weight: 700; }
.role-btn .s { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.role-btn.active .s { color: #cbd5e1; }

.field { margin-top: 16px; }
.field label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: white;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 61, 145, 0.1);
}
.field textarea { resize: vertical; min-height: 90px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-dark { background: var(--ink); color: white; }
.btn-dark:hover { background: #1e293b; transform: translateY(-1px); }
.btn-grad { background: linear-gradient(135deg, #06b6d4, #1e40af); color: white; }
.btn-grad:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(14,165,233,0.3); }
.btn-light { background: var(--surface-3); color: var(--ink); }
.btn-light:hover { background: var(--line); }
.btn-danger { background: #fef2f2; color: var(--danger); }
.btn-danger:hover { background: #fee2e2; }
.btn-success { background: #d1fae5; color: #047857; }
.btn-success:hover { background: #a7f3d0; }
.btn svg { width: 14px; height: 14px; }
.btn-full { width: 100%; }

.login-submit { margin-top: 24px; padding: 14px; font-size: 14px; }

.login-note { margin-top: 24px; text-align: center; font-size: 12px; color: var(--text-muted); }
.login-note a { color: var(--brand); font-weight: 700; }

/* ===== APP SHELL ===== */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 264px;
  background: var(--ink);
  color: #cbd5e1;
  display: flex; flex-direction: column;
  flex-shrink: 0;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-head { padding: 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-head .mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, #06b6d4, #1e40af);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 900; letter-spacing: 0.08em; font-size: 13px;
}
.sidebar-head .tx b { display: block; font-size: 14px; font-weight: 700; color: white; letter-spacing: 0.05em; }
.sidebar-head .tx span { font-size: 10px; letter-spacing: 0.2em; color: #64748b; text-transform: uppercase; }

.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.sidebar-nav button {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #cbd5e1;
  margin-bottom: 2px;
  text-align: left;
  transition: all 0.15s;
  position: relative;
}
.sidebar-nav button:hover { background: rgba(255,255,255,0.05); color: white; }
.sidebar-nav button.active { background: rgba(255,255,255,0.1); color: white; }
.sidebar-nav button.active::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 2px;
  background: linear-gradient(180deg, #67e8f9, #0ea5e9);
}
.sidebar-nav svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-nav button.active svg { color: #67e8f9; }
.sidebar-nav .badge { margin-left: auto; background: var(--gold); color: var(--ink); font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 999px; }

.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
}
.sidebar-user .ava {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: var(--ink); font-weight: 800; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.sidebar-user .info { flex: 1; min-width: 0; }
.sidebar-user .info b { display: block; font-size: 12px; color: white; font-weight: 700; }
.sidebar-user .info span { font-size: 10px; color: #64748b; }
.sidebar-user button { padding: 6px; border-radius: 8px; color: #94a3b8; }
.sidebar-user button:hover { background: rgba(255,255,255,0.1); color: white; }

/* ===== MAIN ===== */
.main { flex: 1; min-width: 0; }
.topbar-admin {
  height: 64px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 10;
}
.topbar-admin .search {
  flex: 1; max-width: 500px;
  position: relative;
}
.topbar-admin .search input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  background: var(--surface-3);
  border: none; border-radius: 10px;
  font: inherit;
}
.topbar-admin .search input:focus { outline: none; background: white; box-shadow: 0 0 0 2px var(--line); }
.topbar-admin .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); }
.topbar-admin .role-tag { font-size: 11px; font-weight: 700; padding: 6px 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; }
.topbar-admin .role-tag.super { background: var(--surface-3); color: var(--text); }
.topbar-admin .role-tag.branch { background: #dbeafe; color: var(--brand); }

.page { padding: 32px; max-width: 1400px; }
.page-title-row { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }
.page-title-row .eyebrow { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--brand); font-weight: 800; }
.page-title-row h1 { font-family: 'Fraunces', serif; font-size: 34px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; }
.page-title-row p { font-size: 14px; color: var(--text-muted); margin-top: 6px; max-width: 600px; }

/* ===== CARDS / STATS ===== */
.grid-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.stat-card .icn {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white;
}
.stat-card .icn.blue { background: linear-gradient(135deg, #0ea5e9, #1e40af); }
.stat-card .icn.amber { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-card .icn.emerald { background: linear-gradient(135deg, #10b981, #047857); }
.stat-card .icn.slate { background: linear-gradient(135deg, #64748b, #334155); }
.stat-card .icn svg { width: 20px; height: 20px; }
.stat-card .lbl { font-size: 12px; color: var(--text-muted); margin-top: 14px; font-weight: 500; }
.stat-card .val { font-family: 'Fraunces', serif; font-size: 30px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); margin-top: 4px; }
.stat-card .trend { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.stat-card .alert { position: absolute; top: 12px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--warning); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }

/* ===== PANEL ===== */
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}
.panel-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.panel-header h3 { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 600; }
.panel-header p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ===== TABLE ===== */
.table-wrap { background: white; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  padding: 14px 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.table td {
  padding: 16px 20px;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--surface-2); }
.table .t-title { font-weight: 600; color: var(--ink); }
.table .actions { display: flex; gap: 4px; justify-content: flex-end; }
.table .actions button { padding: 7px; border-radius: 8px; color: var(--text-muted); transition: all 0.15s; }
.table .actions button:hover { background: var(--surface-3); color: var(--ink); }
.table .actions button.approve:hover { background: #d1fae5; color: #047857; }
.table .actions button.del:hover { background: #fee2e2; color: var(--danger); }

.status-pill {
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid;
}
.status-published { background: #d1fae5; color: #047857; border-color: #a7f3d0; }
.status-pending { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.status-draft { background: var(--surface-3); color: var(--text); border-color: var(--line); }
.status-rejected { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

.branch-pill { display: inline-flex; font-size: 11px; font-weight: 700; background: var(--surface-3); color: var(--text); padding: 4px 8px; border-radius: 6px; }

/* ===== FILTER TABS ===== */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filter-tab {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  background: white;
  color: var(--text);
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.15s;
}
.filter-tab:hover { border-color: #cbd5e1; }
.filter-tab.active { background: var(--ink); color: white; border-color: var(--ink); }
.filter-tab .count { font-size: 10px; padding: 2px 7px; background: var(--surface-3); border-radius: 999px; font-weight: 800; }
.filter-tab.active .count { background: rgba(255,255,255,0.2); color: white; }

/* ===== FORM (news edit) ===== */
.form-grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
@media (max-width: 900px) { .form-grid { grid-template-columns: 1fr; } }
.form-main .panel { padding: 28px; }
.form-side .panel { position: sticky; top: 88px; }

.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1.5px solid transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { background: var(--line); }
.chip.selected { background: var(--ink); color: white; border-color: var(--ink); }

.toggle {
  display: flex; align-items: center; gap: 10px;
  padding: 14px;
  background: var(--surface-2);
  border-radius: 12px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s;
}
.toggle:hover { background: var(--surface-3); }
.toggle.on { background: #fef3c7; border-color: var(--gold); }
.toggle .box {
  width: 36px; height: 20px; border-radius: 999px;
  background: var(--line);
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle .box::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: white;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle.on .box { background: var(--gold); }
.toggle.on .box::after { transform: translateX(16px); }
.toggle .lbl { flex: 1; }
.toggle .lbl b { display: block; font-size: 13.5px; font-weight: 700; }
.toggle .lbl span { font-size: 12px; color: var(--text-muted); }

.file-drop {
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  background: var(--surface-2);
}
.file-drop:hover { border-color: var(--brand); background: var(--surface-3); }
.file-drop svg { width: 28px; height: 28px; margin: 0 auto 10px; display: block; color: var(--text-muted); }
.file-drop b { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.file-drop span { font-size: 12px; }
.file-drop input { display: none; }
.file-preview { margin-top: 12px; position: relative; border-radius: 10px; overflow: hidden; }
.file-preview img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.file-preview .remove { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.7); color: white; border-radius: 8px; padding: 5px 10px; font-size: 11px; font-weight: 700; }

.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .form-actions { flex-direction: column-reverse; } .form-actions .btn { width: 100%; } }

/* Toast */
.toast-wrap { position: fixed; top: 20px; right: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: white;
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  border-left: 4px solid var(--success);
  animation: slideIn 0.3s ease;
  max-width: 340px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; font-weight: 600;
}
.toast.err { border-left-color: var(--danger); }
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* Approval inline cards */
.approval-list { display: flex; flex-direction: column; gap: 10px; }
.approval-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-2);
  transition: background 0.15s;
}
.approval-item:hover { background: var(--surface-3); }
.approval-item .icn { width: 44px; height: 44px; border-radius: 10px; background: var(--surface-3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--text-muted); }
.approval-item .body { flex: 1; min-width: 0; }
.approval-item .body b { display: block; font-size: 14px; color: var(--ink); font-weight: 600; }
.approval-item .body span { font-size: 12px; color: var(--text-muted); }
.approval-item .acts { display: flex; gap: 4px; }

/* Mobile sidebar */
.mobile-menu-btn { display: none; padding: 8px; border-radius: 8px; }
.mobile-menu-btn svg { width: 20px; height: 20px; }
@media (max-width: 900px) {
  .mobile-menu-btn { display: block; }
  .sidebar { position: fixed; left: -264px; z-index: 50; transition: left 0.3s; }
  .sidebar.open { left: 0; box-shadow: 0 0 40px rgba(0,0,0,0.5); }
  .sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 40; }
  .sidebar-backdrop.open { display: block; }
  .page { padding: 20px; }
}

/* Empty state */
.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}
.empty svg { width: 40px; height: 40px; opacity: 0.4; margin: 0 auto 14px; display: block; }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

/* Branch cards */
.branches-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.branch-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
}
.branch-card:hover { border-color: #cbd5e1; box-shadow: 0 10px 25px rgba(0,0,0,0.05); }
.branch-card::before {
  content: ''; position: absolute; top: 0; right: 0;
  width: 80px; height: 80px;
  background: radial-gradient(circle at top right, rgba(6,182,212,0.1), transparent 70%);
  border-radius: 0 0 0 100%;
}
.branch-card .top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; }
.branch-card .eb { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.branch-card h3 { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600; margin-top: 4px; letter-spacing: -0.01em; }
.branch-card .leader { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.branch-card .leader .ava { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #475569, #0f172a); color: white; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.branch-card .leader .ava.vacant { background: var(--surface-3); color: var(--text-muted); }
.branch-card .leader .name { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.branch-card .leader .count { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   ADMIN: YENİ MODÜLLER (Sayfa Düzenleyici, Menü, Şubeler)
   ============================================================ */

.tabs-row {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e2e8f0;
}
.tab-btn {
  padding: 12px 20px;
  font-size: 13.5px;
  font-weight: 700;
  color: #64748b;
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  bottom: -2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s;
}
.tab-btn svg { width: 15px; height: 15px; }
.tab-btn:hover { color: #0a0f1e; }
.tab-btn.active { color: #0b3d91; border-bottom-color: #0b3d91; }
.tab-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.tab-count {
  background: #e2e8f0;
  color: #475569;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-left: 4px;
}
.tab-btn.active .tab-count { background: #dbeafe; color: #1e40af; }

/* Editor breadcrumb */
.editor-breadcrumb {
  margin-bottom: 16px;
}
.editor-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s;
}
.editor-breadcrumb a:hover { color: #0b3d91; }
.editor-breadcrumb svg { width: 14px; height: 14px; transform: rotate(180deg); }

/* Editor grid */
.editor-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  margin-top: 24px;
}
@media (max-width: 900px) { .editor-grid { grid-template-columns: 1fr; } }
.editor-main { display: flex; flex-direction: column; gap: 16px; }
.editor-side { display: flex; flex-direction: column; gap: 16px; }

/* Form card */
.form-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px;
}
.form-card h4 {
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #475569;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-card h4 svg { width: 14px; height: 14px; }
.form-card .field { margin-bottom: 14px; }
.form-card .field:last-child { margin-bottom: 0; }
.form-card .field label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
}
.form-card .input,
.form-card input[type="text"],
.form-card input[type="email"],
.form-card input[type="tel"],
.form-card input[type="url"],
.form-card select,
.form-card textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  transition: border-color 0.15s;
}
.form-card .input:focus, .form-card input:focus, .form-card textarea:focus, .form-card select:focus {
  outline: none;
  border-color: #0b3d91;
}
.form-card textarea { resize: vertical; min-height: 80px; }
.field-row { margin-bottom: 14px; }
.field-row.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) { .field-row.split { grid-template-columns: 1fr; } }

.action-card { display: flex; flex-direction: column; gap: 8px; }
.btn-full { width: 100%; justify-content: center; }

/* Photo upload */
.photo-upload .photo-preview {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  margin-bottom: 12px;
  border: 2px dashed #cbd5e1;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }

/* Branch card actions */
.branch-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}
.branch-card-actions .btn { flex: 1; justify-content: center; }
.branch-card-actions .btn-danger-ghost { flex: 0 0 auto; }

.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn-sm svg { width: 13px; height: 13px; }

.btn-danger-ghost {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-danger-ghost:hover { background: #dc2626; color: white; border-color: #dc2626; }
.btn-danger-ghost svg { width: 14px; height: 14px; }

/* Page editor list */
.page-editor-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}
.page-editor-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.15s;
}
.page-editor-item:hover { border-color: #0b3d91; box-shadow: 0 4px 12px rgba(11, 61, 145, 0.08); }
.pe-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
  display: flex; align-items: center; justify-content: center;
  color: #475569;
}
.pe-icon svg { width: 18px; height: 18px; }
.pe-body { min-width: 0; }
.pe-title { font-size: 15px; font-weight: 700; color: #0a0f1e; }
.pe-desc { font-size: 12.5px; color: #64748b; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-status {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.pe-status.filled { background: #d1fae5; color: #047857; }
.pe-status.empty { background: #fef3c7; color: #92400e; }

/* Member row */
.member-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 8px;
}
.mr-ava {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, #0a0f1e, #1e293b);
  color: white;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.mr-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 700px) { .mr-fields { grid-template-columns: 1fr; } }
.mr-actions { display: flex; gap: 4px; }

/* Menu editor */
.menu-editor-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
}

.menu-items { display: flex; flex-direction: column; gap: 10px; }
.menu-item-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}
.mi-header {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
}
.mi-drag {
  color: #94a3b8;
  cursor: grab;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
}
.mi-drag svg { width: 18px; height: 18px; }
.mi-fields { display: grid; grid-template-columns: 1fr 1.2fr; gap: 8px; }
@media (max-width: 700px) { .mi-fields { grid-template-columns: 1fr; } }
.mi-actions { display: flex; gap: 4px; }

.mi-children {
  background: white;
  padding: 14px;
  border-top: 1px dashed #cbd5e1;
}
.mi-children-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.mi-children-head span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
}
.mi-children-list { display: flex; flex-direction: column; gap: 6px; }
.mi-child {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto auto;
  gap: 6px;
  align-items: center;
}
@media (max-width: 700px) {
  .mi-child { grid-template-columns: 1fr 1fr; }
  .mi-child button { grid-column: auto; }
}
.mi-child input { font-size: 13px !important; padding: 8px 10px !important; }

.mi-children-toggle {
  padding: 8px 14px 14px;
  border-top: 1px dashed #cbd5e1;
  background: #fafbfc;
}

/* Toast warn */
.toast.warn { background: #f59e0b; }
.toast.success { background: #10b981; }

/* Save button positioning */
.page-title-row .btn-dark svg { width: 14px; height: 14px; }

/* ============================================================
   ADMIN EXTRA: Tables, App Detail
   ============================================================ */
.app-detail-table { width: 100%; border-collapse: collapse; }
.app-detail-table th,
.app-detail-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
}
.app-detail-table th {
  width: 200px;
  color: #475569;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: #f8fafc;
}
.app-detail-table td { color: #0a0f1e; }
.app-detail-table tr:last-child th,
.app-detail-table tr:last-child td { border-bottom: none; }

.status-rejected { background: #fee2e2 !important; color: #991b1b !important; }

/* Login branch select */
#branchSelectField select.input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  background: white;
}
#branchSelectField select.input:focus { outline: none; border-color: #0b3d91; }
