/* ==========================================================================
   IBEDC Brand Identity & MSMS Unified Theme System
   Official Colors:
     - Primary Electric Orange: #FC8002 / #ED7D31
     - Primary Deep Navy:       #143855 / #0D233A
     - Accent Sky Blue:         #3284F1 / #3B8AF2
     - Charcoal / Dark Slate:   #1E293B / #222222
     - Warm Light Gray:         #F8FAFC / #F1F5F9
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@500;600;700;800&display=swap');

:root {
  --ibedc-orange: #fc8002;
  --ibedc-orange-hover: #e06e00;
  --ibedc-orange-light: #fff7ed;
  --ibedc-navy: #143855;
  --ibedc-navy-dark: #0b2134;
  --ibedc-navy-light: #1e4f75;
  --ibedc-blue: #3284f1;
  --ibedc-blue-hover: #216fd6;
  --ibedc-slate: #1e293b;
  --ibedc-muted: #64748b;
  --ibedc-bg: #f8fafc;
  --ibedc-card-bg: #ffffff;
  --ibedc-border: #e2e8f0;
  --ibedc-sidebar-width: 270px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--ibedc-bg);
  color: var(--ibedc-slate);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand-font {
  font-family: 'Poppins', 'Inter', sans-serif;
}

/* ==========================================================================
   IBEDC Navigation Bar (Solid Brand Navbar for Public & Landing Pages)
   ========================================================================== */
.navbar-ibedc {
  background: #0b2134 !important;
  background: linear-gradient(135deg, #0b2134 0%, #143855 100%) !important;
  border-bottom: 3px solid var(--ibedc-orange) !important;
  box-shadow: 0 4px 20px rgba(11, 33, 52, 0.3) !important;
  padding: 0.75rem 1.25rem;
}

.navbar-ibedc .navbar-brand {
  color: #ffffff !important;
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-ibedc .navbar-brand span.msms-title {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.navbar-ibedc .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
}

.navbar-ibedc .nav-link:hover {
  color: var(--ibedc-orange) !important;
}

#app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.content-body {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 1.75rem;
}

/* Left Sidebar */
#sidebar {
  width: var(--ibedc-sidebar-width);
  background: linear-gradient(180deg, var(--ibedc-navy-dark) 0%, var(--ibedc-navy) 100%);
  color: #ffffff;
  flex-shrink: 0;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 2px 0 15px rgba(11, 33, 52, 0.2);
  height: 100vh;
  position: sticky;
  top: 0;
}

#sidebar .sidebar-brand {
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--ibedc-orange);
  background: rgba(0, 0, 0, 0.15);
}

#sidebar .sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.75rem 4rem;
}

#sidebar .sidebar-menu::-webkit-scrollbar {
  width: 5px;
}
#sidebar .sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* Sidebar Section Headers */
.sidebar-heading {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  color: rgba(255, 255, 255, 0.45);
  padding: 0.85rem 0.75rem 0.35rem;
  margin-top: 0.5rem;
}

/* Sidebar Nav Links */
.sidebar-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  border-radius: 8px;
  margin-bottom: 2px;
  transition: all 0.15s ease;
}

.sidebar-nav-link i {
  font-size: 1.05rem;
  margin-right: 0.65rem;
  width: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

.sidebar-nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ibedc-orange);
}

.sidebar-nav-link:hover i {
  color: var(--ibedc-orange);
}

.sidebar-nav-link.active {
  background: var(--ibedc-orange);
  color: #ffffff;
  font-weight: 600;
}

.sidebar-nav-link.active i {
  color: #ffffff;
}

/* Collapsible Submenus */
.sidebar-submenu {
  padding-left: 1rem;
  list-style: none;
  margin-bottom: 0.4rem;
  margin-top: 0.15rem;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  margin-left: 1.15rem;
}

.sidebar-submenu .sidebar-sublink {
  display: block;
  padding: 0.4rem 0.75rem;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.81rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.sidebar-submenu .sidebar-sublink:hover {
  color: var(--ibedc-orange);
  background: rgba(255, 255, 255, 0.06);
  padding-left: 0.95rem;
}

.sidebar-submenu .sidebar-sublink.active {
  color: #ffffff;
  font-weight: 600;
  background: rgba(252, 128, 2, 0.2);
}

/* Collapsed State */
body.sidebar-collapsed #sidebar {
  width: 0;
  overflow: hidden;
  border: none;
  flex-shrink: 0;
}

body.sidebar-collapsed #main-wrapper {
  margin-left: 0;
  width: 100%;
}

/* Guaranteed full-viewport flex layout (audit hardening) */
html, body { height: 100%; margin: 0; }
#app-container {
  display: flex;
  min-height: 100vh;
  min-width: 0;
  width: 100%;
  align-items: stretch;
}
#main-wrapper {
  flex: 1 1 0% !important;   /* always grow to fill remaining width/height */
  display: flex !important;
  flex-direction: column !important;
  min-width: 0;
  min-height: 100vh;
  max-width: 100%;
  background: var(--ibedc-bg);
}
.content-body {
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  padding: 1.75rem;
}
#main-wrapper > footer,
#main-wrapper footer {
  flex-shrink: 0;
  width: 100%;
}

/* Main Content Area */
#main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--ibedc-bg);
  min-height: 100vh;
}

.content-body {
  flex: 1;
  padding: 1.75rem;
}

/* Top Navigation Bar */
.topbar-ibedc {
  background: #ffffff;
  border-bottom: 1px solid var(--ibedc-border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  padding: 0.65rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1030;
}



/* Custom Buttons & Theme */
.btn-ibedc-orange {
  background-color: var(--ibedc-orange);
  border-color: var(--ibedc-orange);
  color: #ffffff;
  font-weight: 600;
  transition: all 0.2s ease;
}
.btn-ibedc-orange:hover, .btn-ibedc-orange:focus {
  background-color: var(--ibedc-orange-hover);
  border-color: var(--ibedc-orange-hover);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(252, 128, 2, 0.35);
}

.btn-ibedc-navy {
  background-color: var(--ibedc-navy);
  border-color: var(--ibedc-navy);
  color: #ffffff;
  font-weight: 600;
  transition: all 0.2s ease;
}
.btn-ibedc-navy:hover, .btn-ibedc-navy:focus {
  background-color: var(--ibedc-navy-dark);
  border-color: var(--ibedc-navy-dark);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(20, 56, 85, 0.3);
}

.brand-badge {
  background: #fc8002;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Mobile Media Queries */
@media (max-width: 991px) {
  #sidebar {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    transform: translateX(-100%);
    width: var(--ibedc-sidebar-width);
  }
  body.sidebar-mobile-open #sidebar {
    transform: translateX(0);
  }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1035;
  }
  body.sidebar-mobile-open .sidebar-backdrop {
    display: block;
  }
}

/* ==========================================================================
   High-Contrast Form Controls & Scrollable Modals for Store Management
   ========================================================================== */
.form-control, .form-select, select.form-control, textarea.form-control {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #94a3b8 !important;
  font-weight: 500 !important;
  font-size: 0.9rem !important;
  border-radius: 6px !important;
}

.form-control:focus, .form-select:focus, select.form-control:focus, textarea.form-control:focus {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #fc8002 !important;
  box-shadow: 0 0 0 0.25rem rgba(252, 128, 2, 0.25) !important;
  outline: none !important;
}

.form-control::placeholder, textarea.form-control::placeholder {
  color: #64748b !important;
  opacity: 0.9 !important;
}

.form-control[readonly], .form-control:disabled,
.form-control-plaintext {
  background-color: #f1f5f9 !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
  font-weight: 600 !important;
}

.form-label {
  color: #f8fafc !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  margin-bottom: 0.35rem !important;
  letter-spacing: 0.2px;
}

/* Smooth & responsive modal scroll behavior */
.modal-dialog-scrollable .modal-content {
  max-height: 90vh !important;
  border: 1px solid #475569 !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3) !important;
}

.modal-dialog-scrollable .modal-body {
  max-height: calc(90vh - 130px) !important;
  overflow-y: auto !important;
  scrollbar-width: thin;
  scrollbar-color: #fc8002 #1e293b;
  padding: 1.5rem !important;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-track {
  background: #0f172a;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-thumb {
  background: #fc8002;
  border-radius: 4px;
}

