:root {
    /* App theme */
    --primary-color:   #0d233a;
    --secondary-color: #2b4c7e;
    --accent-color:    #56c2e6;
    --bg-color:        #f4f7f6;
    --text-main:       #333333;
    --text-light:      #ffffff;

    /* Bootstrap primary override */
    --bs-primary:          #2b4c7e;
    --bs-primary-rgb:      43, 76, 126;
    --bs-info:             #56c2e6;
    --bs-info-rgb:         86, 194, 230;
    --bs-link-color:       #2b4c7e;
    --bs-link-color-rgb:   43, 76, 126;
    --bs-link-hover-color: #0d233a;
}

/* ── btn-primary ──────────────────────────────────────── */
.btn-primary {
    --bs-btn-color:             #fff;
    --bs-btn-bg:                #2b4c7e;
    --bs-btn-border-color:      #2b4c7e;
    --bs-btn-hover-color:       #fff;
    --bs-btn-hover-bg:          #254169;
    --bs-btn-hover-border-color:#213c62;
    --bs-btn-focus-shadow-rgb:  43, 76, 126;
    --bs-btn-active-color:      #fff;
    --bs-btn-active-bg:         #213c62;
    --bs-btn-active-border-color:#1e385c;
    --bs-btn-disabled-color:    #fff;
    --bs-btn-disabled-bg:       #2b4c7e;
    --bs-btn-disabled-border-color: #2b4c7e;
}

/* ── btn-outline-primary ──────────────────────────────── */
.btn-outline-primary {
    --bs-btn-color:             #2b4c7e;
    --bs-btn-border-color:      #2b4c7e;
    --bs-btn-hover-color:       #fff;
    --bs-btn-hover-bg:          #2b4c7e;
    --bs-btn-hover-border-color:#2b4c7e;
    --bs-btn-focus-shadow-rgb:  43, 76, 126;
    --bs-btn-active-color:      #fff;
    --bs-btn-active-bg:         #2b4c7e;
    --bs-btn-active-border-color:#2b4c7e;
}

/* ── Utility class overrides ──────────────────────────── */
.bg-primary    { background-color: #2b4c7e !important; }
.text-primary  { color: #2b4c7e !important; }
.border-primary{ border-color: #2b4c7e !important; }

/* ── Form focus states ────────────────────────────────── */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: #2b4c7e;
    box-shadow: 0 0 0 0.25rem rgba(43, 76, 126, 0.25);
    outline: 0;
}

.form-check-input:checked {
    background-color: #2b4c7e;
    border-color: #2b4c7e;
}

/* ── Nav tabs ─────────────────────────────────────────── */
.nav-tabs .nav-link { color: #2b4c7e; }
.nav-tabs .nav-link:hover  { color: #0d233a; border-color: #dee2e6 #dee2e6 transparent; }
.nav-tabs .nav-link.active { color: #0d233a; border-color: #2b4c7e #2b4c7e #fff; }

/* ── Pagination ───────────────────────────────────────── */
.page-link { color: #2b4c7e; }
.page-link:hover { color: #0d233a; }
.page-item.active .page-link {
    background-color: #2b4c7e;
    border-color: #2b4c7e;
}

body {
    background-color: var(--bg-color);
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-main);
}

/* Elegant Navbar */
.navbar-custom {
    background-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 0.8rem;
}

.navbar-custom .navbar-brand {
    color: var(--text-light);
    font-weight: 600;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.navbar-custom .navbar-brand img {
    height: 35px;
    margin-right: 15px;
    /* padding: 5px; */
    border-radius: 4px;
}

.navbar-custom .navbar-nav .nav-item {
    margin: 0 4px;
}

.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.2s ease, background 0.2s ease;
    border-radius: 6px;
}

.navbar-custom .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.navbar-custom .nav-link.active {
    color: #fff;
    font-weight: 600;
    background: rgba(86, 194, 230, 0.18);
    border-bottom: 2px solid var(--accent-color);
    border-radius: 6px 6px 0 0;
}

.navbar-custom .nav-link.dropdown-toggle.show {
    color: #fff;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 6px;
}

.navbar-custom .dropdown-menu {
    border: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border-radius: 8px;
}

.navbar-custom .dropdown-menu .dropdown-item.active,
.navbar-custom .dropdown-menu .dropdown-item:active {
    background-color: #eef2fb;
    color: #2b4c7e;
    font-weight: 600;
    border-left: 3px solid #2b4c7e;
    padding-left: calc(1rem - 3px);
}
.navbar-custom .dropdown-menu .dropdown-item:hover:not(.active) {
    background-color: #f5f7fb;
    color: #0d233a;
}

/* ── Login Page ───────────────────────────────────────── */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a1c2e 0%, #0d233a 40%, #1a3656 100%);
    padding: 2rem 1rem;
}

.login-split-card {
    display: flex;
    width: 100%;
    max-width: 920px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}

/* Left brand panel */
.login-brand-panel {
    flex: 0 0 42%;
    background: linear-gradient(160deg, #0d233a 0%, #163354 60%, #1e4270 100%);
    color: #fff;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.login-brand-deco {
    position: absolute;
    border-radius: 50%;
    background: rgba(86, 194, 230, 0.07);
}
.login-brand-deco--1 { width: 280px; height: 280px; top: -100px; right: -100px; }
.login-brand-deco--2 { width: 200px; height: 200px; bottom: -80px; left: -60px; background: rgba(86,194,230,0.05); }
.login-brand-deco--3 { width: 120px; height: 120px; top: 55%; left: 60%; background: rgba(86,194,230,0.04); }

.login-brand-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(86,194,230,0.15);
    color: var(--accent-color);
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.login-brand-logo {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border-radius: 10px;
    margin: 0 auto;
    width: fit-content;
}
.login-brand-logo img { height: 60px; display: block; }

.login-brand-body { flex: 1; position: relative; z-index: 1; text-align: center; }

.login-brand-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.3px;
}

.login-brand-subtitle {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.login-brand-features {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: fit-content;
    gap: 1rem;
}
.login-brand-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.8);
}
.login-feature-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(86,194,230,0.15);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.login-brand-footer {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
    margin-top: 2.5rem;
    margin-bottom: 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Right form panel */
.login-form-panel {
    flex: 1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem;
}

.login-form-inner { width: 100%; max-width: 380px; }

.login-form-header {
    margin-bottom: 2rem;
    text-align: center;
}
.login-form-header h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.35rem;
}
.login-form-header p {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0;
}

.text-dark-custom { color: #3d4a5c; font-size: 0.875rem; }

/* Input groups */
.login-input-group .input-group-text {
    background: #f8f9fb;
    border-color: #e2e8f0;
    color: #8a9bb0;
    /* border-right: none; */
}
.login-input-group .form-control {
    border-color: #e2e8f0;
    border-left: none;
    /* border-right: none; */
    background: #f8f9fb;
    padding: 0.7rem 0.75rem;
    font-size: 0.9rem;
    transition: all 0.25s ease;
}
.login-input-group .form-control:focus {
    background: #fff;
    border-color: var(--secondary-color);
    box-shadow: none;
}
.login-input-group .form-control:focus ~ .login-pw-toggle,
.login-input-group:focus-within .input-group-text {
    background: #fff;
    border-color: var(--secondary-color);
}
.login-pw-toggle {
    background: #f8f9fb;
    border-color: #e2e8f0;
    border-left: none;
    color: #8a9bb0;
    cursor: pointer;
    transition: color 0.2s;
}
.login-pw-toggle:hover { color: var(--secondary-color); }

.login-forgot-link { color: var(--secondary-color); font-weight: 500; }
.login-forgot-link:hover { color: var(--primary-color); }

.login-submit-btn {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.8rem;
    border-radius: 10px;
    border: none;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(43,76,126,0.35);
}
.login-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13,35,58,0.4);
    color: #fff;
}
.login-submit-btn:active { transform: translateY(0); }

/* Responsive: stack panels on small screens */
@media (max-width: 700px) {
    .login-split-card { flex-direction: column; }
    .login-brand-panel { flex: none; padding: 2rem 1.5rem; }
    .login-brand-features { display: none; }
    .login-brand-subtitle { display: none; }
    .login-form-panel { padding: 2rem 1.5rem; }
}

/* Legacy auth-card classes kept for safety */
.auth-card-body { padding: 2.5rem; }
.form-control-custom {
    border-radius: 6px;
    padding: 0.75rem 1.25rem;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}
.btn-primary-custom {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
}
.btn-primary-custom:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(13, 35, 58, 0.3);
}

/* Dashboard Cards */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}

.stat-card-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    opacity: 0.8;
}

/* Datatable customization */
.table-custom {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.table-custom thead th {
    background-color: var(--primary-color);
    color: var(--text-light);
    font-weight: 500;
    border: none;
    padding: 1rem;
}

.table-custom tbody td {
    vertical-align: middle;
    padding: 1rem;
    border-color: #f0f0f0;
}

.table-custom tbody tr:hover {
    background-color: rgba(86, 194, 230, 0.05);
}

.badge-custom {
    padding: 0.5em 0.8em;
    border-radius: 4px;
    font-weight: 500;
}

.filter-section {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

/* ── Dashboard Welcome Banner ─────────────────────────── */
.dashboard-welcome {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    color: #fff;
    box-shadow: 0 8px 28px rgba(13, 35, 58, 0.22);
    position: relative;
    overflow: hidden;
}
.dashboard-welcome::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(86, 194, 230, 0.08);
    pointer-events: none;
}
.dashboard-welcome::before {
    content: '';
    position: absolute;
    right: 60px;
    bottom: -80px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(86, 194, 230, 0.05);
    pointer-events: none;
}
.welcome-eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.3rem;
}
.welcome-name {
    font-size: 1.65rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
}
.welcome-sub {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0;
}
.btn-accent {
    background: var(--accent-color);
    color: var(--primary-color);
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.btn-accent:hover {
    background: #3db5da;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(86, 194, 230, 0.4);
}

/* ── Gradient Stat Cards ──────────────────────────────── */
.stat-card-v2 {
    border: none !important;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #fff;
    overflow: hidden;
}
.stat-card-v2:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}
.stat-card--orders     { background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); }
.stat-card--production { background: linear-gradient(135deg, #b8621a 0%, #e07830 100%); }
.stat-card--shipment   { background: linear-gradient(135deg, #0a647a 0%, #0e96be 100%); }
.stat-card--delivered  { background: linear-gradient(135deg, #1a6535 0%, #28a745 100%); }

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.stat-value {
    font-size: 2.4rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}
.stat-icon-wrap {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.55rem;
    color: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}

/* ── Dashboard Bottom Cards ───────────────────────────── */
.dashboard-bottom-card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.dashboard-bottom-card .card-header {
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 14px 14px 0 0 !important;
    padding: 1rem 1.25rem;
}
.pipeline-progress-label {
    font-size: 0.82rem;
    color: #6c757d;
}
.pipeline-progress-count {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-color);
}
.progress-bar--production {
    background: linear-gradient(90deg, #b8621a, #e07830);
    border-radius: 6px;
}
.progress-bar--shipment {
    background: linear-gradient(90deg, #0a647a, #0e96be);
    border-radius: 6px;
}
.progress-bar--delivered {
    background: linear-gradient(90deg, #1a6535, #28a745);
    border-radius: 6px;
}
