/* =========================================================================
   Fıstıklık — Global Styles (shared shell, components, utilities)
   Uber Eats inspired dark theme + glassmorphism
   ========================================================================= */

:root {
  --green: #06c167;
  --green-hover: #1ed760;
  --bg: #0f0f0f;
  --sidebar: #121212;
  --card: #1a1a1a;
  --text: #ffffff;
  --muted: #a0a0a0;
  --warning: #ffc107;
  --danger: #e53935;

  --border: rgba(255, 255, 255, 0.08);
  --glass: rgba(255, 255, 255, 0.03);
  --glass-strong: rgba(255, 255, 255, 0.06);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 260px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --trans: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light theme override */
[data-theme="light"] {
  --bg: #f4f5f7;
  --sidebar: #ffffff;
  --card: #ffffff;
  --text: #10151b;
  --muted: #5b6773;
  --border: rgba(0, 0, 0, 0.08);
  --glass: rgba(0, 0, 0, 0.02);
  --glass-strong: rgba(0, 0, 0, 0.04);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

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

html,
body {
  height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* decorative ambient background glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(600px circle at 12% 8%, rgba(6, 193, 103, 0.10), transparent 45%),
    radial-gradient(700px circle at 92% 90%, rgba(30, 215, 96, 0.07), transparent 45%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

::selection { background: var(--green); color: #05230f; }

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

/* =========================== APP SHELL =============================== */
.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 40;
  transition: transform var(--trans);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.brand img {
  width: 42px; height: 42px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(6, 193, 103, 0.35);
}
.brand .brand-name { font-weight: 700; font-size: 1.05rem; letter-spacing: 0.2px; }
.brand .brand-sub { font-size: 0.72rem; color: var(--muted); }

.nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--trans);
  position: relative;
}
.nav-link i { width: 20px; text-align: center; font-size: 1rem; }
.nav-link:hover { background: var(--glass-strong); color: var(--text); transform: translateX(3px); }
.nav-link.active {
  background: linear-gradient(90deg, rgba(6, 193, 103, 0.18), rgba(6, 193, 103, 0.04));
  color: var(--green-hover);
}
.nav-link.active::before {
  content: "";
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px; border-radius: 4px;
  background: var(--green);
}

.sidebar-footer { border-top: 1px solid var(--border); padding-top: 14px; }

/* main */
.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 15, 15, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 30;
}
[data-theme="light"] .topbar { background: rgba(255,255,255,0.7); }
.topbar h1 { font-size: 1.3rem; font-weight: 700; }
.topbar .page-sub { font-size: 0.8rem; color: var(--muted); font-weight: 400; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.admin-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px; border-radius: 40px;
  background: var(--glass-strong); border: 1px solid var(--border);
  font-size: 0.85rem;
}
.admin-chip .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--green); color: #04240f;
  display: grid; place-items: center; font-weight: 700; font-size: 0.8rem;
}

.content { padding: 28px; flex: 1; }

/* mobile hamburger */
.hamburger {
  display: none;
  background: var(--glass-strong);
  border: 1px solid var(--border);
  color: var(--text);
  width: 42px; height: 42px;
  border-radius: 12px;
  font-size: 1.1rem;
}
.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  z-index: 39;
}

/* =========================== CARDS =============================== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative;
}
.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 18px; flex-wrap: wrap;
}
.section-head h2 { font-size: 1.1rem; font-weight: 700; }

/* =========================== BUTTONS =============================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--glass-strong);
  transition: var(--trans);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--green);
  color: #04240f;
  box-shadow: 0 8px 22px rgba(6, 193, 103, 0.35);
}
.btn-primary:hover { background: var(--green-hover); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--glass-strong); }
.btn-danger { background: rgba(229, 57, 53, 0.15); color: #ff7b78; border-color: rgba(229,57,53,0.35); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 0.8rem; }
.btn-icon { padding: 9px; width: 38px; height: 38px; justify-content: center; border-radius: 10px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* =========================== FORMS =============================== */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 0.82rem; color: var(--muted);
  margin-bottom: 7px; font-weight: 500;
}
.input, .select, textarea.input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
  transition: var(--trans);
}
[data-theme="light"] .input, [data-theme="light"] .select { background: #f0f2f5; }
.input:focus, .select:focus, textarea.input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(6, 193, 103, 0.18);
}
textarea.input { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* =========================== TABLE =============================== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; min-width: 640px; }
table.data th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
table.data td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
table.data tr { transition: var(--trans); }
table.data tbody tr:hover { background: var(--glass-strong); }
table.data tr:last-child td { border-bottom: none; }

/* =========================== BADGES / CHIPS =============================== */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 30px;
  font-size: 0.75rem; font-weight: 600;
}
.badge-green { background: rgba(6,193,103,0.16); color: var(--green-hover); }
.badge-warn { background: rgba(255,193,7,0.16); color: var(--warning); }
.badge-danger { background: rgba(229,57,53,0.16); color: #ff7b78; }
.badge-muted { background: var(--glass-strong); color: var(--muted); }

.emp-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px;
  background: var(--glass-strong);
  border: 1px solid var(--border);
  border-radius: 30px;
  font-size: 0.82rem;
  transition: var(--trans);
}
.emp-chip .dot {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.7rem; font-weight: 700; color: #04240f;
  background: var(--green);
}
.emp-chip[draggable="true"] { cursor: grab; }
.emp-chip[draggable="true"]:hover { border-color: var(--green); }
.emp-chip .remove { color: var(--muted); cursor: pointer; }
.emp-chip .remove:hover { color: var(--danger); }

/* avatar circle */
.avatar-circle {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; color: #04240f;
  background: linear-gradient(135deg, var(--green), var(--green-hover));
  flex-shrink: 0;
}

/* =========================== MODAL =============================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal {
  width: 100%; max-width: 520px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 92vh; overflow-y: auto;
  animation: modalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal.modal-lg { max-width: 720px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.15rem; }
.modal-close {
  background: var(--glass-strong); border: none; color: var(--muted);
  width: 34px; height: 34px; border-radius: 9px; font-size: 1rem;
  transition: var(--trans);
}
.modal-close:hover { background: var(--danger); color: #fff; }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 18px 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 12px;
}

/* =========================== TOAST =============================== */
.toast-wrap {
  position: fixed; top: 22px; right: 22px;
  display: flex; flex-direction: column; gap: 12px;
  z-index: 200;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  min-width: 260px; max-width: 360px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: 12px;
  box-shadow: var(--shadow);
  animation: slideIn 0.28s ease;
  font-size: 0.9rem;
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warning); }
.toast i { font-size: 1.1rem; }
.toast.success i { color: var(--green); }
.toast.error i { color: var(--danger); }
.toast.warn i { color: var(--warning); }

/* =========================== UTILITIES =============================== */
.grid { display: grid; gap: 20px; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.text-muted { color: var(--muted); }
.text-green { color: var(--green-hover); }
.text-danger { color: var(--danger); }
.text-warn { color: var(--warning); }
.text-center { text-align: center; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.fade-up { animation: fadeUp 0.4s ease both; }

.search-box { position: relative; }
.search-box i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box input { padding-left: 40px; min-width: 240px; }

.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.empty-state {
  text-align: center; padding: 60px 20px; color: var(--muted);
}
.empty-state i { font-size: 2.4rem; margin-bottom: 14px; color: var(--border); }

/* animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modalPop { from { opacity: 0; transform: scale(0.94) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
