:root {
  /* Renkler - Lune Stock Uyumlu */
  --bg: #0a0f1a;
  --bg2: #0f1a2f;
  --bg-sidebar: #080c14;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --card: rgba(255, 255, 255, .06);
  --card2: rgba(255, 255, 255, .08);
  --border: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.6);
  --muted: rgba(255, 255, 255, 0.65);

  --primary: #6ee7ff;
  --primary-glow: rgba(110, 231, 255, 0.3);
  --primary2: #a78bfa;
  --accent: #a78bfa;
  --danger: #f87171;
  --ok: #34d399;
  --success: #34d399;
  --warning: #fbbf24;

  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  --radius: 16px;
  --radius-sm: 10px;

  /* Sidebar */
  --sidebar-width: 260px;
}

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

html,
body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse 1100px 700px at 20% 10%, rgba(110, 231, 255, 0.15), transparent 60%),
    radial-gradient(ellipse 900px 650px at 90% 80%, rgba(167, 139, 250, 0.12), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==================== CUSTOM SCROLLBAR ==================== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(110, 231, 255, 0.3);
  border-radius: 3px;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(110, 231, 255, 0.5);
}

/* Firefox scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(110, 231, 255, 0.3) transparent;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.15);
    opacity: 0.85;
  }
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ==================== LAYOUT ==================== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 18px 60px;
  animation: fadeInUp 0.4s ease;
}

/* ==================== TOPBAR ==================== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-radius: 999px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.brand .dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  box-shadow: 0 0 20px var(--primary-glow);
  animation: pulse 2s ease-in-out infinite;
}

.brand strong {
  font-weight: 700;
  letter-spacing: .2px;
  font-size: 16px;
}

.brand span {
  color: var(--muted);
  font-size: 12.5px;
}

/* ==================== NAVIGATION ==================== */
.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .03);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav a:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.nav a.active {
  color: var(--primary);
  background: linear-gradient(90deg, rgba(110, 231, 255, .18), rgba(167, 139, 250, .18));
  border-color: rgba(110, 231, 255, 0.3);
  box-shadow: 0 4px 20px var(--primary-glow);
}

/* ==================== CARDS ==================== */
.card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  backdrop-filter: blur(20px);
  animation: fadeInUp 0.5s ease backwards;
}

.card:hover {
  border-color: rgba(110, 231, 255, 0.2);
}

/* ==================== TYPOGRAPHY ==================== */
.h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: .2px;
}

.p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 15px;
}

/* ==================== GRID LAYOUTS ==================== */
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 860px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 960px) {
  .grid3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .grid3 {
    grid-template-columns: 1fr;
  }
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.hr {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(110, 231, 255, 0.2), transparent);
  margin: 24px 0;
}

/* ==================== FORMS ==================== */
label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 8px;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.4);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 0 4px rgba(110, 231, 255, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 44px;
  cursor: pointer;
}

select option {
  background: #1a1f2e;
  color: #fff;
  padding: 12px;
}

.help {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, .08);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #0a0f1a;
  border-color: transparent;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--primary-glow);
}

.btn.danger {
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, .12);
  color: var(--danger);
}

.btn.danger:hover {
  background: rgba(248, 113, 113, .2);
}

.btn.ghost {
  background: transparent;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ==================== TABLES ==================== */
.table-wrap {
  overflow: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: rgba(0, 0, 0, 0.18);
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, .03);
}

/* ==================== BADGES ==================== */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .05);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.badge.ok {
  border-color: rgba(52, 211, 153, .25);
  color: var(--success);
  background: rgba(52, 211, 153, .10);
}

.badge.warn {
  border-color: rgba(110, 231, 255, .25);
  color: var(--primary);
  background: rgba(110, 231, 255, .10);
}

.badge.off {
  border-color: rgba(248, 113, 113, .25);
  color: var(--danger);
  background: rgba(248, 113, 113, .10);
}

/* ==================== ALERTS ==================== */
.error {
  border: 1px solid rgba(248, 113, 113, .25);
  background: rgba(248, 113, 113, .10);
  color: var(--text);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin: 12px 0;
  animation: shake 0.4s ease;
}

/* ==================== TOGGLE SWITCH ==================== */
.switch {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, .22);
  cursor: pointer;
  transition: all 0.2s ease;
}

.switch .knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .85);
  transition: all 0.2s ease;
}

.switch.on {
  background: rgba(52, 211, 153, .18);
  border-color: rgba(52, 211, 153, .25);
}

.switch.on .knob {
  left: 21px;
  background: var(--success);
}

/* ==================== SHORTCUT CARDS ==================== */
.shortcut-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-radius: var(--radius);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.shortcut-card:hover {
  transform: translateY(-4px);
  border-color: rgba(110, 231, 255, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.shortcut-card .icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 24px;
  background: linear-gradient(135deg, rgba(110, 231, 255, 0.15), rgba(167, 139, 250, 0.15));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.shortcut-card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.shortcut-card .desc {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.shortcut-card .stat {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==================== UPCOMING LIST ==================== */
.upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.upcoming-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, .2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.upcoming-item:hover {
  background: rgba(0, 0, 0, .3);
  border-color: rgba(110, 231, 255, 0.2);
}

.upcoming-item .time {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  min-width: 70px;
}

.upcoming-item .name {
  font-size: 13px;
  flex: 1;
}

.upcoming-item .type {
  font-size: 11px;
  color: var(--muted);
  padding: 4px 10px;
  background: rgba(255, 255, 255, .05);
  border-radius: 999px;
}

/* ==================== APPOINTMENT CARDS ==================== */
.appointments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.appointment-card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.appointment-card:hover {
  border-color: rgba(110, 231, 255, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

.appointment-card.cancelled {
  opacity: 0.6;
}

.appt-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: rgba(0, 0, 0, .2);
  border-bottom: 1px solid var(--border);
}

.appt-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(110, 231, 255, 0.15), rgba(167, 139, 250, 0.15));
  border-radius: var(--radius-sm);
}

.appt-date .day {
  font-size: 22px;
  font-weight: 700;
}

.appt-date .month {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
}

.appt-time {
  flex: 1;
}

.appt-time .hour {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.appt-time .duration {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.appt-body {
  padding: 18px;
}

.appt-customer {
  margin-bottom: 10px;
}

.appt-customer .name {
  font-size: 17px;
  font-weight: 600;
  display: block;
}

.appt-customer .phone {
  font-size: 13px;
  color: var(--accent);
}

.appt-service {
  margin-top: 10px;
}

.appt-notes {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.appt-actions {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, .15);
}

.appt-actions .btn {
  padding: 8px 14px;
  font-size: 13px;
}

/* ==================== TIMELINE ==================== */
.timeline {
  position: relative;
  padding: 10px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 24px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary-glow), rgba(167, 139, 250, 0.3));
}

.timeline-item {
  position: relative;
  padding-left: 55px;
  margin-bottom: 28px;
  animation: fadeInUp 0.4s ease backwards;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 17px;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  background: rgba(255, 255, 255, 0.1);
  z-index: 1;
  transition: all 0.2s ease;
}

.timeline-dot.active {
  background: var(--text);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.timeline-dot.completed {
  background: var(--success);
  box-shadow: 0 0 15px rgba(52, 211, 153, 0.4);
}

.timeline-dot.cancelled {
  background: var(--danger);
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.3);
}

.timeline-content {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: all 0.2s ease;
}

.timeline-content:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(110, 231, 255, 0.2);
}

.t-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.t-date {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.t-time {
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
}

.t-service {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 8px;
  font-weight: 500;
}

.t-notes {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.25);
  padding: 10px;
  border-radius: 8px;
}

/* ==================== TABS ==================== */
.tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  padding: 14px 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  font-family: inherit;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--primary);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: 0 0 15px var(--primary-glow);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeInUp 0.3s ease;
}

/* ==================== TOAST ==================== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  animation: slideIn 0.3s ease;
  box-shadow: var(--shadow);
}

.toast-success {
  background: var(--success);
  color: #0a0f1a;
}

.toast-error {
  background: var(--danger);
  color: #fff;
}

/* ==================== MODAL ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  animation: fadeIn 0.2s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.modal-card {
  background: linear-gradient(180deg, rgba(20, 28, 45, 0.98) 0%, rgba(15, 22, 38, 0.98) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
  animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 18px;
}

.modal-close:hover {
  background: var(--bg-card-hover);
  color: var(--text);
}

.modal-body {
  margin-bottom: 28px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.modal-footer .btn {
  flex: 1;
  padding: 14px 20px;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
  text-align: center;
  padding: 60px 24px;
}

.empty-state .icon {
  font-size: 56px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state h3 {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 18px;
}

.empty-state p {
  color: var(--muted);
  font-size: 14px;
  opacity: 0.7;
}

/* ==================== APP LAYOUT (SIDEBAR) ==================== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.sidebar-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 20px var(--primary-glow);
  animation: pulse 2s ease-in-out infinite;
}

.brand-text {
  font-size: 18px;
  font-weight: 700;
}

.brand-text span {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 8px 12px;
  margin-bottom: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 4px;
  text-decoration: none;
}

.nav-item:hover {
  background: var(--bg-card);
  color: var(--text);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(110, 231, 255, 0.15), rgba(167, 139, 250, 0.1));
  color: var(--primary);
  border-left: 3px solid var(--primary);
}

.nav-item .icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

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

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #0a0f1a;
}

.user-details {
  flex: 1;
  overflow: hidden;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  display: block;
  width: 100%;
  padding: 12px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
}

.btn-logout:hover {
  background: rgba(248, 113, 113, 0.2);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 32px;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 1100px 700px at 20% 10%, rgba(110, 231, 255, 0.08), transparent 60%),
    radial-gradient(ellipse 900px 650px at 90% 80%, rgba(167, 139, 250, 0.06), transparent 55%),
    var(--bg);
}

/* Page Header */
.page-header {
  margin-bottom: 32px;
  animation: fadeInUp 0.4s ease;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 15px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 20px 16px;
  }

  .container {
    padding: 20px 14px 40px;
  }

  .card {
    padding: 18px;
  }

  .modal-card {
    padding: 24px;
  }
}
/* ==================== MOBILE RESPONSIVENESS ==================== */

/* Mobile Header (Hidden on Desktop) */
.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
}

.mobile-menu-btn {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Media Queries */
@media (max-width: 768px) {
  .app-layout {
    grid-template-columns: 1fr;
    padding-top: 70px; /* Header height */
  }

  /* Show Mobile Header */
  .mobile-header {
    display: flex;
  }

  /* Sidebar Logic */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 1002;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 280px;
    box-shadow: 10px 0 30px rgba(0,0,0,0.5);
  }

  .sidebar.open {
    transform: translateX(0);
  }
  
  /* Hide Sidebar Brand on Mobile (Since it's in header) */
  .sidebar .sidebar-header {
    display: none;
  }
  
  .sidebar-nav {
    padding-top: 20px;
  }

  /* Content Overlay */
  .main-content {
    padding: 16px;
  }

  /* Grids */
  .grid2, .grid3 {
    grid-template-columns: 1fr !important;
  }

  /* Table overflow */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    display: block;
  }
  
  table {
    white-space: nowrap;
  }

  /* Adjust Typography */
  .h1 {
    font-size: 1.5rem;
  }
  
  .card {
    padding: 16px;
  }
}
