/* Distribuidora Huevos — Custom styles */
:root {
  --brand: #003B95;
  --brand-light: #0049B7;
  --brand-dark: #002a6b;
  --accent: #FFD200;
  --accent-dark: #e6bd00;
  --content-bg: #F8FAFC;
  --sidebar-width: 240px;
  --sidebar-collapsed: 64px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 14px;
}

body {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  background-color: var(--content-bg);
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

/* Sidebar tooltip (collapsed mode) */
.sidebar-tooltip {
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--brand-dark);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 60;
}
.sidebar-item:hover .sidebar-tooltip {
  opacity: 1;
}

/* Modal overlay — blur + dim (platform-wide) */
.modal-overlay {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-panel {
  max-height: min(92vh, 900px);
  overflow-y: auto;
}

/* Chart container */
.chart-container {
  position: relative;
  height: 280px;
}

@media (min-width: 768px) {
  .chart-container {
    height: 320px;
  }
}

/* Login pattern background */
.login-pattern {
  background-color: var(--brand);
  background-image:
    linear-gradient(135deg, rgba(0, 73, 183, 0.4) 25%, transparent 25%),
    linear-gradient(225deg, rgba(0, 73, 183, 0.4) 25%, transparent 25%),
    linear-gradient(45deg, rgba(0, 73, 183, 0.4) 25%, transparent 25%),
    linear-gradient(315deg, rgba(0, 73, 183, 0.4) 25%, transparent 25%);
  background-size: 40px 40px;
}

/* Focus accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Transitions */
.sidebar-transition {
  transition: width 0.2s ease, transform 0.25s ease;
}

.content-transition {
  transition: margin-left 0.2s ease, transform 0.2s ease;
}

/* App shell — sidebar pushes content, does not overlay (desktop) */
.app-shell {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

.app-shell__sidebar {
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .app-shell__sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
  }
}

@media (max-width: 1023px) {
  .app-shell__sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
  }

  .app-shell__main--drawer-open {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    max-width: calc(100% - var(--sidebar-width));
  }
}
