* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --sidebar-bg: #02243f;
    --sidebar-width: 260px;
    --app-bg: #eef2f7;
}

body {
    font-family: "Inter", sans-serif;
    background: var(--app-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

/* =====================
   SIDEBAR
   ===================== */
.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.25s ease;
}

.sidebar-inner {
    padding: 20px 16px 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-logo {
    padding: 10px 4px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 18px;
}

.sidebar-logo a {
    display: inline-block;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.sidebar-menu li {
    margin-bottom: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: #8da5bb;
    font-size: 14.5px;
    font-weight: 500;
    padding: 9px 10px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-icon {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    stroke: currentColor;
}

.sidebar-logout {
    color: #ff6b6b !important;
    margin-top: 8px;
}

.sidebar-logout:hover {
    background: rgba(255, 80, 80, 0.1) !important;
    color: #ff4444 !important;
}

/* Overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 900;
}

.sidebar-overlay.show {
    display: block;
}

/* =====================
   PAGE WRAPPER
   ===================== */
.page-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.25s ease;
}

.page-wrapper.sidebar-collapsed {
    margin-left: 0;
}

/* =====================
   TOPBAR
   ===================== */
.topbar-custom {
    background: linear-gradient(135deg, #ffffff 0%, #eef4fb 100%);
    border: 1px solid #d5dce5;
    border-radius: 12px;
    margin: 14px 20px 0;
    padding: 0 16px;
    height: 58px;
    display: flex;
    align-items: center;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
}

.btn-menu-toggle {
    border: none;
    background: transparent;
    color: #607286;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.topbar-search {
    position: relative;
}

.topbar-search .bi-search {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca8b6;
    font-size: 13px;
    pointer-events: none;
}

.topbar-search .form-control {
    width: 220px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #dfe4e8;
    background: #eef1f4;
    padding: 0 12px 0 32px;
    font-size: 13px;
    color: #6b7f94;
    box-shadow: none;
    outline: none;
}

.topbar-search .form-control:focus {
    border-color: #458be6;
    background: #fff;
}

/* =====================
   CONTENT
   ===================== */
.content-page {
    flex: 1;
    padding: 0 20px;
}

/* =====================
   LOCATION CIRCLES
   ===================== */
.location-scroll {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.location-scroll::-webkit-scrollbar {
    display: none;
}

.location-circle {
    width: 110px;
    height: 110px;
    overflow: hidden;
    background: #fff;
    border: 2px solid #e4eaf1 !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.location-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.location-name {
    font-size: 13px;
    color: #334e6d;
}

/* =====================
   TILE CARDS
   ===================== */
.tile-card {
    border: 1px solid #e4eaf1 !important;
    border-radius: 10px !important;
    color: #334e6d;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tile-card .fw-semibold {
    font-size: 14px;
    color: #334e6d;
}


.backend-order-tile {
    text-align: center;
}

.backend-order-image {
    width: 100%;
    max-width: 170px;
    height: 110px;
    object-fit: cover;
    background: #eef2f7;
    border-radius: 10px;
    margin: 0 auto 12px;
}

.backend-order-title {
    font-size: 15px;
    font-weight: 700;
    color: #24384d;
    margin-bottom: 4px;
}

.backend-order-location {
    font-size: 12px;
    color: #718399;
    margin-bottom: 10px;
}

.backend-order-meta {
    display: grid;
    gap: 6px;
    font-size: 12px;
    color: #3d5268;
    text-align: left;
}

.backend-order-meta strong {
    color: #1f3348;
}

.backend-order-footer {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.backend-order-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8f7ee;
    color: #169964;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
}

.backend-order-link {
    font-size: 13px;
    font-weight: 700;
    color: #458be6;
    text-decoration: none;
}

.backend-orders-empty {
    border-radius: 12px;
}

/* =====================
   ABOUT RANK
   ===================== */
.about-rank-card {
    border: 1px solid #d8dfeb !important;
    border-radius: 12px;
}

.about-rank-header {
    background: #cf1f3a;
    color: #fff;
    font-size: 38px;
    font-weight: 800;
    line-height: 1.15;
    padding: 22px 24px;
    letter-spacing: 0.2px;
}

.about-rank-body {
    background: #0d318d;
    color: #f5f8ff;
    padding: 28px 24px 26px;
}

.about-rank-tier {
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 12px;
}

.about-rank-body p {
    margin-bottom: 8px;
    font-size: 24px;
    line-height: 1.35;
    color: #eef4ff;
}

.about-rank-body strong {
    color: #ffffff;
    font-weight: 800;
}

.about-rank-note {
    font-size: 21px !important;
    opacity: 0.95;
}

/* =====================
   HOVER EFFECT
   ===================== */
.hover-scale:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.13) !important;
}

/* =====================
   FOOTER
   ===================== */
.site-footer {
    padding: 16px 20px;
    border-top: 1px solid #dde2e8;
    background: #fff;
    margin-top: auto;
}

/* =====================
   CONTACT MODAL
   ===================== */
.contact-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.55);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.contact-modal-overlay.open {
    display: flex;
}

.contact-modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px 24px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.22);
}

.contact-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    font-size: 26px;
    line-height: 1;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
}

.contact-modal-close:hover {
    color: #1f2a37;
}

.contact-modal-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1f2a37;
}

.contact-modal-body {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 18px;
}

.contact-modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #458be6;
    color: #fff;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    transition: background 0.2s;
}

.contact-modal-btn:hover {
    background: #3072c8;
    color: #fff;
}

.contact-modal-hint {
    display: block;
    margin-top: 14px;
    font-size: 12px;
    color: #9ca8b6;
}

/* =====================
   TASKS FULL MODAL
   ===================== */
.tasks-full-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.tasks-full-overlay.open {
    display: flex;
}

.tasks-full-box {
    background: #fff;
    border-radius: 18px;
    padding: 28px 24px 24px;
    max-width: 380px;
    width: 88%;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.tasks-full-title {
    font-size: 19px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0;
}

.tasks-full-hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 14px 0;
}

.tasks-full-body {
    font-size: 17px;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.5;
    margin: 0;
}

.tasks-full-confirm-btn {
    display: block;
    width: 100%;
    background: #3e7be6;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 12px;
    transition: background 0.2s;
}

.tasks-full-confirm-btn:hover {
    background: #2f65c5;
}

.tasks-full-telegram-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: #3a3a3a;
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.2s;
}

.tasks-full-telegram-btn:hover {
    background: #222;
    color: #fff;
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 1024px) {
    .page-wrapper {
        margin-left: 0;
    }

    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.open {
        transform: translateX(0);
    }
}

@media (max-width: 576px) {
    .topbar-custom {
        margin: 10px 12px 0;
    }

    .content-page {
        padding: 0 12px;
    }

    .backend-order-image {
        height: 100px;
    }

    .about-rank-header {
        font-size: 30px;
        padding: 18px 16px;
    }

    .about-rank-body {
        padding: 20px 16px;
    }

    .about-rank-tier {
        font-size: 33px;
    }

    .about-rank-body p {
        font-size: 18px;
    }
}