/* ============================================
   CSS VARIABLES (LIGHT & DARK THEME)
   ============================================ */
:root {
    /* Ozon Brand */
    --ozon-blue: #005BFF;
    --ozon-blue-hover: #0042CC;
    --ozon-bg: #F7F8FA;
    --ozon-text: #1A1A1A;
    --ozon-gray: #6B7280;

    /* Primary */
    --primary: #005bff;
    --primary-hover: #004ecc;
    --primary-light: #e8f0fe;

    /* Backgrounds */
    --bg: #f5f7fa;
    --bg-card: #ffffff;
    --card-bg: #ffffff;

    /* Text */
    --text-primary: #1a1f36;
    --text-secondary: #6b7280;

    /* Borders */
    --border: #e5e7eb;
    --border-color: #e5e7eb;

    /* Status Colors */
    --success: #10b981;
    --success-bg: #d1fae5;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --info: #3b82f6;
    --info-bg: #dbeafe;

    /* Marketplace Brands */
    --wb: #cb11ab;
    --wb-light: #f5e6f3;
    --ym: #fc3f1d;
    --ym-light: #ffe8e3;
    --ozon: #005bff;
    --ozon-light: #e8f0fe;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --shadow: 0 4px 20px rgba(0, 91, 255, 0.08);

    /* Radius */
    --radius: 16px;
    --radius-sm: 12px;

    /* Layout */
    --page-width: 1440px;
}
body
{
    overflow-y: scroll;
}
/* === DARK THEME === */
body.dark-theme {
    --bg: #0f0f12;
    --bg-card: #1a1b1f;
    --card-bg: #1a1b1f;
    --text-primary: #ffffff;
    --text-secondary: #8b8e99;
    --border: #2c2d30;
    --border-color: #2c2d30;
    --primary-light: rgba(0, 91, 255, 0.15);
    --success-bg: rgba(16, 185, 129, 0.15);
    --warning-bg: rgba(245, 158, 11, 0.15);
    --danger-bg: rgba(239, 68, 68, 0.15);
    --info-bg: rgba(59, 130, 246, 0.15);
    --wb-light: rgba(203, 17, 171, 0.15);
    --ym-light: rgba(252, 63, 29, 0.15);
    --ozon-light: rgba(0, 91, 255, 0.15);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.4);
    --shadow: 0 4px 20px rgba(0, 91, 255, 0.15);
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;

    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   HEADER (Ozon Style)
   ============================================ */
.ozon-header,
.top-nav {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-inner,
.nav-container {
    width: 100%;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: normal;
}

/* ============================================
   LOGO
   ============================================ */
.logo-link,
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    transition: opacity 0.2s;
    z-index: 102;
}

.logo-link:hover,
.logo:hover {
    opacity: 0.8;
}

.logo-link img {
    height: 36px;
    width: auto;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, #4facfe 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

/* ============================================
   HEADER ACTIONS & NAV RIGHT
   ============================================ */
.header-actions,
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-ozon,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-outline {
    background: transparent;
    color: var(--ozon-blue);
    border: 2px solid var(--ozon-blue);
}

.btn-outline:hover {
    background: rgba(0, 91, 255, 0.05);
}

.btn-primary {
    background: var(--primary);
    color: white;
    width: 100%;
    border: 0;
    display: flex;
    outline: none;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 400;
    cursor: pointer;
}

.btn-primary:active {
    background: var(--primary-hover);
    transform: scale(0.98);
}

/* ============================================
   THEME TOGGLE
   ============================================ */
.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    color: var(--text-primary);
}

.theme-toggle-btn:hover {
    border-color: var(--primary);

}

.theme-toggle-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ============================================
   NOTIFICATION BUTTON
   ============================================ */
.notification-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
    color: var(--text-primary);
}

.notification-btn:active {
    transform: scale(0.95);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--card-bg);
}

/* ============================================
   USER PROFILE
   ============================================ */
.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    background: var(--bg);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.user-profile:active,
.user-profile.active {
    background: var(--primary-light);
}

.avatar {
    width: 34px;
    height: 34px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ============================================
   PROFILE DROPDOWN
   ============================================ */
.profile-dropdown {
    display: none;
    position: absolute;
    top: 110%;
    right: 0;
    width: 240px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    overflow: hidden;
    animation: fadeIn 0.2s ease;
}

.profile-dropdown.active {
    display: block;
}

.dropdown-header {
    padding: 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.dropdown-phone {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
    cursor: pointer;
}

.dropdown-item:hover {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
}

.dropdown-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.dropdown-item.logout {
    color: var(--danger);
    border-top: 1px solid var(--border);
}

.dropdown-item.logout:hover {
    background: var(--danger-bg);
}

/* ============================================
   NAVIGATION MENU
   ============================================ */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    cursor: pointer;
    z-index: 102;
    background: none;
    border: none;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
    border-radius: 2px;
}

.nav-menu {
    display: flex;
    gap: 6px;
    list-style: none;
}

.nav-item {
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.nav-item:hover {
    background: var(--bg);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.nav-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ============================================
   MOBILE BOTTOM NAVIGATION
   ============================================ */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
    z-index: 100;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
}

.mobile-nav-list {
    display: flex;
    justify-content: space-around;
    list-style: none;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s;
}

.mobile-nav-item.active {
    color: var(--primary);
}

.mobile-nav-item:active {
    transform: scale(0.95);
}

.mobile-nav-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 10px;
    width: 100%;
}

.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.2;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.section.active {
    display: block;
}

.section-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 28px 0 16px;
}

.section-divider h2 {
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
}

.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ============================================
   HERO SECTION (Index Only)
   ============================================ */
.colorLink {
    color: #4362ff;
    transition: all 0.2s ease;
}

.colorLink:hover {
    color: #2c45a7 !important;
}

.colorBlockLink {
    background-color: rgb(51 113 252 / 5%) !important;
    transition: all 0.2s ease;
    border-radius: 6px;
    border: 1px solid transparent !important;
}

.colorBlockLink:hover {
    padding-left: 2px;
    background-color: rgb(50 110 235 / 9%) !important;
    border: 1px dashed rgba(50,110,235,0.9) !important;
}

.colorBlockLink:hover svg {
    fill: rgba(50,110,235,0.9);
}

.hero-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.hero-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.typewriter-container {
    font-size: 32px;
    font-weight: 700;
    color: var(--ozon-blue);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    margin-bottom: 40px;
}

.cursor {
    display: inline-block;
    width: 3px;
    height: 32px;
    background-color: var(--ozon-blue);
    margin-left: 4px;
    animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

.hero-content-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: center;
    text-align: left;
    max-width: 1200px;
    margin: 0 auto;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-primary);
}

.features-list li::before {
    content: '';
    display: block;
    min-width: 8px;
    height: 8px;
    background: var(--ozon-blue);
    border-radius: 50%;
    margin-top: 8px;
    margin-right: 14px;
}

.features-summary {
    margin-top: 24px;
    font-size: 16px;
    color: var(--text-secondary);
    background: var(--bg);
    padding: 16px;
    border-radius: 12px;
    border-left: 4px solid var(--ozon-blue);
}

/* Banner Carousel */
.banner-carousel-wrap {
    background: var(--card-bg);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
    height: 400px;
    border: 1px solid var(--border);
}

.banner {
    position: absolute;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
}

.banner-text {
    padding: 24px 32px;
    font-size: 20px;
    font-weight: 700;
    color: var(--ozon-blue);
    background: linear-gradient(to right, rgba(0,91,255,0.05), transparent);
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.stat-item {
    background: var(--card-bg);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

/* ============================================
   STATS GRID (Dashboard)
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--card-bg);
    padding: 16px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.stat-card:active {
    transform: scale(0.98);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.3;
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.orange { background: var(--warning-bg); color: var(--warning); }
.stat-icon.red { background: var(--danger-bg); color: var(--danger); }

.stat-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.stat-trend {
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 12px;
}

.trend-up { background: var(--success-bg); color: var(--success); }
.trend-down { background: var(--danger-bg); color: var(--danger); }
.trend-neutral { background: var(--bg); color: var(--text-secondary); }

/* ============================================
   CONTENT GRID & CARDS
   ============================================ */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
}

/* Chart */
.chart-container {
    height: 180px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-top: 16px;
    position: relative;
    gap: 4px;
}

.chart-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    height: 100%;
    justify-content: flex-end;
    gap: 8px;
}

.chart-bar {
    width: 100%;
    max-width: 40px;
    background: linear-gradient(180deg, var(--primary) 0%, #4facfe 100%);
    border-radius: 6px 6px 0 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    min-height: 4px;
}

.chart-bar:active {
    filter: brightness(1.1);
}

.chart-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Info List */
.info-list {
    list-style: none;
}

.info-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.info-item:last-child {
    border-bottom: none;
}

.info-icon {
    width: 18px;
    height: 18px;
    color: var(--success);
    flex-shrink: 0;
    margin-top: 2px;
}

.info-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
}

/* ============================================
   MARKETPLACE CARDS
   ============================================ */
.mp-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.mp-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.mp-card:active {
    transform: scale(0.98);
}

.mp-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.mp-card.wb::before { background: var(--wb); }
.mp-card.ym::before { background: var(--ym); }
.mp-card.ozon::before { background: var(--ozon); }

.mp-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.mp-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    color: white;
    flex-shrink: 0;
}

.mp-card.wb .mp-logo { background: var(--wb); }
.mp-card.ym .mp-logo { background: var(--ym); }
.mp-card.ozon .mp-logo { background: var(--ozon); }

.mp-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.mp-status {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.mp-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

.mp-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.mp-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mp-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.mp-stat-value {
    font-size: 18px;
    font-weight: 700;
}

.mp-stat-trend {
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.mp-stat-trend.up { color: var(--success); }
.mp-stat-trend.down { color: var(--danger); }

.mp-footer {
    padding-top: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mp-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mp-link:active {
    opacity: 0.7;
}

/* ============================================
   TABLES
   ============================================ */
.table-container {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);

}

.table-toolbar {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toolbar-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    background: var(--card-bg);
    color: var(--text-primary);
    transition: all 0.2s;
    -webkit-appearance: none;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.filter-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-tab:active {
    transform: scale(0.95);
}

.filter-tab.active {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

/* Mobile Table */
.mobile-table {
    display: none;
}

.mobile-table-card {
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.mobile-table-card:active {
    transform: scale(0.98);
}

.mobile-table-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.mobile-table-row:last-child {
    border-bottom: none;
}

.mobile-table-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.mobile-table-value {
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}

.mobile-table-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.mobile-table-img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: var(--bg);
    object-fit: cover;
}

.mobile-table-title {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
}

.mobile-table-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Desktop Table */
.desktop-table {
    display: block;
    overflow-x: auto;
    background-color: #FFF;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th {
    text-align: left;
    padding: 14px 20px;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
    background: var(--bg);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

td {
    padding: 14px 20px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:active td {
    background: var(--bg);
}

.product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--bg);
    object-fit: cover;
    flex-shrink: 0;
}

.product-name {
    font-weight: 600;
    margin-bottom: 3px;
    font-size: 13px;
    line-height: 1.2;
}

.product-category {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Badges */
.badge {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-wb { background: var(--wb-light); color: var(--wb); }
.badge-ym { background: var(--ym-light); color: var(--ym); }
.badge-ozon { background: var(--ozon-light); color: var(--ozon); }

.action-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.action-btn:active {
    background: var(--primary-light);
}

.order-number {
    font-weight: 600;
    color: var(--primary);
    font-size: 13px;
}

.mp-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.mp-tag.wb { background: var(--wb-light); color: var(--wb); }
.mp-tag.ym { background: var(--ym-light); color: var(--ym); }
.mp-tag.ozon { background: var(--ozon-light); color: var(--ozon); }

.mp-tag-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.mp-tag.wb .mp-tag-dot { background: var(--wb); }
.mp-tag.ym .mp-tag-dot { background: var(--ym); }
.mp-tag.ozon .mp-tag-dot { background: var(--ozon); }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
.logo
{
    flex-grow: 1;
}
@media (min-width: 768px) {
    .logo
    {
        flex-grow: 0;
    }
    .nav-menu
    {
        flex-grow: 1;
    }
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .content-grid {
        grid-template-columns: 2fr 1fr;
    }
    .mp-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .table-toolbar {
        flex-direction: row;
        align-items: center;
    }
    .toolbar-left {
        flex-direction: row;
        align-items: center;
        flex: 1;
    }
    .search-box {
        max-width: 360px;
    }
    .btn {
        width: auto;
    }
    .mobile-table {
        display: none;
    }
    .desktop-table {
        display: block;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .mp-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .hero-title { font-size: 32px; }
    .typewriter-container { font-size: 24px; }
    .hero-content-grid { grid-template-columns: 1fr; gap: 30px; }
    .banner-carousel-wrap { height: 300px; }
}

@media (max-width: 767px) {
    .menu-toggle { display: flex; }
    .nav-menu {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--card-bg);
        border-bottom: 1px solid var(--border);
        padding: 16px 20px;
        flex-direction: column;
        gap: 8px;
        box-shadow: var(--shadow-lg);
        z-index: 99;
    }
    .nav-menu.active { display: flex; }
    .nav-item { padding: 12px 16px; font-size: 15px; }
    .user-info { display: none; }
    .mobile-nav { display: block; }
    .main-content { padding: 10px; padding-bottom: 100px; }
    .page-title { font-size: 22px; }
    .stat-value { font-size: 20px; }
    .desktop-table { display: none; }
    .mobile-table { display: block; }
    .header-inner,
    .nav-container { padding: 0 16px; height: 60px; }
    .logo-link img { height: 28px; }
    .btn-ozon,
    .btn { padding: 8px 14px; font-size: 12px; }
    .hero-title { font-size: 26px; }
    .typewriter-container { font-size: 20px; min-height: 30px; }
    .cursor { height: 20px; }
    .banner-text { font-size: 16px; padding: 16px; }
}













     /* === LAYOUT: SIDEBAR + CONTENT === */
 .settings-layout {
     display: grid;
     grid-template-columns: 260px 1fr;
     gap: 24px;
     max-width: var(--page-width);
     margin: 0 auto;
     padding: 0;
 }

/* === SIDEBAR === */
.settings-sidebar {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    height: fit-content;
    position: sticky;
    top: 88px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.sidebar-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    padding: 8px 12px;
    margin-bottom: 4px;
}
.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}
.sidebar-item:hover {
    background: var(--bg);
    color: var(--primary);
}
.sidebar-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}
.sidebar-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
}

/* === CONTENT === */
.settings-content {
    min-width: 0;
}
.settings-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
}
.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    flex-shrink: 0;
}
.back-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-title { font-size: 24px; font-weight: 700; color: var(--text-primary); margin: 0; }

.settings-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.section-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.save-btn-container { margin-top: 24px; }
.btn-save {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;

    transition: all 0.2s;
    font-family: inherit;
}
.btn-save:hover { background: var(--primary-hover); }
.btn-save:active { transform: scale(0.98); }
.btn-save:disabled { background-color: var(--accent-disabled) !important; cursor: no-drop;}
/* === MOBILE: превращаем сайдбар в табы === */
@media (max-width: 900px) {
    .settings-layout {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0;
    }
    .settings-sidebar {
        position: static;
        padding: 8px;
    }
    .sidebar-title { display: none; }
    .sidebar-menu {
        flex-direction: row;
        overflow-x: auto;
        gap: 6px;
        padding-bottom: 4px;
        scrollbar-width: none;
    }
    .sidebar-menu::-webkit-scrollbar { display: none; }
    .sidebar-item {
        white-space: nowrap;
        padding: 10px 14px;
        font-size: 13px;
        flex-shrink: 0;
    }
    .sidebar-item svg { width: 18px; height: 18px; }
    .settings-card { padding: 16px; }
    .page-title { font-size: 20px; }
    .btn-save { max-width: 100%; }
}




      /* Основные стили layout */
  .settings-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; max-width: var(--page-width); margin: 0 auto; padding: 0; }
.settings-sidebar { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; height: fit-content; position: sticky; top: 88px; }
.sidebar-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); padding: 8px 12px; margin-bottom: 4px; }
.sidebar-menu { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.sidebar-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; color: var(--text-primary); text-decoration: none; font-size: 14px; font-weight: 500; transition: all 0.2s; cursor: pointer; }
.sidebar-item:hover { background: var(--bg); color: var(--primary); }
.sidebar-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.sidebar-item svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }

.settings-content { min-width: 0; }
.settings-header { display: flex; align-items: center; margin-bottom: 24px; gap: 16px; }
.back-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--card-bg); border: 1px solid var(--border); color: var(--text-primary); text-decoration: none; transition: all 0.2s; flex-shrink: 0; }
.back-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-title { font-size: 24px; font-weight: 700; color: var(--text-primary); margin: 0; }

.settings-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; transition: background-color 0.3s ease, border-color 0.3s ease; position: relative; }

/* Заголовок секции с бейджем и статусом */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.section-title-group { display: flex; align-items: center; gap: 10px; }
.section-title { font-size: 17px; font-weight: 700; color: var(--text-primary); margin: 0; }

.mp-badge { display: inline-flex; align-items: center; justify-content: center; padding: 3px 10px; border-radius: 6px; font-size: 14px; font-weight: 700; letter-spacing: 0.03em; }
.mp-badge.ozon { background: var(--ozon-light); color: var(--ozon); }
.mp-badge.wb { background: var(--wb-light); color: var(--wb); }
.mp-badge.ym { background: var(--ym-light); color: var(--ym); }

/* Индикатор статуса */
.connection-status { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 20px; background: #f0f0f0; color: #666; transition: all 0.3s; }
.connection-status.active { background: #e6fffa; color: #008060; border: 1px solid #b2f5ea; }
.connection-status.inactive { background: #fff5f5; color: #c53030; border: 1px solid #fed7d7; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 4px currentColor; }

/* Кнопка отключения */
.btn-disconnect { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); padding: 6px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; margin-left: 10px; transition: all 0.2s; }
.btn-disconnect:hover { border-color: #c53030; color: #c53030; background: #fff5f5; }

.save-btn-container { margin-top: 24px; }
.btn-save { background: var(--primary); color: #fff; border: none; border-radius: 12px; padding: 14px 32px; font-size: 15px; font-weight: 600; cursor: pointer; width: 100%;   transition: all 0.2s; font-family: inherit; }
.btn-save:hover { background: var(--primary-hover); }
.btn-save:active { transform: scale(0.98); }

/* Стили для выбора склада */
.btn-load-warehouses { background: var(--bg); border: 1px solid var(--border); color: var(--text-primary); padding: 8px 16px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500; margin-left: 10px; transition: all 0.2s; }
.btn-load-warehouses:hover { border-color: var(--primary); color: var(--primary); }
.warehouse-list { overflow-y: auto;max-height: 100px; margin-top: 15px; padding: 15px; background: var(--bg); border-radius: 8px; border: 1px solid var(--border); }
.warehouse-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,0.05); }
.warehouse-item:last-child { border-bottom: none; }
.warehouse-item input[type="radio"] { accent-color: var(--primary); width: 16px; height: 16px; cursor: pointer; }
.warehouse-name { font-size: 14px; color: var(--text-primary); }
.warehouse-id { font-size: 12px; color: var(--text-secondary); margin-left: auto; }
.no-warehouses-msg { color: var(--text-secondary); font-size: 14px;  }

@media (max-width: 900px) {
    .settings-layout { grid-template-columns: 1fr; gap: 16px; padding: 0; }
    .settings-sidebar { position: static; padding: 8px; }
    .sidebar-title { display: none; }
    .sidebar-menu {  overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
    .sidebar-menu::-webkit-scrollbar { display: none; }
    .sidebar-item { white-space: nowrap; padding: 10px 14px; font-size: 13px; flex-shrink: 0; }
    .settings-card { padding: 16px; }
    .section-header { align-items: flex-start; gap: 10px; }
}
