/* ==========================================================================
   RAÚL ASENCIO - CORE PREMIUM DESIGN SYSTEM
   Palette: Pantone 207 Burgundy & Gold on Warm Crema and Slate accents
   ========================================================================== */

:root {
  --primary: #6B1D2F;          /* Pantone 207 Burgundy */
  --primary-hover: #541422;
  --primary-light: #F7EAEB;
  --accent-gold: #D4AF37;      /* Metallic Gold */
  --accent-gold-hover: #B8962B;
  --bg-cream: #FAF7F2;         /* Elegant Warm Crema */
  --bg-white: #FFFFFF;
  --bg-card-header: #FAF4EB;
  --text-dark: #2B2625;        /* Deep Slate / Charcoal */
  --text-muted: #756D69;
  --border-light: #EBE5DB;
  --border-focus: #D4AF37;
  
  --success: #3D8C62;
  --success-bg: #EAF5EE;
  --warning: #C98B1D;
  --warning-bg: #FCF4E6;
  --danger: #BA3C3C;
  --danger-bg: #FBEAEA;
  
  --font-family-sans: 'Montserrat', sans-serif;
  --font-family-serif: 'Playfair Display', Georgia, serif;
  --sidebar-width: 280px;
  --header-height: 70px;
  --border-radius-lg: 16px;
  --border-radius-md: 10px;
  --border-radius-sm: 6px;
  --box-shadow-sm: 0 4px 6px -1px rgba(107, 29, 47, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --box-shadow-md: 0 10px 15px -3px rgba(107, 29, 47, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family-sans);
  background-color: var(--bg-cream);
  color: var(--text-dark);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Loading Overlay */
.app-loading {
  position: fixed;
  inset: 0;
  background: var(--bg-cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}
.app-loading.hidden {
  opacity: 0;
  pointer-events: none;
}
.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
  margin-bottom: 20px;
}
.loading-text {
  font-family: var(--font-family-serif);
  font-size: 1.2rem;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.5px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Toast System */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.toast {
  padding: 16px 20px;
  background: var(--bg-white);
  border-left: 5px solid var(--primary);
  border-radius: var(--border-radius-md);
  box-shadow: var(--box-shadow-md);
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(120%);
  animation: slideIn 0.3s forwards cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 320px;
  max-width: 450px;
}
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-warning { border-left-color: var(--warning); }
.toast.toast-danger { border-left-color: var(--danger); }
.toast.hide {
  animation: slideOut 0.3s forwards ease-in;
}

@keyframes slideIn {
  to { transform: translateX(0); }
}
@keyframes slideOut {
  to { transform: translateX(120%); }
}

/* Layout Framework */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Premium Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  background: var(--primary);
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(84, 20, 34, 0.15);
}

.sidebar-brand {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.brand-logo {
  font-size: 1.8rem;
  color: var(--accent-gold);
}
.brand-title h1 {
  font-family: var(--font-family-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.5px;
  line-height: 1.1;
}
.brand-subtitle {
  font-size: 0.75rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.sidebar-nav {
  flex: 1;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}
.nav-section-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 700;
  padding: 12px 12px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  border-radius: var(--border-radius-md);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}
.nav-item i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-gold);
}
.nav-item.active {
  background: var(--accent-gold);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.user-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--border-radius-md);
}
.user-avatar {
  width: 40px;
  height: 40px;
  background: var(--accent-gold);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}
.user-meta {
  display: flex;
  flex-direction: column;
}
.user-name {
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.85rem;
}
.user-role {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
}

/* Main Content Area */
.app-main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header Bar */
.main-header {
  height: var(--header-height);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}
.header-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}
.breadcrumb-parent {
  color: var(--text-muted);
  font-weight: 500;
}
.breadcrumb-separator {
  color: var(--text-muted);
  font-size: 0.75rem;
}
.breadcrumb-active {
  color: var(--primary);
  font-weight: 600;
}
.header-actions {
  display: flex;
  align-items: center;
}
.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}
.indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 140, 98, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(61, 140, 98, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 140, 98, 0); }
}
.indicator-text {
  color: var(--text-muted);
}

/* View Viewport & Tab Transitions */
.page-viewport {
  padding: 32px;
  flex: 1;
}
.page-view {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}
.page-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header within Views */
.view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}
.view-title-block h2 {
  font-family: var(--font-family-serif);
  font-size: 2rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: -0.5px;
}
.view-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

/* Premium Layout Grid System */
.grid {
  display: grid;
  gap: 24px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-y { grid-auto-flow: row; }
.col-span-1 { grid-column: span 1; }
.col-span-2 { grid-column: span 2; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mr-4 { margin-right: 16px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.border-top { border-top: 1px solid var(--border-light); }
.pt-2 { padding-top: 8px; }
.bg-light { background: #FAF9F6; }
.p-3 { padding: 16px; }
.rounded { border-radius: var(--border-radius-md); }

/* Premium Cards */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-sm);
  overflow: hidden;
  transition: var(--transition-smooth);
}
.card:hover {
  box-shadow: var(--box-shadow-md);
  border-color: #E6DC melt;
}
.card-accent {
  border-left: 6px solid var(--accent-gold);
}
.card-header {
  background: var(--bg-card-header);
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header h3 {
  font-family: var(--font-family-serif);
  font-size: 1.15rem;
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-body {
  padding: 24px;
}

/* Forms & Inputs Custom Styling */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-control {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-family-sans);
  font-size: 0.92rem;
  color: var(--text-dark);
  background: #FCFAF6;
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  transition: var(--transition-smooth);
}
.form-control:focus {
  outline: none;
  background: var(--bg-white);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}
.form-section-header {
  font-family: var(--font-family-serif);
  font-size: 1.1rem;
  color: var(--primary);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 8px;
  margin: 24px 0 12px;
}
.section-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  margin-top: -8px;
}

/* Compact Forms (Used in calculator grids) */
.form-group-compact {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-group-compact label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}
.form-control-compact {
  padding: 8px 10px;
  font-size: 0.85rem;
  background: #FCFAF6;
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-sm);
  color: var(--text-dark);
}
.form-control-compact:focus {
  outline: none;
  border-color: var(--border-focus);
}

/* Premium Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-family-sans);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 12px 24px;
  border-radius: var(--border-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(107, 29, 47, 0.15);
}
.btn-secondary {
  background: var(--bg-white);
  border-color: var(--border-light);
  color: var(--text-dark);
}
.btn-secondary:hover {
  background: var(--bg-cream);
  border-color: var(--accent-gold);
}
.btn-danger {
  background: var(--danger);
  color: #FFFFFF;
}
.btn-danger:hover {
  background: #9D2F2F;
}
.btn-sm {
  padding: 8px 16px;
  font-size: 0.78rem;
}
.btn-text {
  background: none;
  border: none;
  cursor: pointer;
}

/* Slider (Range) Controls */
.slider-control {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  outline: none;
}
.slider-control::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-gold);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.slider-control::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--primary);
}
.slider-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-left: 8px;
}

/* Table Design */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.table th {
  background: var(--bg-card-header);
  padding: 14px 20px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border-light);
}
.table td {
  padding: 16px 20px;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-dark);
}
.table tbody tr:hover {
  background: #FAF8F5;
}
.table-compact th {
  padding: 8px 12px;
  font-size: 0.72rem;
}
.table-compact td {
  padding: 8px 12px;
  font-size: 0.82rem;
}

/* Status Badges */
.badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-gold { background: var(--bg-card-header); color: var(--accent-gold-hover); border: 1px solid var(--accent-gold); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }

/* La Incubadora Sourdough Output styling */
.demand-result-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #FFFFFF;
}
.demand-total-value {
  padding: 12px 0;
}
.value-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
}
.demand-total-value h2 {
  font-family: var(--font-family-serif);
  font-size: 2.2rem;
  color: var(--accent-gold);
  margin-top: 4px;
}
.demand-breakdown-sub {
  display: flex;
  gap: 24px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
}

.calculation-grid {
  background: #FAF8F4;
  border: 1px dashed var(--accent-gold);
  border-radius: var(--border-radius-md);
  padding: 16px;
}
.calc-box {
  display: flex;
  flex-direction: column;
}
.calc-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.calc-number {
  font-size: 1.15rem;
  color: var(--primary);
  font-weight: 700;
  margin-top: 2px;
}
.temp-water-result {
  font-size: 0.95rem;
  color: var(--danger);
  font-weight: 700;
  align-self: center;
}
.output-total {
  font-size: 0.95rem;
  color: var(--success);
  font-weight: 700;
}

/* Custom Checkbox Design */
.checkbox-container {
  display: flex;
  position: relative;
  padding-left: 28px;
  cursor: pointer;
  font-size: 0.88rem;
  user-select: none;
  align-items: center;
}
.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}
.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: #FAF6EE;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  transition: var(--transition-smooth);
}
.checkbox-container:hover input ~ .checkmark {
  border-color: var(--accent-gold);
}
.checkbox-container input:checked ~ .checkmark {
  background-color: var(--accent-gold);
  border-color: var(--accent-gold);
}
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}
.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}
.checkbox-container .checkmark:after {
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid var(--primary);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.block-checkbox {
  padding: 16px 16px 16px 44px;
  background: #FAF8F4;
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  transition: var(--transition-smooth);
}
.block-checkbox .checkmark {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}
.block-checkbox input:checked ~ .checkmark {
  background-color: var(--primary);
  border-color: var(--primary);
}
.block-checkbox input:checked ~ .checkmark:after {
  border-color: #FFFFFF;
}
.block-checkbox:hover {
  border-color: var(--accent-gold);
  background: #FFFFFF;
}
.checkbox-meta {
  display: flex;
  flex-direction: column;
}
.checkbox-meta strong {
  font-size: 0.88rem;
  color: var(--text-dark);
}
.checkbox-meta span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Recetario and Usuarios sidebars list */
.recipes-list-group, .users-list-group {
  display: flex;
  flex-direction: column;
  max-height: 500px;
  overflow-y: auto;
}
.list-item-btn {
  display: flex;
  flex-direction: column;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.list-item-btn:hover {
  background: var(--primary-light);
}
.list-item-btn.active {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
}
.list-item-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--primary);
}
.list-item-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Quality & IFS checklists Subnav */
.tabs-subnav {
  gap: 12px;
  border-bottom: 1px solid var(--border-light);
}
.subnav-item {
  background: none;
  border: none;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
  border-bottom: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}
.subnav-item:hover {
  color: var(--primary);
}
.subnav-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.subtab-view {
  display: none;
}
.subtab-view.active {
  display: block;
}

/* OCR Document Box styling */
.ocr-queue-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ocr-doc-box {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition-smooth);
}
.ocr-doc-box:hover {
  border-color: var(--accent-gold);
}
.ocr-doc-info {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ocr-doc-icon {
  font-size: 1.8rem;
  color: var(--primary);
}
.ocr-doc-meta {
  display: flex;
  flex-direction: column;
}
.ocr-doc-name {
  font-weight: 600;
  font-size: 0.88rem;
}
.ocr-doc-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.ocr-action-btn {
  padding: 6px 12px;
  font-size: 0.75rem;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
}
.ocr-action-btn:hover {
  background: var(--primary-hover);
}

/* Sabores reparto splitter colors */
.sabor-item-reparto {
  background: #FCFAF6;
  border: 1px solid var(--border-light);
  padding: 16px;
  border-radius: var(--border-radius-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sabor-item-reparto label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
}
.input-group {
  display: flex;
}
.input-group .form-control {
  border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
}
.input-group-addon {
  background: var(--border-light);
  border: 1px solid var(--border-light);
  border-left: none;
  padding: 0 12px;
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  color: var(--text-muted);
}
.rep-result-calc {
  font-size: 1rem;
  font-weight: 700;
  color: var(--success);
}
.warning-text {
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 4px;
}

/* Modal style forms */
.hidden {
  display: none !important;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-cream);
}
::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

/* ==========================================================================
   RESPONSIVE PREMIUM STYLES (Mobile, Tablet & Desktop)
   ========================================================================== */

@media (max-width: 992px) {
  .app-container {
    flex-direction: column;
  }
  
  .app-sidebar {
    width: 100%;
    position: relative;
    box-shadow: 0 4px 12px rgba(84, 20, 34, 0.1);
  }
  
  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 12px 16px;
    gap: 8px;
    white-space: nowrap;
  }
  
  .nav-section-title {
    display: none;
  }
  
  .nav-item {
    padding: 8px 14px;
    font-size: 0.8rem;
  }
  
  .sidebar-footer {
    display: none;
  }
  
  .app-main-content {
    margin-left: 0;
  }
  
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .col-span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 576px) {
  .page-viewport {
    padding: 16px;
  }
  
  .main-header {
    padding: 0 16px;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .view-header {
    flex-direction: column;
    gap: 12px;
  }
  
  .view-actions-block {
    width: 100%;
  }
  
  .view-actions-block .btn {
    width: 100%;
  }
  
  .calculation-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .card-body {
    padding: 16px;
  }
}
