/* Verwaltung im LunaOffice-Stil: breitere Sidebar, grössere Schrift und Icons,
   ruhige flache Flächen. Nur Darstellung, keine Logik. Gilt für die
   Verwaltungs-App (.admin-dashboard-page) und die Statistikseite (.stats-shell). */

@font-face {
  font-family: "HdH Cormorant";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/vendor/cormorant-garamond-latin-600.woff2") format("woff2");
}

.admin-dashboard-page {
  --admin-ui-main: #0b0b0b;
  --admin-ui-surface: #141414;
  --admin-ui-raised: #1c1c1e;
  --admin-ui-line: #232325;
  --luna-hover: rgba(255, 255, 255, .045);
  --luna-brand: #c9a86a;
  --luna-door: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32' fill='none' stroke='%23c9a86a' stroke-width='1.3'%3E%3Crect x='1.5' y='1.5' width='21' height='29' rx='.5'/%3E%3Crect x='5' y='5' width='6' height='5'/%3E%3Crect x='13' y='5' width='6' height='5'/%3E%3Crect x='5' y='12.5' width='6' height='7'/%3E%3Crect x='13' y='12.5' width='6' height='7'/%3E%3Cpath d='M9.5 21.75h5'/%3E%3Crect x='5' y='23.5' width='6' height='4.5'/%3E%3Crect x='13' y='23.5' width='6' height='4.5'/%3E%3C/svg%3E");
}
.admin-dashboard-page.admin-theme-light {
  --admin-ui-main: #ffffff;
  --admin-ui-surface: #f5f6f8;
  --admin-ui-raised: #e9ebee;
  --admin-ui-line: #e0e3e8;
  --luna-hover: rgba(15, 23, 42, .05);
  --luna-brand: #9a7a3f;
  --luna-door: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32' fill='none' stroke='%239a7a3f' stroke-width='1.3'%3E%3Crect x='1.5' y='1.5' width='21' height='29' rx='.5'/%3E%3Crect x='5' y='5' width='6' height='5'/%3E%3Crect x='13' y='5' width='6' height='5'/%3E%3Crect x='5' y='12.5' width='6' height='7'/%3E%3Crect x='13' y='12.5' width='6' height='7'/%3E%3Cpath d='M9.5 21.75h5'/%3E%3Crect x='5' y='23.5' width='6' height='4.5'/%3E%3Crect x='13' y='23.5' width='6' height='4.5'/%3E%3C/svg%3E");
}
:root {
  --stats-main: #0b0b0b;
  --stats-surface: #141414;
  --stats-raised: #1c1c1e;
  --stats-line: #232325;
  --luna-hover: rgba(255, 255, 255, .045);
  --luna-door: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32' fill='none' stroke='%23c9a86a' stroke-width='1.3'%3E%3Crect x='1.5' y='1.5' width='21' height='29' rx='.5'/%3E%3Crect x='5' y='5' width='6' height='5'/%3E%3Crect x='13' y='5' width='6' height='5'/%3E%3Crect x='5' y='12.5' width='6' height='7'/%3E%3Crect x='13' y='12.5' width='6' height='7'/%3E%3Cpath d='M9.5 21.75h5'/%3E%3Crect x='5' y='23.5' width='6' height='4.5'/%3E%3Crect x='13' y='23.5' width='6' height='4.5'/%3E%3C/svg%3E");
}
:root[data-admin-theme="light"] {
  --stats-main: #ffffff;
  --stats-surface: #f5f6f8;
  --stats-raised: #e9ebee;
  --stats-line: #e0e3e8;
  --luna-hover: rgba(15, 23, 42, .05);
  --luna-door: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32' fill='none' stroke='%239a7a3f' stroke-width='1.3'%3E%3Crect x='1.5' y='1.5' width='21' height='29' rx='.5'/%3E%3Crect x='5' y='5' width='6' height='5'/%3E%3Crect x='13' y='5' width='6' height='5'/%3E%3Crect x='5' y='12.5' width='6' height='7'/%3E%3Crect x='13' y='12.5' width='6' height='7'/%3E%3Cpath d='M9.5 21.75h5'/%3E%3Crect x='5' y='23.5' width='6' height='4.5'/%3E%3Crect x='13' y='23.5' width='6' height='4.5'/%3E%3C/svg%3E");
}

/* Icons: Lucide-Linien, einheitlich gross und ruhig */
.admin-dashboard-page .admin-dashboard-sidebar .admin-nav-icon,
.stats-nav .stats-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  stroke-width: 1.7;
}

/* Marke oben: Tür-Zeichen, Shopname, darunter "Verwaltung" */
.admin-dashboard-page .admin-sidebar-top,
.stats-brand {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 13px;
  row-gap: 1px;
  align-items: center;
}
.admin-dashboard-page .admin-sidebar-top::before,
.stats-brand::before {
  content: "";
  grid-row: 1 / span 2;
  order: -2;
  width: 26px;
  height: 35px;
  background: var(--luna-door) center / contain no-repeat;
}
.admin-dashboard-page .admin-sidebar-top > span,
.stats-brand > span {
  order: -1;
  display: block;
  margin: 0;
  color: var(--admin-ui-text, var(--stats-text));
  font-family: "HdH Cormorant", "Cormorant Garamond", Georgia, serif !important;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: .005em;
  text-transform: none;
  white-space: nowrap;
}
.admin-dashboard-page .admin-sidebar-top > strong,
.stats-brand {
  color: var(--admin-ui-muted, var(--stats-muted));
  font-family: var(--admin-font, var(--stats-font));
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .16em;
  text-transform: uppercase;
}

/* Gruppen-Pfeil als echtes Chevron */
.admin-dashboard-page .admin-nav-disclosure-toggle::after,
.stats-nav-disclosure::after {
  width: 16px;
  height: 16px;
  border: 0;
  background: currentColor;
  opacity: .55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: none;
}
.admin-dashboard-page .admin-nav-disclosure.is-open .admin-nav-disclosure-toggle::after,
.stats-nav-disclosure[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

/* Abmelden mit Icon */
.admin-dashboard-page .admin-logout-button {
  display: flex;
  align-items: center;
  gap: 13px;
}
.admin-dashboard-page .admin-logout-button::before {
  content: "";
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpolyline points='16 17 21 12 16 7'/%3E%3Cline x1='21' x2='9' y1='12' y2='12'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpolyline points='16 17 21 12 16 7'/%3E%3Cline x1='21' x2='9' y1='12' y2='12'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Desktop: Verwaltungs-App ---------- */
@media (min-width: 861px) {
  .admin-dashboard-page {
    grid-template-columns: 272px minmax(0, 1fr);
    gap: 8px;
    padding: 16px 18px 16px 0;
  }
  .admin-dashboard-page .admin-dashboard-sidebar {
    height: calc(100dvh - 32px);
    padding: 12px 18px 6px 20px;
  }
  .admin-dashboard-page .admin-sidebar-top { margin: 0 12px 30px; }
  .admin-dashboard-page .admin-nav-groups { gap: 2px; }
  .admin-dashboard-page .admin-nav-group { gap: 2px; }
  .admin-dashboard-page .admin-nav-direct { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--admin-ui-line); }
  .admin-dashboard-page .admin-nav-disclosure { border-top: 0; padding-top: 0; }
  .admin-dashboard-page .admin-dashboard-sidebar .admin-nav-group > a,
  .admin-dashboard-page .admin-nav-disclosure-toggle,
  .admin-dashboard-page .admin-logout-button {
    gap: 13px;
    min-height: 44px;
    padding: 10px 12px;
    border: 0;
    border-radius: 9px;
    font-size: 15.5px;
    font-weight: 500;
    letter-spacing: -.01em;
    line-height: 1.25;
    transition: background-color .18s ease, color .18s ease;
  }
  .admin-dashboard-page .admin-dashboard-sidebar .admin-nav-group > a { color: var(--admin-ui-muted); }
  .admin-dashboard-page .admin-dashboard-sidebar .admin-nav-group > a strong {
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
  }
  .admin-dashboard-page .admin-nav-disclosure > a { margin-left: 14px; }
  .admin-dashboard-page .admin-nav-disclosure > a .admin-nav-icon { width: 18px; height: 18px; flex-basis: 18px; }
  .admin-dashboard-page .admin-nav-disclosure.is-open > a:last-of-type { margin-bottom: 6px; }
  .admin-dashboard-page .admin-dashboard-sidebar .admin-nav-group > a:hover:not(.active),
  .admin-dashboard-page .admin-nav-disclosure-toggle:hover,
  .admin-dashboard-page .admin-logout-button:hover {
    background: var(--luna-hover);
    color: var(--admin-ui-text);
  }
  .admin-dashboard-page .admin-nav-disclosure.is-open .admin-nav-disclosure-toggle {
    background: transparent;
    color: var(--admin-ui-text);
  }
  .admin-dashboard-page .admin-logout-button {
    width: 100%;
    margin: auto 0 0;
    background: transparent;
    color: var(--admin-ui-muted);
    text-align: left;
  }

  .admin-dashboard-page .admin-dashboard-main {
    height: calc(100dvh - 32px);
    padding: 30px 40px 32px;
    border-radius: 28px;
  }
  .admin-dashboard-page .admin-dashboard-heading { min-height: 44px; margin-bottom: 40px; }
  .admin-dashboard-page .admin-dashboard-heading span { margin-bottom: 6px; font-size: 13px; }
  .admin-dashboard-page .admin-dashboard-heading h1 { font-size: 32px; font-weight: 650; letter-spacing: -.04em; }
  .admin-dashboard-page .admin-dashboard-heading a {
    min-height: 40px;
    padding: 9px 16px;
    border-radius: 9px;
    font-size: 14px;
  }
  .admin-dashboard-page .admin-theme-toggle.ios-theme-switch { height: 40px; min-height: 40px; border-radius: 9px; }
}
@media (max-width: 1200px) and (min-width: 861px) {
  .admin-dashboard-page { grid-template-columns: 236px minmax(0, 1fr); }
  .admin-dashboard-page .admin-dashboard-sidebar { padding-inline: 14px 12px; }
  .admin-dashboard-page .admin-dashboard-main { padding-inline: 28px; }
}

/* ---------- Desktop: Statistikseite ---------- */
@media (min-width: 761px) {
  .stats-shell {
    grid-template-columns: 272px minmax(0, 1fr);
    gap: 8px;
    padding: 16px 18px 16px 0;
  }
  .stats-sidebar {
    top: 16px;
    height: calc(100dvh - 32px);
    padding: 12px 18px 6px 20px;
  }
  .stats-brand { margin: 0 12px 30px; }
  .stats-nav { gap: 2px; }
  .stats-nav-direct { gap: 2px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--stats-line); }
  .stats-nav-group { border-top: 0; padding-top: 0; }
  .stats-nav a,
  .stats-nav-disclosure {
    gap: 13px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 15.5px;
    font-weight: 500;
    letter-spacing: -.01em;
    line-height: 1.25;
  }
  .stats-nav-disclosure .stats-icon,
  .stats-nav a .stats-icon { width: 19px; height: 19px; }
  .stats-nav-sub { gap: 2px; padding: 2px 0 6px 14px; }
  .stats-nav-sub .stats-icon { width: 18px !important; height: 18px !important; }
  .stats-nav a:hover:not([aria-current]),
  .stats-nav-disclosure:hover { background: var(--luna-hover); color: var(--stats-text); }
  .stats-nav-disclosure[aria-expanded="true"] { background: transparent; color: var(--stats-text); }
  .sidebar-access { padding: 24px 12px 10px; font-size: 12px; }
  .stats-main {
    height: calc(100dvh - 32px);
    padding: 30px 40px 32px;
    border-radius: 28px;
  }
}
@media (max-width: 1200px) and (min-width: 761px) {
  .stats-shell { grid-template-columns: 236px minmax(0, 1fr); }
  .stats-sidebar { padding-inline: 14px 12px; }
  .stats-main { padding-inline: 28px; }
}

/* Mobile: Menüeinträge etwas grösser und mit klaren Icons */
@media (max-width: 860px) {
  .admin-dashboard-page .admin-mobile-ready .admin-sidebar-top { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .admin-dashboard-page .admin-mobile-ready .admin-sidebar-top > :is(span, strong) { grid-column: 2; }
  .admin-dashboard-page .admin-mobile-ready .admin-sidebar-top > strong { font-size: 10px; letter-spacing: .16em; }
  .admin-dashboard-page .admin-mobile-ready .admin-sidebar-top > span { font-size: 20px; letter-spacing: .005em; }
  .admin-dashboard-page .admin-mobile-ready .admin-mobile-menu-toggle { grid-column: 3; grid-row: 1 / span 2; }
  .admin-dashboard-page .admin-mobile-ready .admin-nav-group a { gap: 12px; font-size: 15px; }
  .admin-dashboard-page .admin-mobile-ready .admin-nav-disclosure { border-top: 0; padding-top: 0; }
  .admin-dashboard-page .admin-mobile-ready .admin-nav-direct { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--admin-ui-line); }
  .admin-dashboard-page .admin-mobile-ready .admin-nav-disclosure-toggle { gap: 12px; min-height: 48px; padding: 10px; font-size: 15px; font-weight: 500; }
  .admin-dashboard-page .admin-mobile-ready .admin-nav-disclosure > a { margin-left: 12px; }
  .admin-dashboard-page .admin-mobile-ready .admin-nav-group a strong { font-size: 15px; font-weight: 500; }
}

@media (max-width: 760px) {
  .stats-nav-direct { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--stats-line); }
  .stats-nav-group { border-top: 0; padding-top: 0; }
  .stats-nav a, .stats-nav-disclosure { gap: 12px; font-size: 15px; font-weight: 500; }
  .stats-nav-disclosure[aria-expanded="true"] { background: transparent; }
  .stats-nav-sub { padding-left: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-dashboard-page .admin-dashboard-sidebar .admin-nav-group > a,
  .admin-dashboard-page .admin-nav-disclosure-toggle,
  .admin-dashboard-page .admin-logout-button { transition: none; }
}
