/* ShipCartExpress custom stylesheet
   Brand colors and component customizations for Bootstrap 5. */

:root {
    --sce-navy: #063B8C;
    --sce-deep-blue: #062C68;
    --sce-electric-blue: #009FE3;
    --sce-orange: #FF6B00;
    --sce-golden-orange: #FFB000;
    --sce-white: #FFFFFF;
    --sce-bg: #F6F8FB;
    --sce-dark-text: #101828;
    --sce-secondary-text: #667085;

    --bs-primary: var(--sce-navy);
    --bs-primary-rgb: 6, 59, 140;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    background-color: var(--sce-bg);
    color: var(--sce-dark-text);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

a {
    text-decoration: none;
}

/* ---------------- Layout ---------------- */

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.app-sidebar,
.app-offcanvas-sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--sce-navy) 0%, var(--sce-deep-blue) 100%);
    color: var(--sce-white);
}

.app-offcanvas-sidebar {
    color: var(--sce-white);
}

.app-offcanvas-sidebar .offcanvas-header {
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    background: var(--sce-white);
    border-bottom: 1px solid #e6e9ef;
    padding: 0.75rem 1.25rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-content {
    padding: 1.5rem;
    flex: 1;
}

.app-footer {
    padding: 1rem;
    color: var(--sce-secondary-text);
    background: var(--sce-white);
    border-top: 1px solid #e6e9ef;
}

.btn-topbar-toggle {
    border: 1px solid #d0d5dd;
    background: var(--sce-white);
    color: var(--sce-navy);
}

.topbar-title {
    color: var(--sce-navy);
    font-weight: 600;
}

.topbar-admin-name {
    color: var(--sce-secondary-text);
    font-weight: 500;
}

/* ---------------- Sidebar ---------------- */

.sidebar-brand-area {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.sidebar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--sce-white);
    display: block;
}

.sidebar-logo {
    max-height: 36px;
    max-width: 100%;
    display: block;
    object-fit: contain;
}

.auth-logo {
    max-height: 56px;
    max-width: 220px;
    object-fit: contain;
}

.brand-accent {
    color: var(--sce-golden-orange);
}

.brand-heading {
    color: var(--sce-navy);
    font-weight: 700;
}

.sidebar-sub {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-nav {
    padding: 0.75rem 0.5rem;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    color: rgba(255,255,255,0.85);
    font-size: 0.92rem;
    margin-bottom: 0.15rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-link i {
    font-size: 1.05rem;
    width: 1.25rem;
    text-align: center;
}

.sidebar-link:hover {
    background: rgba(255,255,255,0.1);
    color: var(--sce-white);
}

.sidebar-link.active {
    background: var(--sce-electric-blue);
    color: var(--sce-white);
    font-weight: 600;
}

.sidebar-footer-area {
    padding: 0.75rem 0.5rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.15);
}

/* ---------------- Buttons ---------------- */

.btn-primary {
    background-color: var(--sce-navy);
    border-color: var(--sce-navy);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--sce-deep-blue) !important;
    border-color: var(--sce-deep-blue) !important;
}

.btn-orange, .btn-accent {
    background-color: var(--sce-orange);
    border-color: var(--sce-orange);
    color: var(--sce-white);
}
.btn-orange:hover, .btn-accent:hover {
    background-color: #e05f00;
    border-color: #e05f00;
    color: var(--sce-white);
}

.btn-outline-primary {
    color: var(--sce-navy);
    border-color: var(--sce-navy);
}
.btn-outline-primary:hover {
    background-color: var(--sce-navy);
    border-color: var(--sce-navy);
}

/* ---------------- Cards ---------------- */

.card {
    border: 1px solid #e6e9ef;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
}

.card-header {
    background: var(--sce-white);
    border-bottom: 1px solid #e6e9ef;
    font-weight: 600;
    color: var(--sce-navy);
}

.stat-card {
    border-radius: 14px;
    padding: 1.25rem;
    background: var(--sce-white);
    border: 1px solid #e6e9ef;
    height: 100%;
}

.stat-card .stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--sce-white);
    background: var(--sce-navy);
}

.stat-card .stat-icon.bg-navy { background: var(--sce-navy); }
.stat-card .stat-icon.bg-orange { background: var(--sce-orange); }
.stat-card .stat-icon.bg-electric { background: var(--sce-electric-blue); }
.stat-card .stat-icon.bg-golden { background: var(--sce-golden-orange); }
.stat-card .stat-icon.bg-deep { background: var(--sce-deep-blue); }

.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--sce-dark-text);
}

.stat-card .stat-label {
    color: var(--sce-secondary-text);
    font-size: 0.85rem;
}

/* ---------------- Tables ---------------- */

.table-responsive {
    border-radius: 10px;
}

table.table thead th {
    background-color: var(--sce-navy);
    color: var(--sce-white);
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    border-bottom: none;
}

table.table tbody td {
    vertical-align: middle;
    font-size: 0.9rem;
}

table.table-striped tbody tr:nth-of-type(odd) {
    background-color: #fbfcfe;
}

/* ---------------- Forms ---------------- */

.form-label {
    font-weight: 600;
    color: var(--sce-dark-text);
    font-size: 0.9rem;
}

.form-control, .form-select {
    border-color: #d0d5dd;
}

.form-control:focus, .form-select:focus {
    border-color: var(--sce-electric-blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 159, 227, 0.2);
}

/* ---------------- Badges ---------------- */

.badge {
    font-weight: 600;
    padding: 0.4em 0.7em;
    border-radius: 20px;
}

/* ---------------- Alerts ---------------- */

.alert {
    border-radius: 10px;
    border: none;
}

/* ---------------- Auth pages ---------------- */

.auth-body {
    background: linear-gradient(135deg, var(--sce-navy) 0%, var(--sce-deep-blue) 60%, var(--sce-electric-blue) 100%);
    min-height: 100vh;
}

.auth-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(6, 44, 104, 0.35);
}

/* ---------------- Split auth layout (courier themed login) ---------------- */

.auth-split-body {
    background: var(--sce-white);
    min-height: 100vh;
}

.auth-split-wrapper {
    min-height: 100vh;
    display: flex;
    flex-wrap: wrap;
}

.auth-hero {
    flex: 1 1 56%;
    position: relative;
    background: linear-gradient(160deg, var(--sce-navy) 0%, var(--sce-deep-blue) 100%);
    color: var(--sce-white);
    padding: 3.5rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    min-height: 100vh;
}

.auth-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
    background-size: 26px 26px;
    pointer-events: none;
}

.auth-hero::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -120px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 159, 227, 0.28) 0%, transparent 70%);
    pointer-events: none;
}

.auth-hero-content {
    position: relative;
    z-index: 2;
    max-width: 460px;
}

.auth-hero-logo-wrap {
    background: rgba(255, 255, 255, 0.96);
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1.1rem;
    border-radius: 10px;
    margin-bottom: 2.5rem;
}

.auth-hero-logo-wrap img {
    max-height: 30px;
    display: block;
}

.auth-hero-kicker {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sce-golden-orange);
    margin-bottom: 0.85rem;
}

.auth-hero-title {
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.9rem;
}

.auth-hero-subtitle {
    color: rgba(255, 255, 255, 0.78);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2.25rem;
    max-width: 400px;
}

.auth-hero-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-hero-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.1rem;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.94rem;
}

.auth-hero-features li .icon-chip {
    width: 36px;
    height: 36px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 9px;
    color: var(--sce-golden-orange);
    font-size: 1.05rem;
}

.auth-hero-features li span.feature-text {
    padding-top: 0.35rem;
}

.auth-route-illustration {
    position: relative;
    z-index: 2;
    margin-top: 2.75rem;
    max-width: 420px;
}

.auth-route-illustration svg {
    width: 100%;
    height: auto;
    display: block;
}

.auth-route-dash {
    stroke-dasharray: 2 10;
    animation: auth-dash-move 12s linear infinite;
}

@keyframes auth-dash-move {
    to { stroke-dashoffset: -240; }
}

.auth-form-panel {
    flex: 1 1 44%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    background: var(--sce-white);
}

.auth-form-card {
    width: 100%;
    max-width: 380px;
}

.auth-form-kicker {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sce-electric-blue);
    margin-bottom: 0.6rem;
}

.auth-form-card h4 {
    font-weight: 700;
    color: var(--sce-navy);
}

.auth-input-group .input-group-text {
    background: var(--sce-bg);
    border-right: none;
    color: var(--sce-secondary-text);
}

.auth-input-group .form-control {
    border-left: none;
}

.auth-input-group .form-control:focus {
    box-shadow: none;
}

.auth-input-group.focus-ring .input-group-text,
.auth-input-group.focus-ring .form-control {
    border-color: var(--sce-electric-blue);
}

.btn-auth-submit {
    background: linear-gradient(135deg, var(--sce-orange), var(--sce-golden-orange));
    border: none;
    color: var(--sce-white);
    font-weight: 600;
    padding: 0.65rem 1rem;
    border-radius: 10px;
}

.btn-auth-submit:hover,
.btn-auth-submit:focus {
    filter: brightness(1.05);
    color: var(--sce-white);
}

.auth-switch-panel {
    text-align: center;
    font-size: 0.9rem;
    color: var(--sce-secondary-text);
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eef1f6;
}

.auth-switch-panel a {
    color: var(--sce-navy);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch-panel a:hover {
    color: var(--sce-electric-blue);
}

@media (max-width: 991px) {
    .auth-hero {
        min-height: auto;
        padding: 2.25rem 1.5rem 2rem;
        flex: 1 1 100%;
    }
    .auth-route-illustration {
        display: none;
    }
    .auth-hero-title {
        font-size: 1.6rem;
    }
    .auth-form-panel {
        flex: 1 1 100%;
        padding: 2rem 1.25rem 2.5rem;
    }
}

@media (max-width: 430px) {
    .auth-hero {
        padding: 1.75rem 1.25rem;
    }
    .auth-hero-title {
        font-size: 1.4rem;
    }
}

/* ---------------- Credential display box ---------------- */

.credential-box {
    background: var(--sce-bg);
    border: 1px dashed var(--sce-electric-blue);
    border-radius: 10px;
    padding: 1rem;
}

.credential-value {
    font-family: "Courier New", monospace;
    font-weight: 700;
    color: var(--sce-navy);
}

/* ---------------- Wallet ---------------- */

.wallet-balance-card {
    background: linear-gradient(135deg, var(--sce-orange), var(--sce-golden-orange));
    color: var(--sce-white);
    border-radius: 14px;
    padding: 1.5rem;
}

.wallet-balance-card .balance-amount {
    font-size: 2rem;
    font-weight: 700;
}

.text-credit { color: #12b76a; font-weight: 600; }
.text-debit { color: #d92d20; font-weight: 600; }

/* ---------------- Responsive breakpoints ---------------- */

@media (max-width: 1440px) {
    .app-content { padding: 1.25rem; }
}

@media (max-width: 1280px) {
    .app-sidebar, .app-offcanvas-sidebar { width: 240px; }
}

@media (max-width: 1024px) {
    .stat-card .stat-value { font-size: 1.4rem; }
}

@media (max-width: 991px) {
    .app-sidebar { display: none !important; }
    .app-content { padding: 1rem; }
}

@media (max-width: 768px) {
    .app-topbar { padding: 0.6rem 0.85rem; }
    .app-content { padding: 0.85rem; }
    .stat-card { padding: 1rem; }
}

@media (max-width: 430px) {
    .sidebar-brand { font-size: 1.05rem; }
    .stat-card .stat-value { font-size: 1.2rem; }
    .app-content { padding: 0.6rem; }
    table.table thead th, table.table tbody td { font-size: 0.8rem; }
}

@media (max-width: 390px) {
    .btn { font-size: 0.85rem; }
}

@media (max-width: 375px) {
    .topbar-admin-name span { display: none; }
}

@media (max-width: 320px) {
    .app-content { padding: 0.4rem; }
    .card-body { padding: 0.85rem; }
}
