:root {
    /* Ziepee Brand Core Palette (Strictly Aligned with Ziepee Logo) */
    --ziepee-blue: #004de7;          /* Signature Electric Royal Blue */
    --ziepee-blue-hover: #003bbd;    /* Deep hover state */
    --ziepee-blue-active: #002f9c;   /* Pressed state */
    --ziepee-blue-light: #eff5ff;    /* Crisp ice tint for surfaces & cards */
    --ziepee-blue-subtle: #f0f5ff;   /* Branded table/card header tint */
    --ziepee-blue-border: #bfdbfe;   /* Light blue border */
    --ziepee-blue-glow: rgba(0, 77, 231, 0.22);
    --ziepee-cyan: #00b4d8;          /* Motion speed trail accent */
    --ziepee-cyan-light: #e0f2fe;

    /* Base Layout Tokens */
    --bg-main: #f5f8fc;              /* Crisp clean canvas */
    --sidebar-bg: #0b132b;           /* Deep Obsidian Navy */
    --sidebar-hover: #162347;        /* Subtle brand navy hover */
    --sidebar-active: #004de7;       /* Authentic Ziepee Blue */
    --primary: #004de7;
    --primary-hover: #003bbd;
    --card-bg: #ffffff;
    --text-primary: #0f172a;         /* High-contrast brand slate/black */
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --font-sans: 'Plus Jakarta Sans', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR - CLEAN SUPPLIER PORTAL THEME (PORT 3002 MATCH) */
.admin-sidebar {
    width: 260px;
    min-width: 260px;
    background: #ffffff;
    border-right: 1px solid #eef2f6;
    color: #334155;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-sidebar::-webkit-scrollbar {
    width: 4px;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 4px;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

.admin-sidebar.collapsed {
    width: 70px;
    min-width: 70px;
}

/* Sidebar Brand Header */
.sidebar-brand-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-bottom: 1px solid #f1f5f9;
    min-height: 75px;
    background: #ffffff;
}

.admin-sidebar.collapsed .sidebar-brand-header {
    padding: 12px 8px;
    justify-content: center;
}

.sidebar-brand-logo {
    height: 65px;
    object-fit: contain;
    max-width: 100%;
    transition: all 0.2s ease;
}

.admin-sidebar.collapsed .sidebar-brand-logo {
    height: 36px;
}

/* Nav Menu Container */
.sidebar-nav-container,
.sidebar-nav {
    padding: 12px 10px 30px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.admin-sidebar.collapsed .sidebar-nav-container,
.admin-sidebar.collapsed .sidebar-nav {
    padding: 12px 6px 30px;
}

/* Section Headings */
.sidebar-section-title {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    padding: 14px 10px 6px;
}

.admin-sidebar.collapsed .sidebar-section-title {
    display: none !important;
}

/* Nav Items */
.sidebar-nav-item,
.nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 7px 10px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: #475569;
    font-family: inherit;
    font-size: 0.70rem !important;
    font-weight: 500 !important;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
    margin: 1px 0;
    text-decoration: none;
}

.sidebar-nav-item:hover,
.nav-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.sidebar-nav-item.active,
.nav-item.active {
    background: #004de7 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 77, 231, 0.28);
    font-weight: 700 !important;
}

.sidebar-nav-item.active .nav-item-left i,
.nav-item.active i {
    color: #ffffff !important;
}

.sidebar-nav-item.active .nav-item-left span,
.nav-item.active span {
    color: #ffffff !important;
    font-weight: 700 !important;
}

.nav-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-item-left i,
.nav-item i {
    width: 16px;
    font-size: 0.88rem;
    text-align: center;
    opacity: 0.9;
    color: inherit;
}

.admin-sidebar.collapsed .sidebar-nav-item,
.admin-sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 10px 0;
}

.admin-sidebar.collapsed .nav-item-left {
    gap: 0;
    justify-content: center;
}

.admin-sidebar.collapsed .nav-item-left i,
.admin-sidebar.collapsed .nav-item i {
    font-size: 1.15rem;
    width: auto;
}

.admin-sidebar.collapsed .nav-item-left span,
.admin-sidebar.collapsed .sidebar-nav-item > span,
.admin-sidebar.collapsed .sidebar-nav-item > div:not(.nav-item-left),
.admin-sidebar.collapsed .sidebar-submenu,
.admin-sidebar.collapsed .nav-badge-pill,
.admin-sidebar.collapsed .sidebar-contact-support-pill,
.admin-sidebar.collapsed .sidebar-user-profile-card .modern-user-info,
.admin-sidebar.collapsed .sidebar-nav-item i.fa-chevron-down,
.admin-sidebar.collapsed .sidebar-nav-item i.fa-chevron-right {
    display: none !important;
}

/* Badges */
.nav-badge-pill {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.2;
}

.nav-badge-pill.new {
    background: #ef4444;
    color: #ffffff;
}

.nav-badge-pill.danger {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.nav-badge-count {
    font-size: 0.72rem;
    background: #004de7;
    color: #ffffff;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 700;
    line-height: 1.2;
}

.sidebar-nav-item.active .nav-badge-count {
    background: #ffffff;
    color: #004de7;
}

/* Submenu */
.sidebar-submenu {
    display: flex;
    flex-direction: column;
    padding-left: 28px;
    gap: 2px;
    margin: 3px 0;
}

.sidebar-subnav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 6px 10px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: #64748b;
    font-family: inherit;
    font-size: 0.70rem !important;
    font-weight: 500 !important;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
}

.sidebar-subnav-item:hover {
    background: #f1f5f9;
    color: #004de7;
}

.sidebar-subnav-item.active {
    background: #eff6ff;
    color: #004de7;
    font-weight: 600 !important;
    border-left: 3px solid #004de7;
}

/* Need Help Contact Support Pill Card */
.sidebar-contact-support-pill {
    margin: 14px 2px 8px;
    padding: 10px 14px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.sidebar-contact-support-pill:hover {
    background: #dbeafe;
    border-color: #bfdbfe;
    transform: translateY(-1px);
}

.sidebar-contact-support-pill .support-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-contact-support-pill .support-left i {
    color: #004de7;
    font-size: 1.05rem;
}

.sidebar-contact-support-pill .support-text-title {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
    line-height: 1.2;
}

.sidebar-contact-support-pill .support-text-action {
    font-size: 0.82rem;
    color: #004de7;
    font-weight: 700;
    line-height: 1.2;
}

/* Sidebar User Profile Card */
.sidebar-user-profile-card,
.sidebar-footer {
    border-top: 1px solid #f1f5f9;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    margin-top: auto;
    border-radius: 10px;
}

.modern-user-avatar,
.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #004de7;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modern-user-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    overflow: hidden;
}

.modern-user-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modern-user-sub {
    font-size: 0.68rem;
    color: #64748b;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modern Header Hamburger Button */
.header-hamburger-btn {
    background: transparent;
    border: none;
    font-size: 1.15rem;
    color: #475569;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.header-hamburger-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* MAIN CONTENT */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-main);
}

.admin-header {
    background: #ffffff;
    border-bottom: 1px solid #eef2f6;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    min-height: 48px;
}

.header-title h1 {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.header-title p {
    font-size: 0.70rem;
    color: var(--text-muted);
    line-height: 1.2;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 5px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.74rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 77, 231, 0.22);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 14px rgba(0, 77, 231, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.74rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.content-body {
    padding: 12px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* KPI CARDS - COMPACT REFINED DENSITY */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.kpi-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02);
}

.kpi-icon {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.kpi-icon.emerald { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.kpi-icon.blue { background: #eff5ff; color: #004de7; border: 1px solid #bfdbfe; }
.kpi-icon.amber { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.kpi-icon.indigo { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }

.kpi-info span {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: block;
    line-height: 1.2;
}

.kpi-info h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 1px;
    font-family: var(--font-mono);
    line-height: 1.2;
}

/* DATA TABLES & CARDS */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.02);
    overflow: hidden;
}

.card-header {
    padding: 10px 16px !important;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}

.card-header h3 {
    font-size: 0.88rem !important;
    font-weight: 700;
}

.card-header p {
    font-size: 0.68rem !important;
    margin-top: 2px !important;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.74rem !important;
    white-space: nowrap;
}

thead th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.67rem !important;
    letter-spacing: 0.04em;
    padding: 7px 12px !important;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

tbody td {
    padding: 7px 12px !important;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
    font-size: 0.74rem !important;
}

tbody tr:hover {
    background: #f8fafc;
}

/* STATUS BADGES */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 7px !important;
    border-radius: 12px;
    font-size: 0.68rem !important;
    font-weight: 700;
    text-transform: capitalize;
}

.status-pill.approved, .status-pill.delivered, .status-pill.paid {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.status-pill.pending, .status-pill.processing {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.status-pill.rejected, .status-pill.cancelled {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.status-pill.suspended {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 540px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
    overflow: hidden;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 0.88rem;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 77, 231, 0.15);
}

/* ── ADDITIONAL SUPPLIER DIRECTORY & STATUS BADGES ── */
.status-pill.in_progress {
    background: #eff5ff;
    color: #004de7;
    border: 1px solid #bfdbfe;
    font-weight: 700;
}

.status-dot-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}
.status-dot-pulse.in_progress { 
    background: #004de7; 
    box-shadow: 0 0 0 2px rgba(0, 77, 231, 0.3); 
    animation: pulseDot 1.5s infinite; 
}
.status-dot-pulse.pending { background: #f59e0b; box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3); animation: pulseDot 1.5s infinite; }
.status-dot-pulse.approved { background: #10b981; }
.status-dot-pulse.rejected { background: #ef4444; }
.status-dot-pulse.suspended { background: #94a3b8; }

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.25); }
}

/* FILTER TABS & SEARCH BAR - COMPACT SUPPLIER PORTAL DENSITY */
.directory-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 16px !important;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
}

.status-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px !important;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    font-size: 0.70rem !important;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.filter-btn.active {
    background: #004de7;
    color: #fff;
    border-color: #004de7;
    box-shadow: 0 2px 8px rgba(0, 77, 231, 0.22);
}

.filter-badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 6px !important;
    border-radius: 9999px;
    font-size: 0.64rem !important;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.08);
}
.filter-btn.active .filter-badge-count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.search-box-wrap {
    position: relative;
    min-width: 220px;
    flex: 1;
    max-width: 320px;
}

.search-box-wrap i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.76rem;
}

.search-box-wrap input {
    width: 100%;
    padding: 5px 10px 5px 28px !important;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 0.74rem !important;
    background: #f8fafc;
    transition: all 0.2s;
}

.search-box-wrap input:focus {
    background: #fff;
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 77, 231, 0.12);
}

.view-mode-btn {
    padding: 4px 9px !important;
    font-size: 0.70rem !important;
    border-radius: 6px !important;
}

/* STEP PROGRESS BAR */
.step-progress-wrapper {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 95px;
}

.step-progress-track {
    height: 6px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.step-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #004de7);
    border-radius: 9999px;
    transition: width 0.3s ease;
}

.step-progress-text {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    display: flex;
    justify-content: space-between;
}

/* DOSSIER MODAL */
.modal-content.dossier-modal {
    max-width: 860px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.dossier-modal-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.dossier-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    gap: 16px;
    flex-wrap: wrap;
}

.dossier-store-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dossier-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #004de7, #1d4ed8);
    color: #fff;
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 77, 231, 0.25);
}

.dossier-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.dossier-section-header {
    background: #f8fafc;
    padding: 12px 18px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dossier-grid {
    padding: 16px 18px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px 20px;
}

.dossier-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dossier-item .item-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dossier-item .item-val {
    font-size: 0.86rem;
    font-weight: 600;
    color: #0f172a;
    word-break: break-word;
}

.badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}
.badge-tag.green { background: #dcfce7; color: #15803d; }
.badge-tag.blue { background: #dbeafe; color: #1e40af; }
.badge-tag.purple { background: #f3e8ff; color: #7e22ce; }

.dossier-doc-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}
.dossier-doc-card i {
    font-size: 1.4rem;
    color: #ef4444;
}

.live-sync-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* =========================================================================
   FULL-PAGE SUPPLIER PARTNER DOSSIER VIEW (URL-DRIVEN, NO POPUP)
   ========================================================================= */

.dossier-page-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.2s ease-out forwards;
    width: 100%;
}

.dossier-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 20px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.dossier-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none;
}

.dossier-back-btn:hover {
    background: #e2e8f0;
    color: #004de7;
    border-color: #004de7;
}

.dossier-breadcrumb-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: #64748b;
}

.dossier-breadcrumb-tag strong {
    color: #0f172a;
}

.dossier-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Executive Hero Card */
.dossier-hero-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px 28px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.dossier-hero-identity {
    display: flex;
    align-items: center;
    gap: 18px;
}

.dossier-hero-avatar {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #004de7 0%, #1e40af 100%);
    color: #ffffff;
    font-size: 1.7rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 77, 231, 0.28);
    flex-shrink: 0;
}

.dossier-hero-meta h2 {
    font-size: 1.45rem;
    font-weight: 900;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.dossier-hero-sub {
    font-size: 0.88rem;
    color: #475569;
    margin: 0 0 8px 0;
}

.dossier-hero-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dossier-hero-metrics {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.dossier-metric-tile {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 18px;
    min-width: 130px;
    text-align: right;
}

.dossier-metric-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.dossier-metric-value {
    font-size: 1.35rem;
    font-weight: 900;
    color: #004de7;
}

/* Horizontal Onboarding Stepper */
.dossier-stepper-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 24px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.02);
}

.dossier-stepper-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.dossier-stepper-track {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    position: relative;
}

.dossier-step-pill {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.dossier-step-pill:hover {
    border-color: #93c5fd;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 77, 231, 0.08);
    transform: translateY(-1px);
}

.dossier-step-pill.completed {
    background: #f0fdf4;
    border-color: #86efac;
    color: #15803d;
}

.dossier-step-pill.current {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #004de7;
    box-shadow: 0 0 0 2px rgba(0, 77, 231, 0.15);
}

.dossier-step-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #cbd5e1;
    color: #ffffff;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dossier-step-pill.completed .dossier-step-num {
    background: #16a34a;
}

.dossier-step-pill.current .dossier-step-num {
    background: #004de7;
}

/* Two-Column Deep Audit Layout */
.dossier-columns-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 22px;
    align-items: start;
}

.dossier-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
    margin-bottom: 22px;
}

.dossier-card-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
}

.dossier-card-body {
    padding: 20px;
}

.dossier-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px 20px;
}

.dossier-prop-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dossier-prop-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dossier-prop-value {
    font-size: 0.88rem;
    font-weight: 600;
    color: #0f172a;
    word-break: break-word;
}

.dossier-doc-card-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 12px;
    transition: all 0.18s ease;
}

.dossier-doc-card-v2:hover {
    background: #ffffff;
    border-color: #004de7;
    box-shadow: 0 4px 12px rgba(0, 77, 231, 0.08);
}

.dossier-doc-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dossier-doc-icon {
    font-size: 1.6rem;
    color: #ef4444;
}

.dossier-doc-btn {
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #004de7;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dossier-doc-btn:hover {
    background: #eff6ff;
    border-color: #004de7;
}

@media (max-width: 1050px) {
    .dossier-columns-grid {
        grid-template-columns: 1fr;
    }
    .dossier-stepper-track {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ── HIGH VISIBILITY LIST & TABLE STYLES (ZIEPEE BRAND THEMED - COMPACT) ── */
.table-responsive {
    overflow-x: auto;
    border-radius: 0 0 8px 8px;
}

table.high-vis-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.74rem !important;
}

table.high-vis-table thead th {
    background: #f0f5ff;
    color: #0b1a3d;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.67rem !important;
    letter-spacing: 0.04em;
    padding: 8px 12px !important;
    border-bottom: 2px solid #bfdbfe;
    border-top: 1px solid #e0edff;
    white-space: nowrap;
}

table.high-vis-table thead th i {
    color: #004de7;
    margin-right: 5px;
}

table.high-vis-table tbody td {
    padding: 7px 12px !important;
    border-bottom: 1px solid #edf2f7;
    color: #1e293b;
    vertical-align: middle;
    background: #ffffff;
    font-size: 0.74rem !important;
    transition: background 0.15s ease;
}

table.high-vis-table tbody tr:nth-child(even) td {
    background: #fafcff;
}

table.high-vis-table tbody tr:hover td {
    background: #edf5ff !important;
}

table.high-vis-table .supplier-card-avatar {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.76rem !important;
    border-radius: 6px !important;
}

/* Step Progress in List View */
.step-progress-wrapper {
    min-width: 95px;
}
.step-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 2px;
}
.step-progress-track {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}
.step-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #004de7 0%, #0284c7 65%, #00b4d8 100%);
    border-radius: 9999px;
    transition: width 0.3s ease;
    box-shadow: 0 1px 4px rgba(0, 77, 231, 0.25);
}

/* VIEW TOGGLE PILLS */
.view-mode-toggle {
    display: inline-flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    gap: 3px;
}

.view-mode-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}

.view-mode-btn.active {
    background: #ffffff;
    color: #004de7;
    box-shadow: 0 2px 6px rgba(0, 77, 231, 0.15);
    border: 1px solid #bfdbfe;
}

/* ── SUPPLIER CARD GRID VIEW ── */
.supplier-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    padding: 24px;
    background: #f5f8fc;
}

.supplier-card-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.2s ease;
}

.supplier-card-box:hover {
    border-color: #004de7;
    box-shadow: 0 8px 24px rgba(0, 77, 231, 0.15);
    transform: translateY(-2px);
}

.supplier-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.supplier-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #eff6ff;
    color: #004de7;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #bfdbfe;
    flex-shrink: 0;
}

.supplier-chips-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: #f8fafc;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #edf2f7;
    font-size: 0.78rem;
}

.supplier-chip-item span {
    display: block;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.supplier-chip-item strong {
    color: #0f172a;
    font-weight: 700;
}

/* ── EMPTY STATE LIVE HERO BANNER ── */
.empty-live-banner {
    padding: 48px 32px;
    text-align: center;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border-radius: 0 0 14px 14px;
}

.empty-live-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: #eff6ff;
    color: #004de7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 16px;
    border: 1px solid #bfdbfe;
    box-shadow: 0 8px 20px rgba(0, 77, 231, 0.12);
}

.empty-live-banner h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}

.empty-live-banner p {
    font-size: 0.88rem;
    color: #64748b;
    max-width: 580px;
    margin: 0 auto 24px auto;
    line-height: 1.5;
}

.live-steps-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 720px;
    margin: 0 auto 28px auto;
    flex-wrap: wrap;
}

.live-step-pill {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.live-step-pill i {
    color: #004de7;
}

.live-step-arrow {
    color: #94a3b8;
    font-size: 0.75rem;
}

/* ══════════════════════════════════════════════════════════════
   PRODUCT CATEGORIES & SUB-TABS (ADMIN PANEL)
   ══════════════════════════════════════════════════════════════ */
.product-subtab-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.product-subtab-group {
    display: inline-flex;
    align-items: center;
    background: #e2e8f0;
    padding: 4px;
    border-radius: 12px;
    gap: 4px;
}

.product-subtab-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 9px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.18s ease;
}

.product-subtab-btn:hover {
    color: #0f172a;
}

.product-subtab-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 77, 231, 0.16);
}

.subtab-count-pill {
    background: #e0f2fe;
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
}

.product-subtab-btn.active .subtab-count-pill {
    background: var(--primary);
    color: #ffffff;
}

/* Category Feedback Banner */
.category-feedback-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 0.88rem;
    font-weight: 600;
    animation: fadeIn 0.2s ease-out;
}

.category-feedback-banner.success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.category-feedback-banner.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.btn-close-feedback {
    margin-left: auto;
    background: transparent;
    border: none;
    cursor: pointer;
    color: inherit;
    font-size: 0.95rem;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Category List Row Elements */
.cat-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--ziepee-blue-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    border: 1px solid var(--ziepee-blue-border);
}

.cat-parent-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 0.8rem;
    font-weight: 600;
}

.cat-root-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
}

.cat-code-badge {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* Action Buttons */
.btn-cat-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.btn-cat-edit {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.btn-cat-edit:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.btn-cat-delete {
    background: #fff5f5;
    border-color: #fecaca;
    color: #dc2626;
}

.btn-cat-delete:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
}

/* Modal Error Callout */
.category-modal-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.84rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

/* Delete Modal Callouts */
.delete-warning-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fee2e2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.delete-cat-summary-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 14px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.delete-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.84rem;
}

.summary-label {
    color: #64748b;
    font-weight: 600;
}

.summary-val {
    color: #0f172a;
}

.delete-children-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.45;
}

.btn-danger-confirm {
    background: #dc2626;
    border: 1px solid #b91c1c;
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.btn-danger-confirm:hover:not(:disabled) {
    background: #b91c1c;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.btn-danger-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Category View Action Button */
.btn-cat-view {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #004de7;
}

.btn-cat-view:hover {
    background: #004de7;
    border-color: #004de7;
    color: #ffffff;
}

.cat-children-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.74rem;
    font-weight: 700;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

.cat-children-pill.empty {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #94a3b8;
}

/* ══════════════════════════════════════════════════════════════
   PROPER CATEGORY FORM VIEW (IN-PAGE, NOT A POPUP)
   ══════════════════════════════════════════════════════════════ */
.category-form-view-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 77, 231, 0.04);
    overflow: hidden;
    animation: fadeIn 0.2s ease-out;
    margin-bottom: 24px;
}

.category-form-topbar {
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.category-form-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.category-form-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    color: #64748b;
    font-weight: 600;
}

.category-breadcrumb span.active {
    color: #0f172a;
    font-weight: 800;
}

.category-form-body {
    padding: 28px;
}

.category-header-banner {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.category-header-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--ziepee-blue-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    border: 1px solid var(--ziepee-blue-border);
}

.category-form-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.category-form-actions-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
    margin-bottom: 36px;
}

/* ── BOTTOM CHILD CATEGORIES REPRESENTATION ── */
.category-children-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    margin-top: 10px;
}

.category-children-header {
    padding: 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.category-children-header h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-children-count-badge {
    background: #eff6ff;
    color: #004de7;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid #bfdbfe;
}

.category-children-empty {
    padding: 36px 20px;
    text-align: center;
    color: #64748b;
}

.category-children-table {
    width: 100%;
    border-collapse: collapse;
}

.category-children-table th {
    background: #f1f5f9;
    padding: 10px 16px;
    font-size: 0.76rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.category-children-table td {
    padding: 12px 16px;
    font-size: 0.85rem;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

.category-children-table tr:hover td {
    background: #f8fafc;
}

.cat-tree-branch {
    color: #94a3b8;
    margin-right: 6px;
    font-size: 0.82rem;
}

/* ==========================================================================
   ENTERPRISE RATE & FEE MANAGEMENT (SECTION BASED)
   Modern layout with section cards, header badges, action toolbars, and inputs
   ========================================================================== */
.fee-management-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.fee-top-bar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.fee-top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fee-top-bar-left .title-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #eff6ff;
    color: #004de7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.fee-top-bar-left h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
}

.fee-top-bar-left p {
    margin: 2px 0 0;
    font-size: 0.80rem;
    color: #64748b;
}

.fee-section-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.fee-section-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.fee-section-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fee-section-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fee-section-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.fee-section-icon.blue { background: #eff6ff; color: #004de7; }
.fee-section-icon.amber { background: #fef3c7; color: #d97706; }
.fee-section-icon.emerald { background: #ecfdf5; color: #059669; }
.fee-section-icon.purple { background: #f3e8ff; color: #7e22ce; }

.fee-section-header-left h3 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 800;
    color: #0f172a;
}

.fee-section-header-left span {
    font-size: 0.76rem;
    color: #64748b;
}

.fee-section-body {
    padding: 22px;
}

.fee-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.fee-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .fee-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .fee-grid-3,
    .fee-grid-2 {
        grid-template-columns: 1fr;
    }
    .fee-top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
}

.fee-field-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #ffffff;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.18s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.fee-field-box:hover {
    border-color: #cbd5e1;
}

.fee-field-box:focus-within {
    background: #ffffff;
    border-color: #004de7;
    box-shadow: 0 0 0 3px rgba(0, 77, 231, 0.12);
}

.fee-field-box label {
    font-size: 0.84rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
}

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

.fee-input-wrap .prefix-symbol {
    position: absolute;
    left: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #475569;
    pointer-events: none;
    z-index: 2;
}

.fee-input-wrap .suffix-symbol {
    position: absolute;
    right: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    pointer-events: none;
    z-index: 2;
}

.fee-input-wrap input {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.15s ease;
}

.fee-input-wrap.has-prefix input {
    padding-left: 32px;
}

.fee-input-wrap.has-suffix input {
    padding-right: 56px;
}

.fee-input-wrap input:focus {
    border-color: #004de7;
    box-shadow: 0 0 0 3px rgba(0, 77, 231, 0.14);
}

.fee-input-wrap select {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #0f172a;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fee-input-wrap select:focus {
    border-color: #004de7;
    box-shadow: 0 0 0 3px rgba(0, 77, 231, 0.14);
}

.fee-field-help {
    font-size: 0.74rem;
    color: #64748b;
    line-height: 1.4;
    margin-top: 2px;
}

.fee-sync-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #059669;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 4px 10px;
    border-radius: 20px;
}





/* ==========================================================================
   STANDARD ENTERPRISE PORTAL FORM SYSTEM (REUSABLE CLASS-BASED)
   Matches the second screen design (Warehouse & Master Catalog Form View)
   ========================================================================== */
.portal-section-divider {
    border-top: 1px solid #f1f5f9;
    margin: 24px 0 20px 0;
    padding-top: 20px;
}

.portal-section-title-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.portal-section-title-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.portal-section-title-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.portal-section-title-icon.blue { background: #eff6ff; color: #004de7; }
.portal-section-title-icon.amber { background: #fef3c7; color: #d97706; }
.portal-section-title-icon.emerald { background: #ecfdf5; color: #059669; }
.portal-section-title-icon.purple { background: #f3e8ff; color: #7e22ce; }

.portal-section-title-left h3 {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 800;
    color: #0f172a;
}

.portal-section-title-left p {
    margin: 2px 0 0;
    font-size: 0.76rem;
    color: #64748b;
}

.portal-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    width: 100%;
}

.portal-form-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
    margin: 0;
    line-height: 1.25;
}

.portal-form-label .label-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.portal-form-label .label-title i {
    color: #004de7;
    font-size: 0.82rem;
}

.portal-form-label .label-required {
    color: #e11d48;
    margin-left: 2px;
    font-weight: 700;
}

.portal-form-input,
.portal-form-select {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 13px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #0f172a;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.portal-form-input::placeholder,
.portal-form-textarea::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.portal-form-input:focus,
.portal-form-select:focus,
.portal-form-textarea:focus {
    border-color: #004de7;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 77, 231, 0.14);
}

.portal-form-input:disabled,
.portal-form-input[readonly],
.portal-form-select:disabled {
    background: #f8fafc;
    color: #64748b;
    border-color: #e2e8f0;
    cursor: default;
}

.portal-form-input.has-icon {
    padding-left: 36px;
}

.portal-form-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #004de7;
    font-size: 0.84rem;
    pointer-events: none;
    z-index: 2;
}

.portal-form-textarea {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 13px;
    font-size: 0.84rem;
    font-weight: 500;
    color: #0f172a;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    resize: vertical;
    min-height: 80px;
}

.portal-form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.portal-form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.portal-form-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 1024px) {
    .portal-form-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .portal-form-grid-2,
    .portal-form-grid-3,
    .portal-form-grid-4 {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

/* =========================================================================
   BOTTOM CHATTER & ACTIVITY STREAM (FULL WIDTH BELOW FORM)
   ========================================================================= */

.product-bottom-chatter-wrap {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 22px 26px;
    margin-top: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-chatter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.product-chatter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-chatter-action {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.btn-chatter-action:hover {
    background: #eff6ff;
    border-color: #004de7;
    color: #004de7;
}

.btn-chatter-action.active {
    background: #004de7;
    border-color: #004de7;
    color: #ffffff;
}

.chatter-follower-badge {
    font-size: 0.76rem;
    font-weight: 700;
    color: #475569;
    background: #f1f5f9;
    padding: 5px 12px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Chatter Composer */
.product-chatter-composer {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chatter-textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    font-family: inherit;
    resize: vertical;
    min-height: 68px;
    outline: none;
    box-sizing: border-box;
    background: #ffffff;
    transition: all 0.15s ease;
}

.chatter-textarea:focus {
    border-color: #004de7;
    box-shadow: 0 0 0 3px rgba(0, 77, 231, 0.12);
}

.chatter-composer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-chatter-send-main {
    background: #004de7;
    color: #ffffff;
    border: none;
    border-radius: 7px;
    padding: 8px 18px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.btn-chatter-send-main:hover {
    background: #003bbb;
}

/* Chatter Stream */
.product-chatter-stream {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 4px;
}

.chatter-message-card {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    font-size: 0.84rem;
}

.chatter-message-card.note {
    background: #fffbeb;
    border-color: #fde68a;
}

.chatter-message-card.system {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.chatter-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #004de7;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.80rem;
    flex-shrink: 0;
}

.chatter-avatar.note-avatar {
    background: #d97706;
}

.chatter-avatar.system-avatar {
    background: #64748b;
}

.chatter-msg-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chatter-msg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatter-msg-author {
    font-weight: 800;
    color: #0f172a;
    font-size: 0.85rem;
}

.chatter-msg-time {
    font-size: 0.72rem;
    color: #94a3b8;
}

.chatter-msg-text {
    color: #334155;
    line-height: 1.45;
    word-break: break-word;
    font-size: 0.84rem;
}

/* ══════════════════════════════════════════════════════════════
   SUBCATEGORIES TREE CHART & SUB-TO-SUB EXPLORER MODAL
   ══════════════════════════════════════════════════════════════ */
.tree-chart-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 24px;
    animation: fadeIn 0.15s ease-out;
}

.tree-chart-modal {
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 1200px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    border: 1px solid #cbd5e1;
}

.tree-chart-header {
    padding: 12px 20px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.tree-chart-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tree-chart-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tree-mode-toggle {
    display: inline-flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    gap: 2px;
}

.tree-mode-btn {
    border: none;
    background: transparent;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.tree-mode-btn:hover {
    color: #0f172a;
}

.tree-mode-btn.active {
    background: #004de7;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 77, 231, 0.25);
}

.tree-chart-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    padding: 24px;
    background: #f8fafc;
}

/* Tree Flowchart Visual Styles */
.tree-flow-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 860px;
}

.tree-node-card {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.tree-node-card:hover {
    border-color: #004de7;
    box-shadow: 0 4px 14px rgba(0, 77, 231, 0.15);
    transform: translateY(-1px);
}

.tree-node-card.root-card {
    border-color: #004de7;
    background: #eff6ff;
    padding: 12px 20px;
    min-width: 320px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 77, 231, 0.15);
}

.tree-trunk-line {
    width: 2px;
    height: 24px;
    background: #94a3b8;
}

.tree-level-2-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    position: relative;
    padding-top: 18px;
    width: 100%;
}

.tree-level-2-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 80px;
    right: 80px;
    height: 2px;
    background: #94a3b8;
}

.tree-branch-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    min-width: 190px;
    max-width: 300px;
}

.tree-branch-col::before {
    content: '';
    position: absolute;
    top: -18px;
    width: 2px;
    height: 18px;
    background: #94a3b8;
}

.tree-level-2-card {
    width: 100%;
    padding: 9px 12px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
}

.tree-level-3-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    padding-top: 12px;
    position: relative;
}

.tree-level-3-list::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 12px;
    background: #94a3b8;
    transform: translateX(-50%);
}

.tree-level-3-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 7px 10px;
}

.tree-leaf-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px dashed #e2e8f0;
}

.tree-leaf-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 2px 5px;
    font-size: 0.65rem;
    font-weight: 600;
    color: #334155;
}

/* Multi-Column Drilldown Styles */
.drilldown-explorer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1.2fr;
    gap: 12px;
    min-height: 480px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.drilldown-col {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e2e8f0;
    height: 480px;
    background: #ffffff;
}

.drilldown-col:last-child {
    border-right: none;
    background: #f8fafc;
}

.drilldown-col-head {
    padding: 8px 12px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.70rem;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drilldown-col-items {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.drilldown-col-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 7px 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: #1e293b;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
}

.drilldown-col-item:hover {
    background: #f1f5f9;
    color: #004de7;
}

.drilldown-col-item.active {
    background: #004de7;
    color: #ffffff;
    font-weight: 700;
}

.drilldown-col-item.active .cat-code-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-color: transparent;
}

/* Overview Dashboard Redesign Enhancements */
.overview-table-row {
    transition: background-color 0.15s ease;
}
.overview-table-row:hover {
    background-color: #f8fafc !important;
}

