/*
 * Daybox Admin — Base Styles
 * Reset, typography, layout
 */

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

html, body {
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-subhead);
  color: var(--text-primary);
  background: var(--background);
  line-height: 1.5;
  letter-spacing: -0.011em;
}

/* Layout: sidebar + content */
.layout {
  display: flex;
  height: 100%;
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--separator);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--timing-normal) var(--easing-default);
}

.content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: var(--space-3xl);
  overflow-y: auto;
  min-height: 100%;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.022em;
  color: var(--text-primary);
}

h1 { font-size: var(--font-size-title1); }
h2 { font-size: var(--font-size-title2); }
h3 { font-size: var(--font-size-title3); }
h4 { font-size: var(--font-size-headline); font-weight: 600; }

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--fill-tertiary);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--fill-secondary);
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus:not(:focus-visible) {
  outline: none;
}

/* Page header */
.page-header {
  margin-bottom: var(--space-2xl);
}

.page-header h1 {
  margin-bottom: var(--space-xs);
}

.page-header p {
  color: var(--text-secondary);
  font-size: var(--font-size-subhead);
}

/* Mobile sidebar */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

.mobile-menu-btn {
  display: none;
  position: fixed;
  top: var(--space-lg);
  left: var(--space-lg);
  z-index: 101;
  background: var(--surface);
  border: 1px solid var(--separator);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  cursor: pointer;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

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

  .sidebar-overlay.open {
    display: block;
  }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .content {
    margin-left: 0;
    padding: var(--space-xl);
    padding-top: 64px;
  }
}
