/* 
 * SMM Dashboard - Premium Luxury Dark Blue Theme
 * World-Class SaaS Design - Stripe/Linear/Notion Inspired
 * Deep Navy + Royal Blue Accents
 */

:root {
    /* === PREMIUM DARK BLUE SYSTEM === */

    /* Deep Dark Backgrounds */
    --bg-primary: #0B1220;
    --bg-panel: #101A2F;
    --bg-sidebar: #0E1730;
    --bg-card: #152349;
    --bg-hover: rgba(255, 255, 255, 0.08);
    --bg-input: #0E1730;

    /* Blue Accents */
    --btn-primary: #2563EB;
    --btn-hover: #1D4ED8;
    --accent-blue: #38BDF8;

    /* Text */
    --text-main: #FFFFFF;
    --text-secondary: #B8C2D9;
    --text-muted: #7C8CAB;
    --text-icons: #9DB3FF;

    /* Status */
    --success: #22C55E;
    --warning: #EAB308;
    --danger: #F43F5E;

    /* Borders & Effects */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(37, 99, 235, 0.3);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-blue: 0 4px 16px rgba(37, 99, 235, 0.25);
    --glow-soft: 0 0 20px rgba(56, 189, 248, 0.12);

    /* Radius */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 22px;
    --radius-full: 50px;

    /* Layout */
    --sidebar-width: 250px;
    --header-height: 70px;
    --auth-card-bg: rgba(15, 23, 42, 0.85);

    /* Spacing Scale */
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 20px;
    --space-xl: 24px;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === RESET === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Cairo', -apple-system, system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

/* === LAYOUT === */
.wrapper {
    display: flex;
    min-height: 100vh;
}

.main-content-wrapper {
    flex: 1;
    min-width: 0;
    /* Critical for preventing flex items from overflowing */
    margin-left: var(--sidebar-width);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

html[dir="rtl"] .main-content-wrapper {
    margin-left: 0;
    margin-right: var(--sidebar-width);
}

.sidebar {
    width: var(--sidebar-width) !important;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--bg-primary) !important;
    padding: 15px !important;
    z-index: 1040;
    transition: transform var(--transition);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1050;
    /* Above navbar, below sidebar */
    display: none;
    opacity: 0;
    transition: opacity var(--transition);
}

.sidebar-open .sidebar-overlay {
    display: block;
    opacity: 1;
}

html[dir="rtl"] .sidebar {
    left: auto;
    right: 0;
}

.sidebar-inner {
    background: var(--bg-sidebar) !important;
    height: calc(100vh - 30px) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    border: 1px solid var(--border-subtle) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden;
}

/* Profile Card */
.sidebar-profile {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(56, 189, 248, 0.04) 100%);
    margin: 14px;
    padding: 16px 12px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-accent);
}

.sidebar-profile a {
    display: block;
    transition: var(--transition);
}

.sidebar-profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 10px;
    background: linear-gradient(135deg, var(--btn-primary), var(--accent-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    border: 2px solid rgba(37, 99, 235, 0.25);
    box-shadow: var(--shadow-blue);
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-profile-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.sidebar-profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-profile-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.sidebar-profile-name:hover {
    color: var(--accent-blue);
}

.sidebar-profile-balance {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.sidebar-profile-balance:hover {
    background: var(--bg-hover);
}

.sidebar-profile-balance .amount {
    font-weight: 600;
    color: var(--accent-blue);
}

/* Sidebar Menu */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 14px 14px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    list-style: none;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    min-height: 44px;
    transition: var(--transition);
}

.sidebar-link:hover {
    background: var(--bg-hover);
    color: var(--text-main);
    transform: translateX(2px);
}

.sidebar-item.active .sidebar-link {
    background: linear-gradient(135deg, var(--btn-primary), var(--btn-hover));
    color: #fff;
    box-shadow: var(--shadow-blue);
    font-weight: 600;
}

.sidebar-icon {
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    color: var(--text-icons);
}

.sidebar-item.active .sidebar-icon {
    color: #fff;
}

/* === NAVBAR === */
.main-content-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
}

.navbar {
    height: var(--header-height);
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-subtle);
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    z-index: 1030;
    /* Navbar below sidebar but above content */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-xl);
    box-shadow: var(--shadow-md);
}

html[dir="rtl"] .navbar {
    left: 0;
    right: var(--sidebar-width);
}

@media (max-width: 992px) {
    .navbar {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
    }
}

.navbar-left,
.navbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.content {
    padding: var(--space-xl);
    padding-top: calc(var(--header-height) + var(--space-xl));
    flex: 1;
    width: 100%;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}

.balance-display {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid var(--border-accent);
    padding: 10px 20px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
    transition: var(--transition);
}

.balance-display:hover {
    background: rgba(37, 99, 235, 0.15);
    border-color: var(--btn-primary);
    transform: scale(1.02);
}

.balance-amount {
    color: var(--accent-blue);
    font-weight: 700;
}

.sidebar-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--text-main);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.sidebar-toggle:hover {
    background: var(--bg-hover);
}

/* === PREMIUM DASHBOARD CARDS === */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), var(--glow-soft);
    border-color: rgba(56, 189, 248, 0.15);
}

/* Dashboard Stats Cards - Luxury Design */
.totals .col-md-3,
.totals .col-xl-3,
.totals .col-lg-6 {
    margin-bottom: var(--space-lg);
}

.totals .card {
    height: 100%;
    min-height: 110px;
    display: flex;
    align-items: center;
    padding: 20px;
    border-radius: var(--radius-xl);
    background: #152349 !important;
    /* Force visible background */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: var(--shadow-md);
    transition: var(--transition-slow);
}

.totals .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--glow-soft);
    border-color: rgba(37, 99, 235, 0.25);
}

.totals-block__card {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
}

.totals-block__icon-preview {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(56, 189, 248, 0.15));
    border: 2px solid rgba(37, 99, 235, 0.25);
    box-shadow: var(--shadow-blue), var(--glow-soft);
    transition: var(--transition);
}

.totals .card:hover .totals-block__icon-preview {
    transform: scale(1.08);
    box-shadow: var(--shadow-blue), 0 0 25px rgba(56, 189, 248, 0.25);
}

.totals-block__icon {
    font-size: 20px;
    color: var(--accent-blue);
}

.totals-block__card-right {
    flex: 1;
    min-width: 0;
}

.totals-block__count-value {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 6px 0;
    line-height: 1;
    letter-spacing: -0.02em;
}

.totals-block__card-name {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

.card.h-100 {
    height: 100% !important;
}

.card-body {
    padding: 0;
    display: flex;
    align-items: center;
    width: 100%;
}

/* === FORMS === */
.form-control {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    min-height: 48px;
    width: 100%;
    color: var(--text-main);
    font-size: 15px;
    transition: var(--transition);
}

.form-control:hover {
    border-color: rgba(37, 99, 235, 0.25);
}

.form-control:focus {
    outline: none;
    border-color: var(--btn-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background: var(--bg-card);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 14px 24px;
    min-height: 48px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--btn-primary), var(--btn-hover));
    color: #fff;
    box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-accent);
    transform: scale(1.02);
}

/* === TABLES === */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.table th {
    background: var(--bg-input);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody tr {
    background: var(--bg-card);
    transition: var(--transition-fast);
}

.table tbody tr:nth-child(even) {
    background: rgba(21, 35, 73, 0.5);
}

.table tbody tr:hover {
    background: var(--bg-hover);
}

/* === BADGES === */
.badge {
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-completed {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-processing {
    background: rgba(37, 99, 235, 0.15);
    color: var(--accent-blue);
    border: 1px solid rgba(37, 99, 235, 0.3);
}

.badge-pending {
    background: rgba(234, 179, 8, 0.15);
    color: var(--warning);
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.badge-cancelled {
    background: rgba(244, 63, 94, 0.15);
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.3);
}

/* === NEW ORDER PAGE === */

/* Platform Selection Buttons */
.platforms {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 25px 0;
    justify-content: center;
}

.platform-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 22px;
    min-height: 46px;
    border-radius: 50px;
    background: rgba(21, 35, 73, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    color: #94a3b8;
    white-space: nowrap;
}

.platform-btn:hover {
    transform: translateY(-2px);
    background: rgba(30, 41, 59, 0.8);
    border-color: var(--accent-blue);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.platform-btn .platform-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.platform-btn svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* === UTILITIES === */
.text-primary {
    color: var(--text-main) !important;
}

.platform-btn.is-active {
    background: linear-gradient(135deg, var(--btn-primary), var(--btn-hover));
    border-color: var(--btn-primary);
    color: #fff;
    box-shadow: var(--shadow-blue);
}

.platform-btn img {
    width: 20px;
    height: 20px;
}

/* Form & Notes Layout */
.new-order-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

.form-panel,
.notes-panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
}

.panel-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.panel-title i {
    color: var(--accent-blue);
    font-size: 1.25rem;
}

/* Form Groups */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Select Dropdowns */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23B8C2D9' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

select.form-control:hover {
    border-color: var(--border-accent);
}

/* Textarea */
textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Search Bar Enhancement */
.search-wrapper {
    position: relative;
    margin-bottom: var(--space-lg);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
    pointer-events: none;
}

.search-wrapper .form-control {
    padding-left: 48px;
}

/* Service Description Box */
.service-description-box {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-top: var(--space-lg);
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.9rem;
}

.service-description-box strong {
    color: var(--text-main);
}

/* Price Display */
.price-display {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(56, 189, 248, 0.05));
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-top: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.price-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-blue);
}

/* === RESPONSIVENESS OVERHAUL === */

@media (max-width: 991.98px) {
    :root {
        --sidebar-width: 260px;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    html[dir="rtl"] .sidebar {
        transform: translateX(100%);
    }

    .sidebar-open .sidebar {
        transform: translateX(0);
    }

    .main-content-wrapper,
    .navbar {
        margin-left: 0 !important;
        left: 0 !important;
    }

    html[dir="rtl"] .main-content-wrapper,
    html[dir="rtl"] .navbar {
        margin-right: 0 !important;
        right: 0 !important;
    }

    .sidebar-toggle {
        display: flex !important;
    }

    .content {
        padding: var(--space-md);
        padding-top: calc(var(--header-height) + var(--space-md));
    }

    .page-hero {
        padding: 40px 15px !important;
    }

    .page-hero .title {
        font-size: 1.75rem !important;
    }

    .container,
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Fix for internal "wrapper-content" squashing */
.wrapper-content {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

.wrapper-content__body {
    padding: 0 !important;
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1090;
    display: none;
}

.sidebar-open .sidebar-overlay {
    display: block;
}

/* Tablet refinements */
@media (min-width: 992px) and (max-width: 1200px) {
    :root {
        --sidebar-width: 240px;
    }
}

/* Fix content alignment in RTL */
html[dir="rtl"] .text-left {
    text-align: right !important;
}

html[dir="rtl"] .ml-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

/* === PUBLIC NAVBAR (Landing Page) === */
.dropdown-menu {
    z-index: 1051;
    background: var(--dropdown-bg, rgba(30, 41, 59, 0.98));
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-xs);
    box-shadow: var(--shadow-xl);
    color: var(--text-primary, #e2e8f0) !important;
}

.dropdown-item {
    color: var(--text-primary, #e2e8f0) !important;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

/* === CURRENCY DROPDOWN STYLING === */
.balance-dropdown-container {
    position: relative;
}

.balance-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.balance-display:hover {
    background: var(--bg-hover);
    border-color: var(--border-accent);
}

.balance-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.balance-amount {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
}

.balance-dropdown__container {
    min-width: 200px;
    padding: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-top: 8px;
}

.currencies-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 0.95rem;
}

.currencies-item:hover {
    background: var(--bg-hover);
    color: var(--accent-blue);
    transform: translateX(4px);
}

.currencies-item:last-child {
    margin-bottom: 0;
}

/* Mobile Responsive Fixes for Currency Dropdown */
@media (max-width: 768px) {

    /* Fix navbar spacing on mobile */
    .navbar {
        padding: 0 12px;
        height: auto;
        min-height: 60px;
    }

    /* Fix balance display on mobile */
    .balance-display {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .balance-label {
        font-size: 0.75rem;
    }

    .balance-amount {
        font-size: 0.9rem;
    }

    /* Fix dropdown positioning on mobile */
    .balance-dropdown__container {
        position: fixed !important;
        right: 12px;
        left: auto;
        top: 65px !important;
        min-width: 180px;
        max-width: calc(100vw - 24px);
    }

    /* RTL fix for mobile */
    html[dir="rtl"] .balance-dropdown__container {
        right: auto;
        left: 12px;
    }

    /* Ensure dropdown items are readable on mobile */
    .currencies-item {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    /* Navbar items spacing */
    .navbar-right {
        gap: 8px;
    }
}

.dropdown-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary, #3b82f6) !important;
}

.auth-card {
    background: var(--auth-card-bg) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(37, 99, 235, 0.1);
    position: relative;
    z-index: 10;
}

.auth-page .input-group-text {
    background: rgba(0, 0, 0, 0.2) !important;
    color: var(--accent-blue);
    border: 1px solid var(--border-subtle);
}

.auth-page .form-control {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--border-subtle) !important;
}

.auth-page .form-control:focus {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--btn-primary) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.public-navbar {
    background: rgba(11, 18, 32, 0.8) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 15px 0;
    transition: var(--transition);
}

.public-navbar .navbar-brand img {
    max-height: 40px;
    width: auto;
}

.public-navbar .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 10px 20px !important;
    transition: var(--transition-fast);
}

.public-navbar .nav-link:hover,
.public-navbar .nav-link.active {
    color: var(--accent-blue) !important;
}

.public-navbar .navbar-toggler {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.public-main {
    padding-top: 0;
    /* Let hero sections handle their own top padding if needed */
}

/* Submit Button Enhancement */
.btn-submit {
    width: 100%;
    min-height: 54px;
    font-size: 16px;
    font-weight: 600;
    margin-top: var(--space-xl);
    background: linear-gradient(135deg, var(--btn-primary), var(--btn-hover));
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Notes Panel Styling */
.notes-panel {
    background: linear-gradient(135deg, rgba(21, 35, 73, 0.8), rgba(14, 23, 48, 0.9));
}

.note-item {
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
    border-left: 3px solid var(--accent-blue);
}

.note-item:last-child {
    margin-bottom: 0;
}

.note-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(37, 99, 235, 0.15);
    border-radius: 50%;
    margin-right: var(--space-sm);
    color: var(--accent-blue);
    font-size: 12px;
}

/* Input Validation States */
.form-control.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.15);
}

.form-control.success {
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.error-message {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: var(--space-xs);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Loading State */
.btn-submit.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-submit.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    display: inline-block;
    margin-left: var(--space-sm);
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Tablet refinements */
@media (min-width: 992px) and (max-width: 1200px) {
    :root {
        --sidebar-width: 240px;
    }
}

@media (max-width: 767px) {
    .totals .col-md-3 {
        width: 100%;
        flex: 0 0 100%;
    }

    .btn {
        width: 100%;
    }

    /* New Order Page Responsive */
    .new-order-container {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .platforms {
        flex-direction: column;
    }

    .platform-btn {
        width: 100%;
        justify-content: center;
    }

    .form-panel,
    .notes-panel {
        padding: var(--space-md);
    }

    .price-display {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 950;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(8px);
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1f3a6e;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === CURRENCY CONVERTER DROPDOWN - CRITICAL === */
.navbar-item.dropdown {
    position: relative !important;
    z-index: 1050;
}

.dropdown-menu {
    display: none !important;
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    background: #152349 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
    min-width: 200px !important;
    padding: 12px 0 !important;
    z-index: 1051;
}

.dropdown.show .dropdown-menu,
.dropdown-menu.show {
    display: block !important;
}

/* === FINAL MOBILE UI FIXES === */
@media (max-width: 767.98px) {

    /* 1. Fix Platform Buttons Grid */
    .platforms {
        display: flex !important;
        flex-wrap: wrap !important;
        flex-direction: row !important;
        gap: 8px !important;
        justify-content: flex-start !important;
    }

    .platforms-item {
        width: calc(33.33% - 6px) !important;
        /* 3 items per row */
        max-width: none !important;
        flex: 0 0 calc(33.33% - 6px) !important;
    }

    .platform-btn {
        width: 100% !important;
        flex-direction: column !important;
        /* Icon top, Text bottom */
        padding: 8px 4px !important;
        height: 70px !important;
        /* Fixed height for uniformity */
        justify-content: center !important;
        border-radius: 10px !important;
    }

    .platform-btn .platform-icon {
        margin-right: 0 !important;
        margin-bottom: 5px !important;
    }

    .platform-btn .platform-icon svg {
        width: 20px !important;
        height: 20px !important;
    }

    .platform-title {
        font-size: 10px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block !important;
    }

    /* 2. Fix Totals Cards */
    .totals-block__card {
        padding: 10px !important;
        flex-direction: column !important;
        text-align: center !important;
        min-height: 100px !important;
        justify-content: center !important;
        border-radius: 12px !important;
    }

    .totals-block__icon-preview {
        margin-bottom: 8px !important;
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
        margin-right: 0 !important;
    }

    .totals-block__card-right {
        margin-left: 0 !important;
        padding-left: 0 !important;
        text-align: center !important;
    }

    .totals-block__count-value {
        font-size: 14px !important;
        margin-bottom: 2px !important;
        text-align: center !important;
    }

    .totals-block__card-name p {
        font-size: 11px !important;
        margin-bottom: 0 !important;
        text-align: center !important;
    }
}

/* === ORDERS & SERVICES PAGE STYLES === */
.orders-page .page-hero,
.services-page .page-hero {
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(30, 58, 138, 0.1) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    margin-bottom: 30px;
}

.orders-page .title,
.services-page .title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
}

.orders-tabs-nav {
    gap: 10px;
}

.orders-tabs-nav .nav-link {
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.2s;
    background: transparent;
}

.orders-tabs-nav .nav-link:hover,
.orders-tabs-nav .nav-link.active {
    color: #fff;
    background: var(--btn-primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.orders-tabs-nav .nav-link i {
    margin-left: 0 !important;
    margin-right: 8px;
}


/* Services Page Platform Filters */
.platform-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.platform-filter-btn {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.platform-filter-btn:hover,
.platform-filter-btn.active {
    background: var(--btn-primary);
    color: #fff;
    border-color: var(--btn-primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    transform: translateY(-2px);
}

.platform-filter-btn i {
    font-size: 1.1em;
}

@media (max-width: 767px) {
    .platform-buttons-container {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
    }

    .platform-filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* Table Enhancements */
.orders-table,
.responsive-table {
    width: 100%;
    margin-bottom: 0;
    color: var(--text-main);
    border-collapse: separate;
    border-spacing: 0;
}

.orders-table th,
.responsive-table th {
    background: rgba(15, 23, 42, 0.5);
    padding: 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-subtle);
}

.orders-table td,
.responsive-table td {
    padding: 15px;
    vertical-align: middle;
    background: rgba(30, 41, 59, 0.3);
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.95rem;
}

.orders-table tr:hover td,
.responsive-table tr:not(.services-list-category-title):hover td {
    background: rgba(30, 41, 59, 0.6);
}

.text-highlight {
    color: var(--accent-blue);
}

.status-completed {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.status-pending {
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.status-inprogress {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.status-processing {
    background: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.status-partial {
    background: rgba(234, 179, 8, 0.2);
    color: #facc15;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.status-canceled {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.status-answered {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.status-closed {
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.status-userreply {
    background: rgba(234, 179, 8, 0.2);
    color: #facc15;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
}

/* Responsive Table (Card View) */
@media (max-width: 991px) {
    .orders-tabs-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
        justify-content: flex-start !important;
    }

    .orders-tabs-nav .nav-item {
        white-space: nowrap;
    }

    .orders-table thead,
    .responsive-table thead {
        display: none;
    }

    .orders-table,
    .orders-table tbody,
    .orders-table tr,
    .orders-table td,
    .responsive-table,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
        width: 100%;
    }

    .orders-table tr,
    .responsive-table tr {
        margin-bottom: 20px;
        background: var(--bg-card) !important;
        border-radius: 12px;
        border: 1px solid var(--border-subtle);
        overflow: hidden;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    /* Preserve category title look */
    .responsive-table tr.services-list-category-title {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        margin-bottom: 10px;
        margin-top: 10px;
    }

    .responsive-table tr.services-list-category-title td {
        background: transparent !important;
        border: none !important;
        padding: 5px 0 !important;
        display: block !important;
        text-align: right !important;
    }

    .responsive-table tr.services-list-category-title td div {
        background: var(--btn-primary);
        color: #fff;
        padding: 10px 15px;
        border-radius: 8px;
        display: block;
    }

    .orders-table td,
    .responsive-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 12px 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        min-height: 50px;
    }

    .orders-table td:last-child,
    .responsive-table td:last-child {
        border-bottom: none;
        justify-content: center;
        padding-top: 15px;
        background: rgba(0, 0, 0, 0.1);
    }

    .orders-table td::before,
    .responsive-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-secondary);
        font-size: 0.85rem;
        margin-left: 20px;
        text-transform: uppercase;
    }

    /* Special handling for specific columns */
    .orders-table td[data-label="Actions"]::before,
    .responsive-table td[data-label="Details"]::before {
        display: none;
    }

    .link-truncate {
        max-width: 200px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }
}