:root {
    --primary: #6418C3;
    --primary-2: #884DFF;
    --orange: #FF8A00;
    --yellow: #FFB800;
    --green: #1BD084;
    --red: #FF4C61;
    --blue: #2F80ED;
    --dark: #171725;
    --muted: #92929D;
    --border: #F1F1F5;
    --bg: #F8F8FB;
    --white: #ffffff;
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--dark);
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    zoom: 0.8;
}


.modal-backdrop {
    width: 125vw;
    height: 125vh;
}

@supports not (zoom: 1) {
    body {
        transform: scale(0.8);
        transform-origin: top left;
        width: 125%;
        min-height: 125vh;
    }
}

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

/* SIDEBAR */

.sidebar {
    width: 290px;
    background: var(--white);
    border-right: 1px solid #eeeeee;
    padding: 26px 22px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 5;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 36px;
}

.brand-logo {
    width: 50px;
    height: 50px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #ffffff;
    display: grid;
    place-items: center;
    font-size: 21px;
    box-shadow: 0 16px 35px var(--theme-shadow);
}

.brand h2 {
    font-size: 24px;
    line-height: 1;
    margin: 0;
    font-weight: 900;
    letter-spacing: -0.8px;
}

.brand small {
    color: var(--muted);
    font-weight: 600;
}

.menu-title {
    color: #b5b5be;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 26px 12px 12px;
}

.menu a {
    min-height: 52px;
    border-radius: 16px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #696974;
    text-decoration: none;
    font-weight: 800;
    margin-bottom: 8px;
    transition: 0.18s;
    font-size: 15px;
}

.menu a i {
    width: 22px;
    text-align: center;
    font-size: 18px;
}

.menu a.active,
.menu a:hover {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 15px 30px var(--theme-shadow);
}

.upgrade-box {
    margin-top: 34px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border-radius: 24px;
    padding: 20px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.upgrade-box::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -45px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

.upgrade-box strong {
    font-size: 17px;
    display: block;
    margin-bottom: 8px;
}

.upgrade-box p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.upgrade-box button {
    border: none;
    border-radius: 14px;
    background: #ffffff;
    color: var(--primary);
    font-weight: 900;
    padding: 10px 16px;
    position: relative;
    z-index: 2;
}

/* MAIN */

.main {
    margin-left: 290px;
    width: calc(100% - 290px);
    padding: 28px 34px 34px;
}

/* TOPBAR */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.hello h1 {
    font-size: 30px;
    font-weight: 900;
    margin: 0;
    letter-spacing: -1px;
}

.hello p {
    margin: 6px 0 0;
    color: var(--muted);
    font-weight: 600;
}

.top-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.search {
    width: 355px;
    height: 54px;
    border-radius: 18px;
    background: #ffffff;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    border: 1px solid var(--border);
}

.search input {
    border: 0;
    outline: 0;
    width: 100%;
    font-weight: 600;
    color: #555555;
    background: transparent;
}

.circle-btn {
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 18px;
    background: #ffffff;
    color: #696974;
    border: 1px solid var(--border);
    font-size: 18px;
}

.profile {
    min-height: 54px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 14px 7px 7px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ff8a00, #ffba49);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-weight: 900;
}

.profile strong {
    font-size: 14px;
    display: block;
    line-height: 1.1;
}

.profile small {
    font-size: 12px;
    color: var(--muted);
    font-weight: 700;
}

/* HERO */

.hero {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 24px;
    margin-bottom: 24px;
}

.hero-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border-radius: 30px;
    padding: 28px;
    color: #ffffff;
    min-height: 225px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 24px 50px var(--theme-shadow);
}

.hero-card::before,
.hero-card::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.hero-card::before {
    width: 190px;
    height: 190px;
    right: -60px;
    top: -40px;
}

.hero-card::after {
    width: 260px;
    height: 260px;
    right: 90px;
    bottom: -190px;
}

.hero-card h2 {
    font-size: 28px;
    font-weight: 900;
    margin: 0 0 10px;
    max-width: 560px;
    position: relative;
    z-index: 2;
}

.hero-card p {
    color: rgba(255, 255, 255, 0.76);
    font-weight: 600;
    max-width: 560px;
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
}

.hero-actions {
    display: flex;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.btn-white,
.btn-outline-light-custom {
    border-radius: 16px;
    padding: 13px 20px;
    font-weight: 900;
}

.btn-white {
    border: none;
    background: #ffffff;
    color: var(--primary);
}

.btn-outline-light-custom {
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.24);
}

/* CALENDAR */

.calendar-card,
.card-box {
    background: #ffffff;
    border-radius: 30px;
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 12px 34px rgba(23, 23, 37, 0.04);
}

.calendar-card h4,
.card-box h4 {
    font-size: 18px;
    font-weight: 900;
    margin: 0 0 18px;
}

.date-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 9px;
}

.date-pill {
    border-radius: 18px;
    background: #f8f8fb;
    text-align: center;
    padding: 12px 6px;
    font-weight: 900;
    color: #696974;
}

.date-pill span {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 4px;
}

.date-pill.active {
    background: var(--orange);
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(255, 138, 0, 0.25);
}

.date-pill.active span {
    color: #ffffff;
}

.next-transfer {
    margin-top: 22px;
    padding: 16px;
    border-radius: 20px;
    background: #f8f8fb;
}

.next-transfer strong {
    display: block;
}

.next-transfer small {
    display: block;
    color: var(--muted);
    font-weight: 700;
    margin-top: 4px;
}

/* STATS */

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat {
    background: #ffffff;
    border-radius: 26px;
    padding: 22px;
    border: 1px solid var(--border);
    box-shadow: 0 12px 34px rgba(23, 23, 37, 0.04);
}

.stat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 19px;
    display: grid;
    place-items: center;
    font-size: 21px;
}

.bg-purple {
    background: #f3e8ff;
    color: var(--primary);
}

.bg-green {
    background: #e9fff5;
    color: var(--green);
}

.bg-orange {
    background: #fff4e5;
    color: var(--orange);
}

.bg-red {
    background: #ffecee;
    color: var(--red);
}

.stat small {
    color: var(--muted);
    font-weight: 800;
}

.stat h3 {
    font-size: 30px;
    font-weight: 950;
    margin: 5px 0 0;
}

.trend {
    font-size: 12px;
    font-weight: 900;
    border-radius: 999px;
    padding: 7px 10px;
    background: #e9fff5;
    color: var(--green);
}

/* GRIDS */

.grid {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 24px;
    margin-bottom: 24px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.section-title h4 {
    margin: 0;
    font-weight: 950;
    font-size: 19px;
}

.section-title a {
    color: var(--primary);
    font-weight: 900;
    text-decoration: none;
    font-size: 14px;
}

/* TRIPS */

.trip-list {
    display: grid;
    gap: 14px;
}

.trip {
    display: grid;
    grid-template-columns: 48px 1.1fr 0.8fr 0.8fr 110px;
    align-items: center;
    gap: 14px;
    padding: 15px;
    border-radius: 22px;
    background: #fcfcfd;
    border: 1px solid #f1f1f5;
}

.trip-avatar {
    width: 48px;
    height: 48px;
    border-radius: 17px;
    background: #f3e8ff;
    color: var(--primary);
    display: grid;
    place-items: center;
    font-weight: 950;
}

.trip strong {
    display: block;
    font-size: 15px;
    margin-bottom: 3px;
}

.trip small {
    color: var(--muted);
    font-weight: 700;
}

.status {
    border-radius: 999px;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 950;
    text-align: center;
    white-space: nowrap;
}

.s-route {
    background: #f3e8ff;
    color: var(--primary);
}

.s-wait {
    background: #fff4e5;
    color: var(--orange);
}

.s-ok {
    background: #e9fff5;
    color: #10a66e;
}

.s-late {
    background: #ffecee;
    color: var(--red);
}

/* MAP */

.map-box {
    height: 360px;
    border-radius: 28px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 25%, rgba(136, 77, 255, 0.33), transparent 23%),
        radial-gradient(circle at 70% 60%, rgba(255, 138, 0, 0.22), transparent 24%),
        linear-gradient(135deg, #f3e8ff, #f8f8fb);
}

.road {
    position: absolute;
    left: 12%;
    top: 48%;
    width: 76%;
    height: 8px;
    background: var(--primary);
    border-radius: 999px;
    transform: rotate(-16deg);
    opacity: 0.75;
}

.map-pin {
    position: absolute;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: #ffffff;
    display: grid;
    place-items: center;
    box-shadow: 0 16px 35px rgba(23, 23, 37, 0.15);
    color: var(--primary);
    font-size: 20px;
}

.map-pin.start {
    left: 16%;
    top: 54%;
}

.map-pin.end {
    right: 15%;
    top: 31%;
}

.map-pin.car {
    left: 51%;
    top: 39%;
    background: var(--orange);
    color: #ffffff;
}

.map-info {
    position: absolute;
    left: 20px;
    bottom: 20px;
    right: 20px;
    background: #ffffff;
    border-radius: 22px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-info strong {
    font-weight: 950;
}

.map-info small {
    display: block;
    color: var(--muted);
    font-weight: 700;
}

/* BOTTOM */

.bottom {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr 1fr;
    gap: 24px;
}

.driver-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    border-radius: 20px;
    background: #fcfcfd;
    border: 1px solid #f1f1f5;
    margin-bottom: 12px;
}

.driver-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.driver-img {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: #f3e8ff;
    color: var(--primary);
    display: grid;
    place-items: center;
    font-weight: 950;
}

.driver-info strong {
    display: block;
    font-size: 14px;
}

.driver-info small {
    color: var(--muted);
    font-weight: 700;
}

.rating {
    color: #ffb800;
    font-weight: 950;
}

.finance-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 12px;
}

.finance-row strong {
    font-size: 15px;
}

.bar {
    height: 10px;
    background: #f1f1f5;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 18px;
}

.bar div {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

.bar .bar-orange {
    background: linear-gradient(90deg, #ff8a00, #ffb800);
}

.bar .bar-red {
    background: linear-gradient(90deg, #ff4c61, #ff7a8a);
}

.activity {
    position: relative;
    padding-left: 26px;
    margin-bottom: 18px;
}

.activity::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 5px #f3e8ff;
}

.activity::after {
    content: "";
    position: absolute;
    left: 9px;
    top: 22px;
    width: 2px;
    height: 30px;
    background: #f1f1f5;
}

.activity:last-child::after {
    display: none;
}

.activity strong {
    display: block;
    font-size: 14px;
}

.activity small {
    color: var(--muted);
    font-weight: 700;
}

/* RESPONSIVE */

@media (max-width: 1200px) {
    .layout {
        display: block;
    }

    .sidebar {
        background: rgba(255, 255, 255, 0.96);
        border-bottom: 1px solid var(--border);
        border-right: 0;
        bottom: auto;
        left: 0;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 12px 16px;
        position: sticky;
        right: 0;
        top: 0;
        width: 100%;
    }

    .sidebar .brand {
        margin-bottom: 12px;
    }

    .sidebar .brand-logo {
        border-radius: 14px;
        font-size: 17px;
        height: 42px;
        width: 42px;
    }

    .sidebar .brand h2 {
        font-size: 20px;
    }

    .sidebar .brand small,
    .sidebar .menu-title,
    .sidebar .upgrade-box {
        display: none;
    }

    .sidebar .menu {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
        white-space: nowrap;
    }

    .sidebar .menu a {
        flex: 0 0 auto;
        font-size: 13px;
        margin-bottom: 0;
        min-height: 42px;
        padding: 0 13px;
    }

    .sidebar .menu a i {
        font-size: 15px;
        width: 18px;
    }

    .main {
        margin-left: 0;
        width: 100%;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero,
    .grid,
    .bottom {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .main {
        padding: 18px;
    }

    .topbar,
    .top-right {
        flex-direction: column;
        align-items: stretch;
    }

    .search {
        width: 100%;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .trip {
        grid-template-columns: 1fr;
    }

    .profile {
        justify-content: center;
    }

    .hero-actions {
        flex-direction: column;
    }

    .date-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .map-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .finance-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

.stat,
.map-box {
    color: inherit;
    text-decoration: none;
}

.stat {
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 38px rgba(23, 23, 37, 0.08);
}

.dashboard-empty {
    min-height: 154px;
    border: 1px dashed #dedee8;
    border-radius: 22px;
    background: #fcfcfd;
    color: var(--muted);
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    text-align: center;
    padding: 24px;
}

.dashboard-empty i {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: #f3e8ff;
    color: var(--primary);
    font-size: 18px;
}

.dashboard-empty strong {
    color: var(--dark);
    font-weight: 950;
}

.dashboard-empty small {
    font-weight: 700;
}

.btn-white,
.btn-outline-light-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.map-box {
    display: block;
}

.profile-dropdown {
    position: relative;
}

.profile-btn {
    border: 1px solid var(--border);
    cursor: pointer;
    color: var(--dark);
    text-align: left;
}

.profile-btn:hover,
.profile-btn:focus {
    border-color: var(--primary);
    box-shadow: 0 14px 30px var(--theme-shadow);
    outline: 0;
}

.profile-text {
    min-width: 0;
}

.profile-text strong,
.profile-text small {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-caret {
    color: #b5b5be;
    font-size: 11px;
    margin-left: 4px;
}

.profile-menu {
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 18px 42px rgba(23, 23, 37, 0.12);
    min-width: 220px;
    padding: 10px;
}

.profile-menu-head {
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
    padding: 8px 10px 12px;
}

.profile-menu-head strong,
.profile-menu-head small {
    display: block;
}

.profile-menu-head strong {
    color: var(--dark);
    font-size: 14px;
    font-weight: 900;
}

.profile-menu-head small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    margin-top: 2px;
}

.profile-logout {
    align-items: center;
    background: #ffffff;
    border: 0;
    border-radius: 12px;
    color: #ff4c61;
    display: flex;
    font-size: 13px;
    font-weight: 900;
    gap: 9px;
    min-height: 42px;
    padding: 0 10px;
    width: 100%;
}

.profile-logout:hover {
    background: rgba(255, 76, 97, 0.1);
}
