@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --brand-green: #118a5a;
    --brand-ink: #1f2933;
    --brand-bg: #f2f6fb;
    --brand-indigo: #2447a6;
    --brand-sky: #2b7de9;
    --brand-slate: #0f172a;
    --surface: #ffffff;
    --line: #dbe3ef;
}

html,
body {
    min-height: 100%;
}

body {
    background: radial-gradient(circle at 0% 0%, #eef7f2 0%, #f2f6fb 35%, #f7f5ef 100%);
    color: var(--brand-ink);
    font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.005em;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand,
.app-brand-pill,
.page-title {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    letter-spacing: 0.01em;
}

.app-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    background: linear-gradient(115deg, #0f8a5b 0%, #126d88 45%, #274694 100%);
    border-bottom: 0;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.app-topbar-menu {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 0.7rem;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.app-topbar-menu:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
}

.app-brand-pill {
    color: #fff;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1;
    border-radius: 0.7rem;
    padding: 0.55rem 0.85rem;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.app-shell {
    flex: 1;
    min-height: 0;
}

.app-sidebar {
    width: 300px;
    flex: 0 0 300px;
    background: linear-gradient(180deg, #0f172a 0%, #102544 48%, #12335f 100%);
    color: #fff;
    padding: 1.15rem;
    position: sticky;
    top: 58px;
    height: calc(100vh - 58px);
    overflow-y: auto;
    transition: all 0.24s ease;
}

.sidebar-collapsed .app-sidebar {
    width: 0;
    flex-basis: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.app-sidebar-offcanvas {
    max-width: 305px;
    background: linear-gradient(180deg, #0f172a 0%, #102544 48%, #12335f 100%);
    color: #fff;
}

.app-sidebar-offcanvas .offcanvas-header {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.app-sidebar-offcanvas .offcanvas-title {
    color: #fff;
}

.app-user-panel {
    background: linear-gradient(140deg, #1bb27d 0%, #2f86e7 58%, #3352a8 100%);
    border-radius: 1rem;
    padding: 1rem;
    border: 0;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.22);
}

.app-user-icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.24);
    color: #fff;
    font-size: 1.5rem;
    flex: 0 0 46px;
}

.app-user-name {
    font-size: 1.03rem;
    line-height: 1.25;
    font-weight: 800;
    color: #fff;
    word-break: break-word;
}

.app-user-role {
    margin-top: 0.15rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.app-user-meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
    overflow-wrap: anywhere;
}

.app-user-action {
    border-radius: 0.65rem;
    font-weight: 700;
}

.app-menu-list {
    margin-top: 1rem;
}

.app-menu-link {
    color: rgba(255, 255, 255, 0.9);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    padding: 0.62rem 0.72rem;
}

.app-menu-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.app-menu-link.active {
    color: #12243a;
    background: linear-gradient(135deg, #a7e8cf 0%, #dbe9ff 100%);
    box-shadow: 0 6px 16px rgba(24, 178, 125, 0.24);
}

.app-main {
    min-width: 0;
}

.page-title {
    font-size: 1.2rem;
}

.text-white-75 {
    color: rgba(255, 255, 255, 0.8) !important;
}

.page-hero .breadcrumb-item a,
.page-hero .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.94);
}

.page-hero .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.7);
}

.app-footer {
    background: linear-gradient(100deg, #e8eef9 0%, #edf8f2 60%, #f7f4ea 100%);
    border-top: 1px solid var(--line);
    color: #334155;
}

.auth-bg {
    background: linear-gradient(135deg, #eaf8f1 0%, #f4f7fb 50%, #fffdf5 100%);
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.auth-layout {
    width: min(1080px, 100%);
}

.auth-side-panel {
    height: 100%;
    border-radius: 1rem;
    padding: 1.25rem;
    color: #fff;
    background: linear-gradient(135deg, #0f8f60 0%, #2178cb 52%, #2c4ea2 100%);
    box-shadow: 0 14px 32px rgba(44, 78, 162, 0.22);
}

.auth-side-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.8rem;
    font-size: 1.4rem;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.auth-side-title {
    color: #fff;
}

.auth-side-text {
    color: rgba(255, 255, 255, 0.9);
}

.auth-side-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 0.42rem 0.72rem;
}

.auth-card {
    max-width: none;
    margin-top: 0;
    border-radius: 1rem;
}

.auth-form-card {
    background: rgba(255, 255, 255, 0.96);
}

.auth-form-head .auth-form-kicker {
    color: #1f5eb7;
    font-size: 0.73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-submit-btn {
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f9f6c 0%, #2a81e4 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(42, 129, 228, 0.26);
    padding: 0.5rem 0.95rem;
}

.auth-submit-btn:hover,
.auth-submit-btn:focus {
    color: #fff;
    transform: translateY(-1px);
}

.card {
    border-radius: 1rem;
    border: 0 !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(2px);
}

.card .card-body {
    padding: 1rem;
}

.card.page-hero {
    background: linear-gradient(122deg, #0f8f60 0%, #2476ca 50%, #2c4ea2 100%) !important;
    color: #fff;
    border-radius: 1rem;
    box-shadow: 0 14px 28px rgba(44, 78, 162, 0.26);
}

.nav-card {
    color: inherit;
}

.nav-card .card-body {
    box-shadow: inset 0 0 0 1px rgba(17, 138, 90, 0.08);
    border-radius: 0.75rem;
}

.dashboard-action-card {
    position: relative;
    overflow: hidden;
}

.dashboard-action-card::after {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, rgba(17, 138, 90, 0.95) 0%, rgba(45, 125, 233, 0.95) 100%);
}

.dashboard-action-card .dash-card-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.14);
}

.dash-metric {
    font-size: 0.78rem;
    color: #475569;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.dashboard-action-card .card-body {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.dashboard-action-card .dash-card-action {
    margin-top: auto;
    border: 0 !important;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 0.42rem 0.86rem;
    line-height: 1.25;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
}

.dashboard-action-card .dash-action-row .dash-card-action {
    margin-top: 0;
}

.dashboard-action-card .dash-card-action:hover,
.dashboard-action-card .dash-card-action:focus {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.dashboard-action-card.theme-emerald .dash-card-icon {
    background: linear-gradient(135deg, #0f9f6c 0%, #1fb67f 100%);
}

.dashboard-action-card.theme-blue .dash-card-icon {
    background: linear-gradient(135deg, #2563eb 0%, #2f86e7 100%);
}

.dashboard-action-card.theme-cyan .dash-card-icon {
    background: linear-gradient(135deg, #0ea5e9 0%, #2b7de9 100%);
}

.dashboard-action-card.theme-violet .dash-card-icon {
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%);
}

.dashboard-action-card.theme-orange .dash-card-icon {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}

.dashboard-action-card.theme-slate .dash-card-icon {
    background: linear-gradient(135deg, #334155 0%, #1f2937 100%);
}

.dashboard-action-card.theme-emerald .dash-card-action {
    background: linear-gradient(135deg, #0f9f6c 0%, #1fb67f 100%);
    color: #fff;
}

.dashboard-action-card.theme-blue .dash-card-action {
    background: linear-gradient(135deg, #2563eb 0%, #2f86e7 100%);
    color: #fff;
}

.dashboard-action-card.theme-cyan .dash-card-action {
    background: linear-gradient(135deg, #0ea5e9 0%, #2b7de9 100%);
    color: #fff;
}

.dashboard-action-card.theme-violet .dash-card-action {
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%);
    color: #fff;
}

.dashboard-action-card.theme-orange .dash-card-action {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    color: #fff;
}

.dashboard-action-card.theme-slate .dash-card-action {
    background: linear-gradient(135deg, #334155 0%, #1f2937 100%);
    color: #fff;
}

.biker-kpi-card {
    position: relative;
    overflow: hidden;
}

.biker-kpi-card::after {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, rgba(17, 138, 90, 0.95) 0%, rgba(45, 125, 233, 0.95) 100%);
}

.biker-kpi-card.theme-emerald::after {
    background: linear-gradient(90deg, #0f9f6c 0%, #1fb67f 100%);
}

.biker-kpi-card.theme-blue::after {
    background: linear-gradient(90deg, #2563eb 0%, #2f86e7 100%);
}

.biker-kpi-card.theme-orange::after {
    background: linear-gradient(90deg, #d97706 0%, #f59e0b 100%);
}

.biker-kpi-card.theme-slate::after {
    background: linear-gradient(90deg, #334155 0%, #1f2937 100%);
}

.delivery-timeline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.delivery-stage-badge {
    padding: 0.38rem 0.62rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #475569;
    background: rgba(148, 163, 184, 0.16);
}

.delivery-stage-badge.active {
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #2f86e7 100%);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.delivery-stage-badge.done {
    color: #14532d;
    background: linear-gradient(135deg, #bbf7d0 0%, #dcfce7 100%);
}

.job-detail-card {
    border-radius: 0.85rem;
    padding: 0.75rem 0.85rem;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.95) 0%, rgba(243, 248, 255, 0.94) 100%);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.2);
}

.job-segment {
    border-radius: 0.75rem;
    padding: 0.65rem;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.22);
    margin-top: 0.55rem;
}

.job-segment-title {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1e3a8a;
    margin-bottom: 0.38rem;
}

.offer-trip-map {
    height: 170px;
    border-radius: 0.72rem;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

.chat-thread {
    min-height: 220px;
    max-height: 52vh;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.chat-bubble {
    max-width: 88%;
    padding: 0.56rem 0.66rem;
    border-radius: 0.72rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    font-size: 0.85rem;
}

.chat-bubble.me {
    margin-left: auto;
    background: linear-gradient(135deg, #2563eb 0%, #2f86e7 100%);
    color: #fff;
}

.chat-bubble.other {
    margin-right: auto;
    background: rgba(255, 255, 255, 0.95);
    color: #1e293b;
}

.chat-meta {
    font-size: 0.69rem;
    opacity: 0.85;
    margin-bottom: 0.25rem;
}

.job-history-card .card-body {
    padding: 0.95rem;
}

.job-history-card .small strong {
    color: #1e293b;
}

.job-history-card .badge {
    font-size: 0.67rem;
    letter-spacing: 0.02em;
}

.job-market-item {
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.job-market-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.nav-card .btn,
.table .btn,
.offcanvas .btn,
.btn {
    font-weight: 600;
}

pre {
    background: #0f172a;
    color: #dbeafe;
    border-radius: 0.75rem;
    padding: 0.9rem;
    min-height: 120px;
}

.form-control,
.form-select,
.btn,
.input-group-text {
    border-radius: 0.7rem;
}

.form-control,
.form-select {
    border-color: rgba(77, 142, 227, 0.18);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.form-control:focus,
.form-select:focus {
    border-color: #4d8ee3;
    box-shadow: 0 0 0 0.2rem rgba(77, 142, 227, 0.2);
}

.table {
    --bs-table-bg: transparent;
}

.table > :not(caption) > * > * {
    border-bottom-color: rgba(148, 163, 184, 0.2);
}

#order-map,
#track-map,
#biker-live-map {
    border: 0 !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.order-form-card .card-body {
    padding: 1.2rem;
}

.order-step-badges .badge {
    padding: 0.5rem 0.72rem;
    border-radius: 0.7rem;
    font-weight: 700;
}

.order-step-panel {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.95) 0%, rgba(246, 250, 255, 0.95) 100%);
    border-radius: 0.9rem;
    padding: 0.9rem;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14);
}

#package-list .list-group-item {
    border: 0;
    border-radius: 0.8rem;
    margin-bottom: 0.45rem;
    box-shadow: 0 7px 18px rgba(15, 23, 42, 0.06);
}

#package-list .list-group-item:last-child {
    margin-bottom: 0;
}

#package-list .list-group-item.active {
    background: linear-gradient(135deg, #1fb67f 0%, #2a81e4 100%);
    color: #fff;
}

#distance-display {
    border: 0;
    border-radius: 0.85rem;
    box-shadow: 0 8px 20px rgba(36, 71, 166, 0.14);
}

#form-create-order .btn {
    min-height: 40px;
}

#map-status {
    font-weight: 600;
    color: #315896;
}

#form-create-order .form-label {
    font-weight: 600;
}

.offcanvas.offcanvas-end {
    border-left: 1px solid #dbe3ef;
}

@media (min-width: 768px) {
    body {
        font-size: 1rem;
    }

    .card .card-body {
        padding: 1.15rem;
    }

    .offcanvas.offcanvas-end {
        width: 430px;
    }
}

@media (max-width: 991.98px) {
    .app-main {
        padding: 1rem;
    }

    .auth-shell {
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .nav-card .btn {
        width: 100%;
    }

    .page-title {
        font-size: 1.05rem;
    }

    .app-brand-pill {
        font-size: 0.86rem;
        padding: 0.5rem 0.68rem;
    }

    .auth-side-panel,
    .auth-form-card .card-body {
        padding: 1rem !important;
    }
}
