/* GreenMarket OS - Retail Operating System Styling */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&family=Noto+Sans+Ethiopic:wght@400;500;600;700&display=swap');

:root {
  --color-primary: #003524;
  --color-primary-container: #174d38;
  --color-secondary: #226a4d;
  --color-secondary-container: #a7efca;
  --color-tertiary: #402a00;
  --color-tertiary-container: #5d3e00;
  --color-surface: #f8faf9;
  --color-surface-container: #eceeed;
  --color-surface-container-low: #f2f4f3;
  --color-surface-container-lowest: #ffffff;
  --color-error: #ba1a1a;
  --color-error-container: #ffdad6;
}

/* Prevent unnecessary horizontal scrolling platform-wide & Clean Typography */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
  width: 100%;
  font-family: 'Inter', 'Noto Sans Ethiopic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

input, button, select, textarea {
  font-family: inherit;
}

/* Tabular Numerics for financial & inventory precision per DESIGN.md */
.tabular-nums, .font-numeric-data, .font-numeric-pos {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "cv05" 1;
}

/* Monospace Receipt Typography */
.font-mono-receipt {
  font-family: 'JetBrains Mono', Courier, monospace;
}

/* Hide scrollbars but keep smooth scrolling */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Custom Soft Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #c0c9c2;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #707973;
}

/* Scale simulation digital LCD */
.lcd-screen {
  background: linear-gradient(135deg, #122419 0%, #0d1a12 100%);
  color: #4ade80;
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
  font-family: 'JetBrains Mono', Courier, monospace;
}

/* Prominent Cashier Display Banner */
.prominent-display {
  background: linear-gradient(135deg, #003524 0%, #174d38 100%);
  color: #ffffff;
  box-shadow: 0 4px 20px -2px rgba(0, 53, 36, 0.25);
}

/* Thermal Receipt Styling */
.thermal-paper {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border-top: 6px dashed #9ca3af;
  border-bottom: 6px dashed #9ca3af;
}

@media print {
  body * {
    visibility: hidden;
  }
  #thermal-receipt-modal, #thermal-receipt-modal * {
    visibility: visible;
  }
  #thermal-receipt-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent !important;
  }
  .no-print {
    display: none !important;
  }
  .thermal-paper {
    box-shadow: none !important;
    border: none !important;
    width: 80mm !important;
    margin: 0 auto !important;
  }
}

/* Smooth active state transitions */
.active-press:active {
  transform: scale(0.97);
}

/* Pulse animation for live online indicators */
@keyframes softPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.animate-soft-pulse {
  animation: softPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Autocomplete Dropdown Styling */
.autocomplete-dropdown {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Checkbox-based selection card styling */
.product-card-selected {
  border-color: #174d38 !important;
  box-shadow: 0 0 0 2px #174d38, 0 4px 12px -2px rgba(23, 77, 56, 0.12);
  background-color: rgba(23, 77, 56, 0.03) !important;
}

/* Category Navigation Pills Soft Hover */
.category-pill-btn {
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.category-pill-btn:hover {
  transform: translateY(-1px);
}

/* Quantity input focus state */
input[type="number"]::-webkit-inner-spin-button, 
input[type="number"]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}
input[type="number"] {
  -moz-appearance: textfield;
}


/* ==============================================================================
   MODERN ENTERPRISE LOGIN PAGE STYLING (Inspired by Reference Design)
   ============================================================================== */
.login-screen {
  min-height: 100vh;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(14, 59, 43, 0.08), transparent),
              radial-gradient(ellipse 60% 40% at 85% 95%, rgba(184, 115, 51, 0.06), transparent),
              radial-gradient(ellipse 50% 30% at 10% 90%, rgba(14, 59, 43, 0.04), transparent),
              #f8fafc;
  padding: 36px 16px 44px;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.login-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: transparent;
  width: 100%;
  padding: 0;
  min-height: auto;
  margin: auto;
}

.login-form-container {
  width: 100%;
  max-width: 448px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
}

.login-auth-card {
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03),
              0 16px 36px -6px rgba(14, 59, 43, 0.09),
              0 28px 56px -12px rgba(15, 23, 42, 0.06);
  padding: 24px 26px 20px;
  position: relative;
}

.login-brand-header {
  text-align: center;
  padding-bottom: 2px;
  margin-bottom: 12px;
  border-bottom: none;
}

.login-logo-lockup {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-logo-frame {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #ffffff;
  border: 1.5px solid rgba(16, 185, 129, 0.28);
  box-shadow: 0 8px 20px -3px rgba(6, 78, 59, 0.18), 0 2px 4px 0 rgba(0, 0, 0, 0.04);
  padding: 3px;
  margin: 0 auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-logo-frame:hover {
  transform: scale(1.04);
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 10px 24px -3px rgba(6, 78, 59, 0.26);
}

.login-official-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
  display: block;
}

.login-platform-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 23px;
  font-weight: 850;
  letter-spacing: -0.4px;
  line-height: 1.2;
  margin: 0 0 3px;
  color: #0e3b2b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.login-platform-highlight {
  color: #b87333;
  font-weight: 800;
}

.login-platform-subtitle {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.3px;
  line-height: 1.35;
  margin: 0 0 2px;
}

.login-operational-tagline {
  font-size: 11px;
  font-weight: 500;
  font-style: italic;
  color: #64748b;
  letter-spacing: 0.15px;
  margin: 0 0 12px;
  line-height: 1.35;
}

.login-hero-badge {
  display: flex;
  width: 100%;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #072a1e, #0d3b2b 55%, #154c38);
  border: 1px solid rgba(217, 163, 94, 0.45);
  box-shadow: 0 4px 14px rgba(10, 42, 30, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  margin: 0 auto;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.login-hero-statement {
  font-size: clamp(10px, 2.2vw, 12px);
  font-weight: 750;
  color: #ffffff;
  letter-spacing: 0.2px;
  white-space: nowrap;
  display: inline-flex;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  line-height: 1.25;
}

.login-hero-bullet {
  color: #fbbf24;
  margin: 0 6px;
  font-size: 11.5px;
  font-weight: 900;
  opacity: 0.95;
  display: inline-block;
}

.login-section-header {
  margin-bottom: 12px;
}

.login-section-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: #0f172a;
  margin: 0 0 2px;
  line-height: 1.25;
}

.login-section-subtitle {
  font-size: 12px;
  color: #64748b;
  margin: 0;
  line-height: 1.35;
}

.login-alert-banner {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
  animation: fadeIn 0.2s ease;
}

.login-alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.login-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: color 0.15s ease;
}

.login-input-wrap:focus-within .login-input-icon {
  color: #0e3b2b;
}

.login-input-field {
  width: 100%;
  height: 40px;
  padding: 8px 12px 8px 38px;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  font-size: 13.5px;
  color: #0f172a;
  background: #f8fafc;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-input-password {
  padding-right: 38px;
}

.login-input-field:focus {
  outline: none;
  border-color: #0e3b2b;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(14, 59, 43, 0.12);
}

.login-eye-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.login-eye-btn:hover {
  color: #0f172a;
}

.login-submit-btn {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 9px;
  background: linear-gradient(135deg, #0e3b2b, #064e3b 50%, #115e59);
  color: #ffffff;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 3px 12px rgba(14, 59, 43, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #082d21, #0e3b2b 60%, #16654b);
  box-shadow: 0 6px 18px rgba(14, 59, 43, 0.35);
  transform: translateY(-1px);
}

.login-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.login-submit-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.login-fast-track-wrap {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.login-fast-track-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.login-fast-track-select {
  font-size: 11.5px;
  padding: 3px 8px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  cursor: pointer;
  max-width: 250px;
  width: 100%;
  font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.login-fast-track-select:focus {
  outline: none;
  border-color: #0e3b2b;
  background: #ffffff;
}

@media (max-width: 640px) {
  .login-screen {
    padding: 24px 12px 32px;
  }
  .login-auth-card {
    padding: 20px 16px 16px;
    border-radius: 16px;
  }
  .login-logo-frame {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    margin-bottom: 6px;
  }
  .login-platform-title {
    font-size: 21px;
  }
  .login-hero-badge {
    padding: 7px 8px;
    min-height: 32px;
  }
  .login-hero-statement {
    font-size: clamp(9px, 2.6vw, 11px);
    letter-spacing: 0;
  }
  .login-fast-track-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .login-fast-track-select {
    max-width: 100%;
  }
}

/* ==============================================================================
   CONSISTENT BRAND ICON COMPONENT STYLES
   ============================================================================== */
.brand-icon-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.brand-icon-frame:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(14, 59, 43, 0.1);
}
.brand-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ==============================================================================
   ENTERPRISE COLLAPSIBLE SIDEBAR & 11-MODULE NAVIGATION STYLES
   ============================================================================== */
#desktop-sidebar {
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), padding 0.25s ease;
}

#desktop-sidebar.sidebar-collapsed {
  width: 5rem !important; /* 80px */
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

#desktop-sidebar.sidebar-collapsed .sidebar-text,
#desktop-sidebar.sidebar-collapsed .sidebar-brand-text,
#desktop-sidebar.sidebar-collapsed .sidebar-node-box,
#desktop-sidebar.sidebar-collapsed .sidebar-footer-stats,
#desktop-sidebar.sidebar-collapsed .sidebar-badge-full {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

#desktop-sidebar.sidebar-collapsed .sidebar-link {
  justify-content: center !important;
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

#desktop-sidebar.sidebar-collapsed .sidebar-badge-mini {
  display: flex !important;
  position: absolute;
  top: 4px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: #226a4d;
}

.sidebar-badge-mini {
  display: none;
}

/* Nav Link Hover & Active Focus */
.sidebar-link {
  position: relative;
  transition: all 0.15s ease-in-out;
}

.sidebar-link[aria-current="page"] {
  background-color: #003524 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 3px rgba(0, 53, 36, 0.15);
}

.sidebar-link[aria-current="page"] .material-symbols-outlined,
.sidebar-link[aria-current="page"] svg,
.sidebar-link[aria-current="page"] i {
  color: #ffffff !important;
}

.sidebar-link[aria-current="page"] .sidebar-badge {
  background-color: #a7efca !important;
  color: #003524 !important;
  font-weight: 800 !important;
}

/* SVG Chart Animations & Gradients */
.chart-area-path {
  transition: all 0.3s ease;
}

.chart-point:hover {
  r: 6px;
  cursor: pointer;
}


/* Ethiopic Unicode Font Support */
body, input, button, select, textarea {
  font-family: 'Inter', 'Noto Sans Ethiopic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Anti-flicker stability guard for unauthenticated loads */
.auth-pending-login #app-top-header,
.auth-pending-login #app-main-workspace {
  display: none !important;
}
.auth-pending-login #view-login {
  display: block !important;
}

/* Header Language, Notifications & User Lockup Reference Refinement */
#header-notification-badge {
  box-shadow: 0 2px 5px rgba(220, 38, 38, 0.4);
  font-feature-settings: "tnum";
}
#header-lang-btn {
  user-select: none;
  -webkit-user-select: none;
}
#lang-pill-active {
  background-color: #0c4a34 !important;
  color: #ffffff !important;
}
.user-profile-role {
  color: #059669;
}
