/* ============================================================
   SMM PANEL – STYLES
   Soft Pastel Dashboard, Mobile-First, CSS Variables
   ============================================================ */

/* ── 1. CSS VARIABLES & RESET ── */
:root {
    --primary-color: #6C63FF;
    --primary-light: #EDE9FF;
    --primary-dark: #5349D6;
    --accent-color: #F97316;
    --success-color: #22C55E;
    --danger-color: #EF4444;
    --warning-color: #FBBF24;
    /* ── Default: LIGHT ── */
    --background-color: #F0EEFF;
    --card-color: #FFFFFF;
    --text-color: #1E1B4B;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;
    --border-color: #E5E7EB;
    --shadow-sm: 0 2px 8px rgba(108, 99, 255, 0.08);
    --shadow-md: 0 8px 24px rgba(108, 99, 255, 0.14);
    --shadow-lg: 0 16px 48px rgba(108, 99, 255, 0.18);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --nav-height: 68px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    padding-bottom: calc(var(--nav-height) + 16px);
    transition: background-color var(--transition);
    -webkit-font-smoothing: antialiased;
}

/* ── 2. APP TOP BAR — same style as bottom-nav ── */
.app-top-bar {
    position: fixed;
    top: 0;
    left: 50%;
    /* ← o'zgartiring */
    transform: translateX(-50%);
    /* ← qo'shing */
    right: unset;
    /* ← qo'shing */
    width: 100%;
    max-width: 480px;
    /* ← qo'shing */
    z-index: 900;
    background: var(--card-color);
    border-bottom: 1.5px solid var(--border-color);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(108, 99, 255, 0.10);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), border-color var(--transition);
}

/* Inner wrapper — constrain to same width as main-content */
.app-top-bar-inner {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.app-logo {
    display: flex;
    align-items: center;
    gap: 9px;
}

.app-logo-icon {
    width: 34px;
    height: 34px;
    background: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.35);
}

.app-logo-icon i {
    color: #fff;
    font-size: 17px;
}

.app-logo-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-color);
    line-height: 1;
}

.app-logo-accent {
    color: var(--primary-color);
}

/* ── Dark/Light Toggle Button ── */
.theme-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--card-color);
    border: 1.5px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition),
        border-color var(--transition), color var(--transition);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.theme-toggle-btn:active {
    transform: scale(0.93);
}

.theme-toggle-btn i {
    font-size: 16px;
    transition: opacity 0.2s ease, transform 0.3s ease;
    position: absolute;
}

/* Sun icon: shown in dark mode (click to go light) */
#themeIconSun {
    opacity: 0;
    transform: rotate(-30deg) scale(0.8);
}

/* Moon icon: shown in light mode (click to go dark) */
#themeIconMoon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Dark mode active (manual or Telegram) → show sun, hide moon */
body.manual-dark #themeIconSun,
body.tg-dark #themeIconSun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

body.manual-dark #themeIconMoon,
body.tg-dark #themeIconMoon {
    opacity: 0;
    transform: rotate(30deg) scale(0.8);
}

/* ── Manual Dark Mode (browser users only) ── */
body.manual-dark {
    --background-color: #1c1c1e;
    --card-color: #2c2c2e;
    --text-color: #f2f2f7;
    --text-muted: #aeaeb2;
    --text-light: #636366;
    --border-color: #3a3a3c;
    --primary-light: rgba(108, 99, 255, 0.18);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
    background-image: none;
}

body.manual-dark .description-card {
    background: linear-gradient(135deg, rgba(37, 50, 80, 0.85) 0%, rgba(45, 35, 75, 0.85) 100%);
    border-color: rgba(108, 99, 255, 0.25);
}

body.manual-dark .description-list li {
    color: var(--text-color);
}

body.manual-dark .suggestion-item:hover,
body.manual-dark .suggestion-item.active {
    background: rgba(108, 99, 255, 0.15);
}

body.manual-dark .suggestion-item-name {
    color: var(--text-color);
}

body.manual-dark .dropdown-item-custom {
    color: var(--text-color);
    border-bottom-color: rgba(255, 255, 255, 0.04);
}

body.manual-dark .dropdown-item-custom:hover {
    background: rgba(108, 99, 255, 0.15);
    color: var(--primary-color);
}

body.manual-dark .dropdown-item-custom.selected {
    background: rgba(108, 99, 255, 0.15);
    color: var(--primary-color);
}

body.manual-dark .dropdown-selected {
    color: var(--text-color);
}

body.manual-dark .dropdown-selected:hover,
body.manual-dark .custom-dropdown.open .dropdown-selected {
    background: rgba(108, 99, 255, 0.15);
    color: var(--text-color);
}

body.manual-dark .minmax-pill {
    background: rgba(108, 99, 255, 0.18);
}

body.manual-dark .balance-warning {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
}

body.manual-dark .modal-overlay {
    background: rgba(0, 0, 0, 0.65);
}

body.manual-dark .suggestion-item {
    border-bottom-color: rgba(255, 255, 255, 0.04);
}

body.manual-dark .bottom-nav {
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

/* ── Telegram Light Mode ── */
body.tg-light {
    --background-color: #F0EEFF;
    --card-color: #FFFFFF;
    --text-color: #1E1B4B;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;
    --border-color: #E5E7EB;
    --primary-light: #EDE9FF;
    --shadow-sm: 0 2px 8px rgba(108, 99, 255, 0.08);
    --shadow-md: 0 8px 24px rgba(108, 99, 255, 0.14);
    --shadow-lg: 0 16px 48px rgba(108, 99, 255, 0.18);
}

/* ── Telegram Dark Mode ── */
body.tg-dark {
    --background-color: #1c1c1e;
    --card-color: #2c2c2e;
    --text-color: #f2f2f7;
    --text-muted: #aeaeb2;
    --text-light: #636366;
    --border-color: #3a3a3c;
    --primary-light: rgba(108, 99, 255, 0.18);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
}

/* Dark: description card */
body.tg-dark .description-card {
    background: linear-gradient(135deg, rgba(37, 50, 80, 0.85) 0%, rgba(45, 35, 75, 0.85) 100%);
    border-color: rgba(108, 99, 255, 0.25);
}

body.tg-dark .description-list li {
    color: var(--text-color);
}

/* Dark: suggestion item hover */
body.tg-dark .suggestion-item:hover,
body.tg-dark .suggestion-item.active {
    background: rgba(108, 99, 255, 0.15);
}

body.tg-dark .suggestion-item-name {
    color: var(--text-color);
}

/* Dark: dropdown item — always use theme text color */
body.tg-dark .dropdown-item-custom {
    color: var(--text-color);
    border-bottom-color: rgba(255, 255, 255, 0.04);
}

body.tg-dark .dropdown-item-custom:hover {
    background: rgba(108, 99, 255, 0.15);
    color: var(--primary-color);
}

body.tg-dark .dropdown-item-custom.selected {
    background: rgba(108, 99, 255, 0.15);
    color: var(--primary-color);
}

/* Dark: dropdown selected trigger */
body.tg-dark .dropdown-selected {
    color: var(--text-color);
}

body.tg-dark .dropdown-selected:hover,
body.tg-dark .custom-dropdown.open .dropdown-selected {
    background: rgba(108, 99, 255, 0.15);
    color: var(--text-color);
}

/* Dark: minmax pills */
body.tg-dark .minmax-pill {
    background: rgba(108, 99, 255, 0.18);
}

/* Dark: balance warning */
body.tg-dark .balance-warning {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
}

/* Dark: modal overlay */
body.tg-dark .modal-overlay {
    background: rgba(0, 0, 0, 0.65);
}

body.tg-dark .suggestion-item {
    border-bottom-color: rgba(255, 255, 255, 0.04);
}

/* Dark: nav shadow */
body.tg-dark .bottom-nav {
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

/* Dark: body radial gradient override */
body.tg-dark {
    background-image: none;
}


/* Search Bar (inside form card) */
.search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    font-size: 16px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

.search-bar input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background: var(--background-color);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    color: var(--text-color);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.search-bar input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

.search-bar input::placeholder {
    color: var(--text-light);
}

/* Search Suggestions Dropdown */
.search-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 300;
    background: var(--card-color);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 280px;
    overflow-y: auto;
    display: none;
}

.search-suggestions.visible {
    display: block;
}

.search-suggestions::-webkit-scrollbar {
    width: 4px;
}

.search-suggestions::-webkit-scrollbar-track {
    background: transparent;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

.suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: background var(--transition);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.active {
    background: var(--primary-light);
}

.suggestion-item-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    overflow: hidden;
}

.suggestion-item-top {
    display: flex;
    align-items: center;
    gap: 7px;
}

.suggestion-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: var(--text-muted);
}

.suggestion-cat-tag {
    background: var(--background-color);
    border-radius: var(--radius-full);
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 500;
    color: var(--primary-color);
    white-space: nowrap;
}

.suggestion-no-result {
    padding: 14px 16px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

/* ── 3. MAIN CONTENT ── */
/* padding-top: 16px — balance-card has its own margin-top: 60px for top-bar offset */
.main-content {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px 16px 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
}


/* ── 4. PROFILE & BALANCE CARD ── */
.balance-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #8B5CF6 100%);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-top: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 50%;
}

.balance-card::after {
    content: '';
    position: absolute;
    bottom: -40px;
    right: 30px;
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 50%;
}

/* LEFT side – profile */
.profile-section {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1;
}

.profile-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.6);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-name {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.1px;
    line-height: 1.2;
}

.profile-id {
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}


/* RIGHT side – balance */
.balance-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    z-index: 1;
}

.balance-label {
    color: rgba(255, 255, 255, 0.80);
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.balance-amount {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* ── 5. FORM CARD ── */
.form-card {
    background: var(--card-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ── 6. FORM GROUPS & LABELS ── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-label i {
    color: var(--primary-color);
}

/* ── 7. CUSTOM DROPDOWN ── */
.custom-dropdown {
    position: relative;
    outline: none;
}

.dropdown-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    background: var(--background-color);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    user-select: none;
}

.dropdown-selected:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.custom-dropdown.open .dropdown-selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
    background: var(--primary-light);
}

.dropdown-chevron {
    font-size: 14px;
    color: var(--text-muted);
    transition: transform var(--transition);
    flex-shrink: 0;
}

.custom-dropdown.open .dropdown-chevron {
    transform: rotate(180deg);
}

/* Service selected inner */
.service-selected-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    overflow: hidden;
}

.service-id-badge {
    background: var(--primary-color);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Dropdown Menu */
.dropdown-menu-custom {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--card-color);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    list-style: none;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.28s ease,
        transform 0.28s ease;
    transform: translateY(-6px);
    overflow-y: auto;
}

.custom-dropdown.open .dropdown-menu-custom {
    max-height: 280px;
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

/* Custom Scrollbar */
.dropdown-menu-custom::-webkit-scrollbar {
    width: 4px;
}

.dropdown-menu-custom::-webkit-scrollbar-track {
    background: transparent;
}

.dropdown-menu-custom::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

.dropdown-item-custom {
    padding: 12px 16px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), padding-left var(--transition);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.dropdown-item-custom:last-child {
    border-bottom: none;
}

.dropdown-item-custom:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    padding-left: 20px;
}

.dropdown-item-custom.selected {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

.category-emoji {
    font-size: 16px;
    flex-shrink: 0;
}

/* Service item layout */
.service-item-inner {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.service-item-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-item-id {
    background: var(--primary-color);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.service-item-name {
    font-size: 13px;
    font-weight: 600;
    color: inherit;
}

.service-item-meta {
    font-size: 11.5px;
    color: var(--text-muted);
    display: flex;
    gap: 10px;
}

/* ── 8. DESCRIPTION CARD ── */
.description-card {
    background: var(--card-color);
    background-image: linear-gradient(135deg, rgba(108, 99, 255, 0.09) 0%, rgba(139, 92, 246, 0.06) 100%);
    border: 1.5px solid rgba(108, 99, 255, 0.22);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    transition: all var(--transition);
}

.description-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color);
}

.description-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.description-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--text-color);
    font-weight: 400;
    line-height: 1.5;
}

.description-list li .bi-check-circle-fill {
    color: var(--success-color);
    flex-shrink: 0;
    font-size: 14px;
    margin-top: 2px;
}

/* ── 9. INPUTS ── */
.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 16px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

.form-input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    background: var(--background-color);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    color: var(--text-color);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
    -moz-appearance: textfield;
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

.form-input::placeholder {
    color: var(--text-light);
}

.form-input::-webkit-outer-spin-button,
.form-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

/* Min/Max Row */
.minmax-row {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.minmax-pill {
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: var(--radius-full);
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 3px;
}

.minmax-pill strong {
    font-weight: 700;
}

/* ── 10. PRICE SUMMARY ── */
.price-summary {
    background: var(--background-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.price-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.price-divider {
    height: 1px;
    background: var(--border-color);
    margin: 2px 0;
}

.total-row .price-label {
    font-weight: 700;
    color: var(--text-color);
}

.total-value {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--primary-color) !important;
    transition: color var(--transition);
}

.total-value.over-budget {
    color: var(--danger-color) !important;
}

/* ── 11. BALANCE WARNING ── */
.balance-warning {
    background: #FFF1F2;
    border: 1.5px solid #FECDD3;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--danger-color);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideDown 0.25s ease;
}

.hidden {
    display: none !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── 12. PLACE ORDER BUTTON ── */
.btn-place-order {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #8B5CF6 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.4);
}

.btn-place-order:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(108, 99, 255, 0.5);
}

.btn-place-order:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-place-order:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Spinner */
.spinner {
    width: 17px;
    height: 17px;
    border: 2.5px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── 13. RIPPLE EFFECT ── */
.ripple-btn {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0);
    animation: rippleAnim 0.55s linear;
    pointer-events: none;
}

@keyframes rippleAnim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ── 14. SUCCESS MODAL ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(30, 27, 75, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.25s ease;
}

.modal-overlay.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-card {
    background: var(--card-color);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modalPop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
    from {
        transform: scale(0.85) translateY(20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--success-color) 0%, #16A34A 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 34px;
    color: #fff;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
    letter-spacing: -0.4px;
}

.modal-message {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.modal-order-id {
    background: var(--background-color);
    border-radius: var(--radius-sm);
    padding: 10px;
    font-size: 13px;
    color: var(--text-color);
    margin-bottom: 20px;
    letter-spacing: 0.3px;
}

.modal-order-id strong {
    color: var(--primary-color);
}

.btn-modal-close {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #8B5CF6 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.4);
}

.btn-modal-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(108, 99, 255, 0.5);
}

/* ── 15. BOTTOM NAVIGATION ── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--card-color);
    display: flex;
    border-top: 1.5px solid var(--border-color);
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    box-shadow: 0 -4px 20px rgba(108, 99, 255, 0.10);
    height: var(--nav-height);
}

.nav-item {
    flex: 1;
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 10px;
    font-weight: 500;
    padding: 8px 4px;
    transition: color var(--transition), transform var(--transition);
    position: relative;
}

.nav-item:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item.active .nav-icon {
    background: var(--primary-light);
    border-radius: var(--radius-full);
}

.nav-icon {
    width: 38px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    border-radius: var(--radius-full);
    transition: background var(--transition);
}

.nav-label {
    letter-spacing: 0.2px;
}

/* Active indicator bar */
.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* ── 16. UTILITY ── */
.hidden {
    display: none !important;
}

/* ── 17. TABLET / DESKTOP CENTERING ── */
@media (min-width: 480px) {
    .main-content {
        padding: 16px 0 0;
    }

    .app-header {
        padding: 14px 24px 12px;
    }
}

@media (min-width: 768px) {
    .bottom-nav {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .app-header {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 0 0 var(--radius-md) var(--radius-md);
    }

    body {
        background-image: radial-gradient(ellipse at 60% 10%, rgba(108, 99, 255, 0.08) 0%, transparent 60%),
            radial-gradient(ellipse at 20% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 60%);
    }
}

/* ── 18. SCROLL BEHAVIOUR ── */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}