* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: #f4f6f9; }

/* SIDEBAR */
.sidebar { position: fixed; top: 0; left: 0; width: 260px; height: 100vh; background: linear-gradient(180deg, #00432A 0%, #006838 100%); color: #fff; overflow-y: auto; z-index: 1050; transition: transform 0.3s ease; }
.sidebar-header { padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-header h4 { font-weight: 700; font-size: 18px; margin-bottom: 2px; }

/* BRAND LOGO - white chip so the dark logo mark stays legible on the green panels */
.brand-logo-chip { display: inline-block; background: #fff; border-radius: 8px; padding: 6px 12px; line-height: 0; }
.brand-logo-chip img { display: block; }
.sidebar-nav { list-style: none; padding: 12px 0; margin: 0; }
.sidebar-nav li a { display: flex; align-items: center; padding: 10px 20px; color: rgba(255,255,255,0.75); text-decoration: none; font-size: 14px; transition: all 0.2s; }
.sidebar-nav li a.sub2 { padding-left: 40px; font-size: 13px; }
.sidebar-nav li a:hover, .sidebar-nav li a.active { background: rgba(255,255,255,0.12); color: #fff; }
.sidebar-nav li a.active { border-left: 3px solid #EC1C24; }
.sidebar-nav li a i { margin-right: 10px; font-size: 18px; width: 22px; text-align: center; }
.sidebar-divider { border-top: 1px solid rgba(255,255,255,0.1); margin: 8px 0; }
.sidebar-label { padding: 8px 20px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.4); font-weight: 600; }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(17,24,39,0.45); z-index: 1040; opacity: 0; transition: opacity 0.2s ease; }

/* MAIN CONTENT */
#main-content { margin-left: 260px; min-height: 100vh; transition: margin-left 0.3s ease; }
.top-navbar { display: flex; align-items: center; padding: 12px 24px; background: #fff; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 999; }
.sidebar-toggle { color: #333; }
.page-content { padding: 24px; }

/* RESPONSIVE NAV - desktop: hamburger collapses the sidebar in place */
@media (min-width: 769px) {
    body.sidebar-hidden .sidebar { transform: translateX(-260px); }
    body.sidebar-hidden #main-content { margin-left: 0; }
}

/* RESPONSIVE NAV - mobile: sidebar is an off-canvas overlay, closed by default */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    body.sidebar-open .sidebar { transform: translateX(0); }
    #main-content { margin-left: 0; }
    .top-navbar { padding: 10px 16px; }
    .page-content { padding: 16px; }
    body.sidebar-open .sidebar-backdrop { display: block; opacity: 1; }
    .top-navbar .text-muted.small { display: none; } /* "Welcome, X (Role)" text - hidden to leave room for Logout */
}

/* PAGE HEADER */
.page-header { margin-bottom: 24px; }
.page-header h2 { font-size: 24px; font-weight: 700; color: #003D22; margin: 0; }
.page-header p { color: #6b7280; margin: 4px 0 0; }

/* STAT CARDS */
.stat-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); border: 1px solid #e5e7eb; transition: transform 0.2s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.stat-card .stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: #003D22; }
.stat-card .stat-label { font-size: 13px; color: #6b7280; font-weight: 500; }
.bg-green-light { background: rgba(0,104,56,0.1); color: #006838; }
.bg-brand-light { background: rgba(17,147,67,0.12); color: #119343; }
.bg-gold-light { background: rgba(232,163,23,0.12); color: #E8A317; }
.bg-red-light { background: rgba(236,28,36,0.1); color: #EC1C24; }
.bg-blue-light { background: rgba(37,99,235,0.1); color: #2563EB; }
.bg-orange-light { background: rgba(245,158,11,0.1); color: #F59E0B; }

/* CARDS */
.card { border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.card-header { background: #fff; border-bottom: 1px solid #e5e7eb; font-weight: 600; padding: 16px 20px; border-radius: 12px 12px 0 0 !important; }
.card-body { padding: 20px; }

/* FORM CONTROLS - compact sizing so inputs match the rest of the dense admin UI */
.form-label { font-size: 12.5px; font-weight: 600; color: #374151; margin-bottom: 4px; }
.form-control, .form-select { font-size: 13.5px; padding: 6px 10px; min-height: 36px; }
.form-control-sm, .form-select-sm { font-size: 12.5px; padding: 4px 8px; min-height: 30px; }
.form-control-color { min-height: 36px; }
textarea.form-control { font-size: 13.5px; }
.form-check-label { font-size: 13px; }
.form-check-input { width: 1.05em; height: 1.05em; }
.input-group-text { font-size: 13.5px; }

/* Select2 - align with the compact .form-select sizing above */
.select2-container .select2-selection--single { min-height: 36px; border: 1px solid #ced4da !important; border-radius: 6px !important; }
.select2-container--default .select2-selection--single .select2-selection__rendered { font-size: 13.5px; line-height: 34px; padding-left: 10px; color: #212529; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 34px; }
.select2-dropdown { font-size: 13.5px; }
.select2-search--dropdown .select2-search__field { font-size: 13.5px; padding: 5px 8px; }
.select2-container--default .select2-results__option { padding: 6px 10px; }
.select2-container .select2-selection.is-invalid-select2 { border-color: #dc3545 !important; }
.invalid-feedback { font-size: 11.5px; }

/* TABLE */
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: #6b7280; font-weight: 600; white-space: nowrap; }
.table td { vertical-align: middle; font-size: 13px; }

/* BADGES */
.badge-approved, .status-active { background: #dcfce7; color: #16A34A; }
.badge-pending { background: #fef3c7; color: #D97706; }
.badge-draft { background: #fef3c7; color: #D97706; }
.badge-nospec, .status-inactive { background: #fee2e2; color: #DC2626; }
.badge-disabled { background: #f3f4f6; color: #6b7280; }

/* BUTTONS - primary matches IBC green */
.btn-primary, .btn-navratri { background-color: #006838; border-color: #006838; }
.btn-primary:hover, .btn-navratri:hover { background-color: #00432A; border-color: #00432A; }
.btn-outline-primary { color: #006838; border-color: #006838; }
.btn-outline-primary:hover { background-color: #006838; border-color: #006838; }

.color-swatch { display: inline-block; width: 18px; height: 18px; border-radius: 4px; border: 1px solid #d1d5db; vertical-align: middle; }

/* LOGIN */
.login-body { background: linear-gradient(160deg, #006838, #00150C); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.4); max-width: 860px; width: 100%; display: flex; }
.login-hero { width: 42%; background: linear-gradient(160deg, #006838, #00432A); color: #fff; padding: 40px 32px; display: flex; flex-direction: column; }
.login-form-side { flex: 1; padding: 48px 40px; display: flex; align-items: center; }
.brand-mark { font-family: Georgia, serif; font-size: 32px; font-weight: 700; letter-spacing: 2px; }
.flag-bar { display: flex; width: 80px; height: 6px; border-radius: 2px; overflow: hidden; margin-top: 6px; }
.flag-bar i { flex: 1; font-style: normal; }
.flag-bar i:nth-child(1) { background: #119343; }
.flag-bar i:nth-child(2) { background: #fff; }
.flag-bar i:nth-child(3) { background: #EC1C24; }

/* WIZARD STEPS */
.wizard-steps { display: flex; align-items: center; margin-bottom: 24px; }
.wizard-steps .step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #6b7280; font-weight: 600; }
.wizard-steps .step .num { width: 28px; height: 28px; border-radius: 50%; background: #E7ECE9; color: #6b7280; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.wizard-steps .step.active { color: #006838; }
.wizard-steps .step.active .num { background: #006838; color: #fff; }
.wizard-steps .step.done .num { background: #E6F2EB; color: #006838; border: 1px solid #7CC49B; }
.wizard-steps .line { flex: 1; height: 1px; background: #e5e7eb; margin: 0 12px; }
.wizard-pane { display: none; }
.wizard-pane.active { display: block; }

/* ATTACHMENT DROPZONE */
.dropzone { border: 1.5px dashed #7CC49B; border-radius: 10px; background: #F3F9F5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #006838; font-size: 13px; font-weight: 600; text-align: center; padding: 24px; cursor: pointer; min-height: 140px; }
.dropzone small { font-size: 11px; color: #6b7280; font-weight: 500; }
.attachment-thumb { border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; background: #fff; }
.attachment-thumb img { width: 100%; height: 140px; object-fit: cover; }

/* SPEC SHEET (Rotativa view) */
.spec-sheet { padding: 20px; }
.spec-sheet .hdr { display: flex; align-items: center; gap: 12px; border-bottom: 3px solid #006838; padding-bottom: 10px; margin-bottom: 12px; }
.spec-sheet .hdr .co b { display: block; font-size: 14px; }
.spec-sheet .hdr .co span { font-size: 11px; color: #6b7280; }
.spec-sheet .hdr .meta { text-align: right; font-size: 11px; line-height: 1.7; }
.spec-sheet table.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.spec-sheet table.tbl th { text-align: left; width: 32%; background: #F3F9F5; padding: 6px 10px; border: 1px solid #e5e7eb; }
.spec-sheet table.tbl td { padding: 6px 10px; border: 1px solid #e5e7eb; }
