:root {
    --as-primary: #A4D9FC;
    --as-primary-hover: #8acbf7;
    --as-primary-subtle: #edf7fe;
    --as-primary-border: #bde4fd;
    --as-black: #0f172a;
    --as-dark: #1e293b;
    --as-muted: #64748b;
    --as-border: #e2e8f0;
    --as-bg: #f8fafc;
    --as-card-bg: #ffffff;
    --as-success: #10b981;
    --as-warning: #f59e0b;
    --as-danger: #ef4444;
    --as-info: #0ea5e9;
    --as-radius: 12px;
    --as-radius-lg: 16px;
    --as-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --as-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.06);
    --as-shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.08);
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--as-black);
    background-color: var(--as-bg);
    overflow-x: hidden;
}

/* =========================================
   TYPOGRAPHY & UTILITIES
   ========================================= */
h1, h2, h3, h4, h5, h6 {
    color: var(--as-black);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Unified Module Headings Across All Portals & Dashboards */
.as-module-heading,
.as-page-body > .d-flex:first-child h3,
.as-page-body > .d-flex:first-child h4,
.as-page-body > .mb-4:first-child h3,
.as-page-body > .mb-4:first-child h4,
.as-page-body .as-module-heading {
    font-size: 1.25rem !important;
    letter-spacing: -0.01em !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
}

.text-primary-as {
    color: #1e70a6 !important;
}

.bg-primary-as {
    background-color: var(--as-primary) !important;
    color: #0f172a !important;
}

.bg-primary-subtle-as {
    background-color: var(--as-primary-subtle) !important;
}

/* =========================================
   BOOTSTRAP PRIMARY OVERRIDES (KLUSTERR BRAND #A4D9FC)
   ========================================= */
.btn-primary {
    background-color: var(--as-primary) !important;
    border-color: var(--as-primary-border) !important;
    color: #08101a !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 6px rgba(164, 217, 252, 0.4);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--as-primary-hover) !important;
    border-color: #6bbef3 !important;
    color: #000000 !important;
    box-shadow: 0 4px 12px rgba(164, 217, 252, 0.6);
}

.bg-primary {
    background-color: var(--as-primary) !important;
    color: #08101a !important;
}

.badge.bg-primary {
    background-color: var(--as-primary) !important;
    color: #08101a !important;
    font-weight: 600 !important;
    border: 1px solid var(--as-primary-border);
}

.badge.bg-primary-subtle {
    background-color: var(--as-primary-subtle) !important;
    color: #0e6b9c !important;
    border: 1px solid var(--as-primary-border) !important;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn-as-primary {
    background-color: var(--as-primary);
    color: #091e3a;
    font-weight: 600;
    border: 1px solid var(--as-primary-border);
    border-radius: 8px;
    padding: 0.65rem 1.4rem;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 6px rgba(164, 217, 252, 0.4);
}
.btn-as-primary:hover, .btn-as-primary:focus {
    background-color: var(--as-primary-hover);
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(164, 217, 252, 0.6);
}

.btn-as-secondary {
    background-color: #ffffff;
    color: #0f172a;
    font-weight: 600;
    border: 1.5px solid var(--as-border);
    border-radius: 8px;
    padding: 0.65rem 1.4rem;
    transition: all 0.2s ease-in-out;
}
.btn-as-secondary:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #000;
}

.btn-as-dark {
    background-color: #0f172a;
    color: #ffffff;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.65rem 1.4rem;
    transition: all 0.2s ease-in-out;
}
.btn-as-dark:hover {
    background-color: #1e293b;
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-as-outline {
    background: transparent;
    color: #0f172a;
    border: 1.5px solid var(--as-primary);
    border-radius: 8px;
    font-weight: 600;
    padding: 0.65rem 1.4rem;
    transition: all 0.2s;
}
.btn-as-outline:hover {
    background: var(--as-primary);
    color: #091e3a;
}

/* =========================================
   CARDS & PANELS
   ========================================= */
.as-card {
    background: var(--as-card-bg);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    box-shadow: var(--as-shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.as-card:hover {
    box-shadow: var(--as-shadow-lg);
}

.as-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--as-border);
}

.as-kpi-card {
    background: #ffffff;
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--as-shadow-sm);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.as-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--as-shadow);
    border-color: var(--as-primary);
}
.as-kpi-card .kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--as-primary-subtle);
    color: #0e6b9c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}
.as-kpi-card .kpi-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    margin: 0.35rem 0 0.15rem 0;
}
.as-kpi-card .kpi-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--as-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* =========================================
   STATUS BADGES
   ========================================= */
.as-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    white-space: nowrap;
}
.as-badge-new {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}
.as-badge-review {
    background-color: #e0e7ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}
.as-badge-verified, .as-badge-approved, .as-badge-feasible {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.as-badge-rfq {
    background-color: #f1f5f9;
    color: #1e293b;
    border: 1px solid #cbd5e1;
}
.as-badge-quoted {
    background-color: var(--as-primary-subtle);
    color: #09476b;
    border: 1px solid var(--as-primary-border);
}
.as-badge-analysis {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}
.as-badge-production {
    background-color: #ffedd5;
    color: #9a3412;
    border: 1px solid #fed7aa;
}
.as-badge-dispatched {
    background-color: #cffafe;
    color: #155e75;
    border: 1px solid #a5f3fc;
}
.as-badge-delivered, .as-badge-completed {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.as-badge-rejected {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* =========================================
   TABLES
   ========================================= */
.as-table-wrapper {
    background: #fff;
    border-radius: var(--as-radius);
    border: 1px solid var(--as-border);
    overflow: hidden;
}
.as-table {
    width: 100%;
    margin-bottom: 0;
    vertical-align: middle;
}
.as-table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.85rem 1rem;
    border-bottom: 1.5px solid var(--as-border);
}
.as-table tbody td {
    padding: 0.9rem 1rem;
    color: #1e293b;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
}
.as-table tbody tr:hover td {
    background-color: #f8fafc;
}

/* =========================================
   STEPPER & TIMELINE
   ========================================= */
.as-stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 1.5rem 0;
}
.as-stepper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: var(--as-border);
    z-index: 1;
}
.as-step-item {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}
.as-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--as-border);
    color: var(--as-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    margin: 0 auto 0.5rem auto;
    transition: all 0.2s;
}
.as-step-item.active .as-step-circle {
    background: var(--as-primary);
    border-color: #0f172a;
    color: #0f172a;
    box-shadow: 0 0 0 4px rgba(164, 217, 252, 0.4);
}
.as-step-item.completed .as-step-circle {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}
.as-step-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--as-muted);
}
.as-step-item.active .as-step-title,
.as-step-item.completed .as-step-title {
    color: #0f172a;
    font-weight: 700;
}

/* Pipeline Flow */
.as-pipeline-bar {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--as-border);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    overflow-x: auto;
    gap: 0.5rem;
}
.pipeline-node {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--as-border);
    white-space: nowrap;
}
.pipeline-node.active {
    background: var(--as-primary-subtle);
    border-color: var(--as-primary);
}
.pipeline-node .node-count {
    background: #0f172a;
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
}
.pipeline-arrow {
    color: #94a3b8;
    font-size: 0.85rem;
}

/* =========================================
   PORTAL LAYOUT (SIDEBAR & HEADER)
   ========================================= */
.as-portal-wrapper {
    display: flex;
    min-height: 100vh;
}
.as-sidebar {
    width: 260px;
    background: #0f172a;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    border-right: 1px solid #1e293b;
}
.as-sidebar-brand {
    padding: 1.4rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid #1e293b;
    text-decoration: none;
}
.as-sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.75rem;
}
.as-menu-heading {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #64748b;
    padding: 0.75rem 0.75rem 0.35rem 0.75rem;
}
.as-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
    transition: all 0.2s;
}
.as-nav-link:hover {
    background: #1e293b;
    color: #ffffff;
}
.as-nav-link.active {
    background: var(--as-primary);
    color: #091e3a;
    font-weight: 700;
}
.as-nav-link.active i {
    color: #091e3a;
}
.as-nav-link i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    color: #94a3b8;
}

.as-sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #1e293b;
    background: #090e1a;
}

.as-main-content {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.as-topbar {
    height: 68px;
    background: #ffffff;
    border-bottom: 1px solid var(--as-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    position: sticky;
    top: 0;
    z-index: 990;
}
.as-topbar-search {
    position: relative;
    width: 320px;
}
.as-topbar-search input {
    border-radius: 20px;
    padding-left: 2.2rem;
    font-size: 0.88rem;
    background: #f8fafc;
    border: 1px solid var(--as-border);
}
.as-topbar-search i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

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

/* Fast Role Switcher Bar */
.as-role-switcher-banner {
    background: #0f172a;
    color: #f8fafc;
    padding: 0.5rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    border-bottom: 2px solid var(--as-primary);
}
.as-role-switcher-banner a {
    color: var(--as-primary);
    text-decoration: none;
    font-weight: 600;
    margin: 0 0.35rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}
.as-role-switcher-banner a:hover, .as-role-switcher-banner a.current {
    background: var(--as-primary);
    color: #0f172a;
}

/* =========================================
   PUBLIC WEBSITE STYLING
   ========================================= */
.as-public-topbar {
    background: #0a101d;
    color: #94a3b8;
    font-size: 0.82rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.as-public-topbar a {
    color: #cbd5e1;
    text-decoration: none;
}
.as-public-topbar a:hover {
    color: var(--as-primary);
}

.as-navbar {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    padding: 0.9rem 0;
    position: sticky;
    top: 0;
    z-index: 1020;
}
.as-nav-item .nav-link {
    font-size: 0.92rem;
    font-weight: 600;
    color: #1e293b;
    padding: 0.5rem 0.9rem !important;
    transition: color 0.2s;
}
.as-nav-item .nav-link:hover, .as-nav-item .nav-link.active {
    color: #0e6b9c;
}

.as-hero-section {
    background: linear-gradient(135deg, #ffffff 0%, #f0f8fe 50%, #e2f2fc 100%);
    padding: 5rem 0 4rem 0;
    position: relative;
    overflow: hidden;
}
.as-hero-headline {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.15;
    color: #0f172a;
    margin-bottom: 1.25rem;
}
.as-hero-headline span {
    color: #0e7490;
    background: linear-gradient(120deg, #0284c7, #0369a1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.as-hero-subtext {
    font-size: 1.12rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.as-stats-banner {
    background: #ffffff;
    border-radius: var(--as-radius-lg);
    box-shadow: var(--as-shadow-lg);
    padding: 1.75rem 2rem;
    margin-top: -2.5rem;
    position: relative;
    z-index: 10;
    border: 1px solid var(--as-border);
}
.as-stat-box {
    text-align: center;
    border-right: 1px solid var(--as-border);
}
.as-stat-box:last-child {
    border-right: none;
}
.as-stat-num {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0f172a;
}
.as-stat-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--as-muted);
}

.as-service-card {
    background: #ffffff;
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    height: 100%;
}
.as-service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--as-shadow-lg);
    border-color: var(--as-primary);
}
.as-service-icon {
    width: 64px;
    height: 64px;
    background: var(--as-primary-subtle);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0284c7;
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

.as-category-card {
    background: #ffffff;
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s;
    text-decoration: none;
    color: #0f172a;
    display: block;
}
.as-category-card:hover {
    transform: translateY(-3px);
    border-color: var(--as-primary);
    box-shadow: var(--as-shadow);
    color: #0284c7;
}
.as-category-img {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: #0284c7;
}

.as-cta-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border-radius: var(--as-radius-lg);
    padding: 3.5rem 3rem;
    position: relative;
    overflow: hidden;
}
.as-cta-banner::after {
    content: '';
    position: absolute;
    right: -100px;
    bottom: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(164, 217, 252, 0.15) 0%, rgba(0,0,0,0) 70%);
    pointer-events: none;
}

.as-footer {
    background: #090d16;
    color: #94a3b8;
    padding: 4.5rem 0 2rem 0;
    border-top: 1px solid #1e293b;
}
.as-footer h5 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 1.25rem;
}
.as-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.as-footer ul li {
    margin-bottom: 0.6rem;
}
.as-footer ul li a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s;
}
.as-footer ul li a:hover {
    color: var(--as-primary);
}

/* File Upload Drag and Drop */
.as-file-dropzone {
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.as-file-dropzone:hover, .as-file-dropzone.dragover {
    border-color: #0284c7;
    background: var(--as-primary-subtle);
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .as-sidebar {
        margin-left: -260px;
    }
    .as-sidebar.show {
        margin-left: 0;
    }
    .as-main-content {
        margin-left: 0;
    }
    .as-hero-headline {
        font-size: 2.3rem;
    }
    .as-stat-box {
        border-right: none;
        border-bottom: 1px solid var(--as-border);
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
}

/* =========================================
   TABLE DROPDOWNS & ACTION OVERFLOW FIXES
   ========================================= */
.card > .table-responsive {
    min-height: 280px;
}

@media (min-width: 992px) {
    .card > .table-responsive {
        overflow: visible;
    }
}

.table-action-btn {
    width: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
    padding: 0 !important;
    transition: all 0.15s ease-in-out;
}

.table-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.table-action-btn::after,
.dropdown-toggle-nocaret::after {
    display: none !important;
}

