/* ===== ОСНОВНЫЕ ПЕРЕМЕННЫЕ ===== */
:root {
    --primary: #8b5cf6;
    --primary-light: #c4b5fd;
    --primary-dark: #6d4aff;
    --secondary: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1f2937;
    --gray-dark: #374151;
    --gray: #6b7280;
    --gray-light: #e5e7eb;
    --light: #f9fafb;
    --white: #ffffff;
    --verified: #3b82f6;
    --neon-primary: rgba(139, 92, 246, 0.6);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --radius-sm: 4px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ===== ШАПКА ===== */
.header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow: hidden;
}
.header::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(45deg, var(--primary-light), var(--primary), var(--primary-light));
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}
.header:hover { box-shadow: 0 0 20px var(--neon-primary); }
.header:hover::before { opacity: 0.8; animation: neon-pulse 1.5s infinite; }
@keyframes neon-pulse {
    0% { opacity: 0.4; }
    50% { opacity: 0.8; }
    100% { opacity: 0.4; }
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}
.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}
.logo:hover a { background-color: rgba(255, 255, 255, 0.1); }
.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transition: all 0.2s;
}
.logo:hover .logo-text {
    text-shadow: 0 0 20px var(--neon-primary), 0 0 30px var(--neon-primary);
    color: var(--primary-light);
    transform: scale(1.05);
}
.header-slogan {
    display: flex;
    align-items: center;
    margin-left: 2px;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 500px;
    text-shadow: 0 0 5px var(--neon-primary), 0 0 10px var(--neon-primary);
    transition: text-shadow 0.2s;
}
.header-slogan:hover {
    text-shadow: 0 0 10px var(--neon-primary), 0 0 20px var(--neon-primary), 0 0 30px var(--neon-primary);
}
.header-slogan-text { font-weight: 700; color: white; }
@media (max-width: 992px) { .header-slogan { display: none; } }

.nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
    flex-wrap: wrap;
}
.nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.nav a:hover {
    color: var(--primary-dark);
    background-color: white;
    box-shadow: 0 0 15px white;
}
.nav .active {
    color: var(--primary-dark);
    background-color: white;
    font-weight: 600;
}
.icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: white;
    transition: all 0.2s ease;
    border-radius: 50%;
    position: relative;
}
.icon-link:hover {
    color: var(--primary-light);
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.1);
}
.icon { width: 24px; height: 24px; display: block; }
.cart-link { position: relative; }
.cart-count {
    position: absolute;
    top: -2px; right: -2px;
    background-color: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
    z-index: 2;
}
.cart-count.cart-count-bump { animation: cartBump 0.4s ease-out; }
@keyframes cartBump {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.6); }
    100% { transform: scale(1); }
}

.user-info {
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    color: #fff;
    font-weight: 500;
    font-size: 0.9rem;
}

/* ===== КНОПКИ ===== */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}
.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 0 15px var(--neon-primary);
}
.btn-secondary {
    background-color: var(--white);
    color: var(--gray-dark);
    border: 1px solid var(--gray-light);
}
.btn-secondary:hover {
    background-color: var(--gray-light);
    box-shadow: 0 0 10px var(--gray-light);
}
.btn-success { background-color: var(--secondary); color: white; }
.btn-success:hover {
    background-color: #059669;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
}
.btn-danger { background-color: var(--danger); color: white; }
.btn-danger:hover { background-color: #dc2626; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-lg { padding: 14px 28px; font-size: 1.1rem; }

.btn-checkout {
    background-color: #28a745 !important;
    color: #ffffff !important;
    border-color: #28a745 !important;
}
.btn-checkout:hover {
    background-color: #1e7e34 !important;
    border-color: #1e7e34 !important;
}
.btn-added {
    background-color: #e9ecef !important;
    color: #495057 !important;
    border-color: #e9ecef !important;
    cursor: default !important;
}
.add-to-cart {
    pointer-events: auto !important;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* ===== ФИЛЬТРЫ ===== */
.filter-form {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid var(--gray-light);
}
.filter-row { display: flex; gap: 15px; margin-bottom: 10px; flex-wrap: wrap; }
.filter-group { flex: 1 1 180px; }
.filter-group label {
    display: block;
    margin-bottom: 3px;
    font-weight: 500;
    color: var(--gray-dark);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.filter-group input,
.filter-group select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: border-color 0.2s;
}
.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
}
.filter-group small {
    display: block;
    margin-top: 3px;
    color: var(--gray);
    font-size: 0.7rem;
}
.filter-actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    justify-content: flex-end;
}
.filter-actions .btn { padding: 6px 16px; font-size: 0.9rem; }

/* ===== УПРАВЛЕНИЕ КОЛИЧЕСТВОМ ===== */
.per-page-control {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}
.per-page-control select {
    padding: 5px 10px;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    background-color: var(--white);
}

/* ===== КАРТОЧКИ НОМЕРОВ ===== */
.numbers-grid { display: flex; flex-direction: column; gap: 6px; margin: 20px 0; }
.number-card {
    background: transparent;
    border: none;
    padding: 6px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    transition: all 0.2s;
    border-bottom: 1px dashed rgba(139, 92, 246, 0.2);
}
.number-card:hover { background: rgba(139, 92, 246, 0.02); }
.number-info { display: flex; align-items: center; gap: 15px; flex: 1; flex-wrap: wrap; }
.number-number {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    min-width: 120px;
    transition: text-shadow 0.2s;
}
.number-card:hover .number-number { text-shadow: 0 0 8px var(--neon-primary); }
.number-price {
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-dark);
    min-width: 80px;
    transition: text-shadow 0.2s;
}
.number-card:hover .number-price { text-shadow: 0 0 8px var(--neon-primary); }
.number-operator { display: flex; align-items: center; gap: 8px; min-width: 70px; }
.operator-logo {
    max-height: 20px;
    width: auto;
    transition: filter 0.2s;
}
.number-card:hover .operator-logo { filter: drop-shadow(0 0 6px var(--neon-primary)); }
.operator-name { font-weight: 400; color: var(--gray); font-size: 0.9rem; }
.number-region { color: var(--gray); font-size: 0.9rem; min-width: 110px; }
.number-seller {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 100px;
    font-size: 0.9rem;
}
.seller-gigafon { font-weight: 500; color: var(--primary); }
.seller-dealer { font-weight: 500; color: var(--gray-dark); }
.verified-badge { color: var(--verified); font-size: 1rem; margin-left: 3px; }
.number-card:hover .seller-gigafon,
.number-card:hover .seller-dealer { text-shadow: 0 0 8px var(--neon-primary); }
.card-actions {
    display: flex;
    gap: 8px;
    min-width: 160px;
    justify-content: flex-end;
    flex-shrink: 0;
}
.card-actions .btn { padding: 5px 12px; font-size: 0.85rem; white-space: nowrap; }

/* ===== КАРТОЧКИ ТАРИФОВ ===== */
.tariffs-grid { display: flex; flex-direction: column; gap: 6px; margin: 20px 0; }
.tariff-card {
    background: transparent;
    border: none;
    padding: 6px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    transition: all 0.2s;
    border-bottom: 1px dashed rgba(139, 92, 246, 0.2);
}
.tariff-card:hover { background: rgba(139, 92, 246, 0.02); }
.tariff-info { display: flex; align-items: center; gap: 15px; flex: 1; flex-wrap: wrap; }
.tariff-image-small {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}
.tariff-image-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.2s;
}
.tariff-card:hover .tariff-image-small img { filter: drop-shadow(0 0 6px var(--neon-primary)); }
.tariff-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    min-width: 120px;
}
.tariff-card:hover .tariff-name { text-shadow: 0 0 8px var(--neon-primary); }
.tariff-price {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-dark);
    min-width: 90px;
}
.tariff-card:hover .tariff-price { text-shadow: 0 0 8px var(--neon-primary); }
.tariff-setup-price {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--primary);
    min-width: 70px;
}
.tariff-operator { display: flex; align-items: center; gap: 8px; min-width: 70px; }
.tariff-operator .operator-logo { max-height: 20px; }
.tariff-card:hover .tariff-operator .operator-logo { filter: drop-shadow(0 0 6px var(--neon-primary)); }
.tariff-conditions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--gray-dark);
    font-size: 0.85rem;
}
.condition {
    background-color: transparent;
    color: var(--gray);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 400;
    border: 1px solid rgba(139, 92, 246, 0.2);
}
.tariff-card:hover .condition {
    border-color: var(--neon-primary);
    color: var(--dark);
}
.tariff-region { color: var(--gray); font-size: 0.85rem; min-width: 100px; }
.tariff-seller {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 100px;
    font-size: 0.85rem;
}
.tariff-card:hover .tariff-seller .seller-gigafon,
.tariff-card:hover .tariff-seller .seller-dealer { text-shadow: 0 0 8px var(--neon-primary); }

/* ===== КНОПКА ПОКАЗАТЬ БОЛЬШЕ ===== */
.show-more { text-align: center; margin: 30px 0; }
.show-more .btn { padding: 12px 30px; font-size: 1rem; }

/* ===== ПАГИНАЦИЯ ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 30px 0;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 12px;
    background-color: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    color: var(--gray-dark);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.pagination a:hover {
    background-color: var(--primary-light);
    color: white;
    border-color: var(--primary);
}
.pagination .active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}
.pagination .disabled {
    color: var(--gray);
    pointer-events: none;
    opacity: 0.5;
}

/* ===== КАРУСЕЛЬ БАННЕРОВ ===== */
.banner-carousel-section {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--light) 0%, #f0f2f5 100%);
}
.banner-carousel-section h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: var(--primary);
}
.carousel-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    padding: 0 40px;
}
.carousel-track {
    display: flex;
    transition: transform 0.3s ease;
    gap: 20px;
}
.carousel-slide {
    flex: 0 0 auto;
    width: 240px;
    height: 240px;
    list-style: none;
}
.carousel-slide a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}
.carousel-slide.feature-card {
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 0;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}
.carousel-slide.feature-card::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(45deg, var(--primary-light), var(--primary), var(--primary-light));
    border-radius: calc(var(--radius) + 2px);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}
.carousel-slide.feature-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px -5px rgba(139, 92, 246, 0.4);
    border-color: var(--primary);
}
.carousel-slide.feature-card:hover::before {
    opacity: 1;
    animation: neon-pulse 1.5s infinite;
}
.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.banner-title {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 8px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}
.carousel-slide:hover .banner-title { opacity: 1; }
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--white);
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow);
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    transition: all 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}
.carousel-arrow:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px var(--neon-primary);
    transform: translateY(-50%) scale(1.1);
}
.carousel-prev { left: 0; }
.carousel-next { right: 0; }

/* ===== ЗАГЛУШКА ДЛЯ БАННЕРОВ ===== */
.banner-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f2f5, #e0e4e8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 1rem;
    text-align: center;
    border-radius: var(--radius);
}
.banner-placeholder small { font-size: 0.8rem; margin-top: 5px; }

/* ===== КАРУСЕЛЬ ТАРИФОВ ===== */
.tariff-card.carousel-slide {
    width: 240px;
    height: 300px;
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}
.tariff-card.carousel-slide::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(45deg, var(--primary-light), var(--primary), var(--primary-light));
    border-radius: calc(var(--radius) + 2px);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}
.tariff-card.carousel-slide:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px -5px rgba(139, 92, 246, 0.4);
    border-color: var(--primary);
}
.tariff-card.carousel-slide:hover::before {
    opacity: 1;
    animation: neon-pulse 1.5s infinite;
}
.tariff-card.carousel-slide a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
}
.tariff-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tariff-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f2f5, #e0e4e8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 1rem;
    text-align: center;
    border-radius: var(--radius);
}
.tariff-placeholder small { font-size: 0.8rem; margin-top: 5px; }
.tariff-caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 8px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}
.tariff-card.carousel-slide:hover .tariff-caption { opacity: 1; }

/* ===== БЛОК БЫСТРОГО ПОИСКА ===== */
.quick-search-section {
    padding: 40px 0;
    background: linear-gradient(135deg, var(--light) 0%, #f0f2f5 100%);
}
.mask-input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}
.mask-def, .mask-number { display: flex; align-items: center; gap: 15px; }
.mask-label { font-weight: 600; color: var(--gray-dark); font-size: 1rem; }
.mask-def-boxes, .mask-number-boxes { display: flex; gap: 8px; }
.mask-digit {
    width: 50px;
    height: 50px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
    background-color: var(--white);
    transition: all 0.2s;
    outline: none;
    box-shadow: 0 0 0 0 var(--neon-primary);
}
.mask-digit:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--neon-primary);
}
.mask-digit:hover { border-color: var(--primary-light); }
.mask-hint { text-align: center; margin-top: 15px; color: var(--gray); }
#mask-search-btn { padding: 12px 30px; font-size: 1rem; }

/* ===== ФОРМЫ АВТОРИЗАЦИИ ===== */
.auth-form {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    padding: 30px 25px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.auth-form h1 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--primary);
    font-size: 2rem;
}
.auth-form .form-group { margin-bottom: 20px; }
.auth-form .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--gray-dark);
    font-size: 0.9rem;
}
.auth-form .form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background-color: var(--light);
    font-size: 1rem;
    transition: box-shadow 0.2s, border-color 0.2s;
    box-shadow: 0 0 0 0 var(--neon-primary);
}
.auth-form .form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--neon-primary);
}
.auth-form .form-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
}
.auth-form .btn-primary { flex: 1; padding: 12px; font-size: 1rem; }
.auth-links { margin-top: 20px; text-align: center; color: var(--gray); }
.auth-links a { color: var(--primary); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

.btn-yandex-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: #fc3f1d;
    border-radius: var(--radius);
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.5rem;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(252, 63, 29, 0.3);
}
.btn-yandex-icon:hover {
    background-color: #d83212;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(252, 63, 29, 0.5);
}
.yandex-icon {
    font-family: Arial, sans-serif;
    line-height: 1;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
}

/* ===== ФУТЕР ===== */
.footer {
    background-color: var(--dark);
    color: var(--gray-light);
    padding: 30px 0;
    margin-top: auto;
}
.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.footer-contacts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}
.contact-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-light);
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.95rem;
}
.contact-link:hover { color: var(--primary-light); }
.contact-link .icon { width: 20px; height: 20px; }
.footer-copyright { text-align: center; font-size: 0.9rem; }
.footer-copyright a { color: var(--primary-light); text-decoration: none; }
.footer-copyright a:hover { text-decoration: underline; }
@media (min-width: 768px) {
    .footer-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .footer-contacts { justify-content: flex-start; }
}

/* ===== АДМИНКА ===== */
.admin-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.admin-header {
    background-color: var(--dark);
    color: white;
    padding: 10px 0;
    border-bottom: 1px solid var(--primary);
}
.admin-header .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-header .logo a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
}
.admin-nav { display: flex; gap: 15px; flex-wrap: wrap; }
.admin-nav a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s;
}
.admin-nav a:hover { background-color: var(--primary); }
.admin-main { flex: 1; padding: 20px 0; }
.admin-footer {
    background-color: var(--dark);
    color: var(--gray-light);
    padding: 15px 0;
    text-align: center;
}

/* ===== ДЕТАЛЬНАЯ СТРАНИЦА НОМЕРА ===== */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0;
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
}
.product-gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 400px;
    overflow: hidden;
    border-radius: var(--radius);
    background-color: var(--white);
}
.product-image {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
.number-display {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    width: 100%;
}
.large-number {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    font-family: 'Courier New', monospace;
    word-break: keep-all;
}
.product-info h1 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--primary);
}
.product-meta { display: flex; gap: 20px; margin-bottom: 20px; color: var(--gray); }
.product-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 20px;
}
.product-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.product-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== СТАТИСТИКА ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}
.stat-card {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.stat-icon { font-size: 2.5rem; color: var(--primary-light); }
.stat-content h3 { font-size: 0.9rem; color: var(--gray); margin-bottom: 5px; }
.stat-number { font-size: 2rem; font-weight: 700; color: var(--primary); line-height: 1.2; }

/* ===== ЛИЧНЫЙ КАБИНЕТ ===== */
.cabinet-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.cabinet-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.cabinet-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.cabinet-header .logo a {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}
.cabinet-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.cabinet-nav a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}
.cabinet-nav a:hover { color: white; border-bottom-color: white; }

.debt-info {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
}
.debt-item { display: flex; align-items: center; gap: 0.5rem; }
.debt-label { font-weight: 500; color: #6c757d; }
.debt-value { font-weight: 700; color: #dc3545; }
.debt-value.paid { color: #28a745; }

.cabinet-main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
    background: #f8f9fa;
}
.cabinet-footer {
    background: #343a40;
    color: white;
    padding: 1rem 0;
    text-align: center;
}

.compact-settings .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}
.compact-settings .form-group { margin-bottom: 0; }
.compact-settings .full-width { grid-column: 1 / -1; }

/* ===== СТРАНИЦА ОПЛАТЫ ===== */
.payment-options-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 25px 0;
    justify-content: center;
}
.payment-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 10px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: white;
}
.payment-option:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(111,66,193,0.15);
}
.payment-option.selected {
    border-color: var(--primary);
    background-color: rgba(111,66,193,0.03);
    box-shadow: 0 0 0 3px var(--neon-primary);
}
.payment-option input[type="radio"] { display: none; }
.payment-option strong { display: block; font-size: 1.2rem; margin: 10px 0 5px; color: var(--primary); }
.payment-option span { display: block; font-size: 0.85rem; color: var(--gray); }
.payment-option small { display: block; font-size: 0.75rem; color: var(--gray-light); margin-top: 5px; }

@media (max-width: 600px) {
    .payment-options-row { grid-template-columns: 1fr; }
}

/* ============================================================
   ЕДИНЫЙ SVG-ЧЕК-БОКС СОГЛАСИЙ
   ============================================================ */
.agree-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 8px 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--gray-dark);
    user-select: none;
}
.agree-check input[type="checkbox"] { display: none; }
.agree-check__box {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border: 2px solid var(--gray-light);
    border-radius: 6px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    margin-top: 1px;
}
.agree-check__box svg {
    width: 14px;
    height: 14px;
    fill: #fff;
    opacity: 0;
    transform: scale(0.6);
    transition: all 0.15s;
}
.agree-check input[type="checkbox"]:checked + .agree-check__box {
    background: var(--primary);
    border-color: var(--primary);
}
.agree-check input[type="checkbox"]:checked + .agree-check__box svg {
    opacity: 1;
    transform: scale(1);
}
.agree-check--error .agree-check__box { border-color: var(--danger); }
.agree-check a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
}
.agree-wrap {
    background: rgba(139,92,246,0.05);
    border-radius: 8px;
    padding: 10px 14px;
    margin: 14px 0;
}

/* ============================================================
   ДАШБОРД ДИЛЕРА
   ============================================================ */
.dealer-dashboard { padding: 10px 0 30px; }
.dealer-dashboard h1 {
    font-size: 1.4rem;
    margin: 0 0 16px;
    color: var(--primary);
}
.dealer-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.dealer-metric {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    min-height: 90px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #f0f0f0;
}
.dealer-metric:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(111,66,193,0.12);
}
.dealer-metric__icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    margin-bottom: 6px;
}
.dealer-metric__icon svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
    display: block;
}
.dealer-metric__label {
    font-size: 0.72rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
    margin-bottom: 4px;
}
.dealer-metric__value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
}
.dealer-metric__value.danger  { color: var(--danger); }
.dealer-metric__value.success { color: var(--secondary); }

.dealer-auction {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
}
.dealer-auction h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dealer-auction h2 svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}
.dealer-auction__stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.dealer-auction__stat { text-align: center; }
.dealer-auction__stat strong {
    display: block;
    font-size: 1.4rem;
    color: #667eea;
    line-height: 1.1;
}
.dealer-auction__stat span {
    font-size: 0.75rem;
    color: #555;
}
.dealer-auction .btn { white-space: nowrap; }

.dealer-verify-notice {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 10px;
}
.dealer-verify-notice svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    flex-shrink: 0;
}

.dealer-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.dealer-action {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 14px 8px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #f0f0f0;
}
.dealer-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(111,66,193,0.12);
}
.dealer-action__icon {
    width: 26px;
    height: 26px;
    margin: 0 auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}
.dealer-action__icon svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
    display: block;
}
.dealer-action__title {
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
}

/* ============================================================
   МЕНЮ КАБИНЕТА — БЛОКАМИ
   ============================================================ */
.cabinet-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin: 16px 0 24px;
}
.cabinet-menu__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    padding: 14px 8px;
    min-height: 90px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
    text-decoration: none;
    color: var(--gray-dark);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
    box-sizing: border-box;
}
.cabinet-menu__item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139,92,246,0.15);
    color: var(--primary);
}
.cabinet-menu__item.is-active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 6px 16px rgba(139,92,246,0.35);
}
.cabinet-menu__item.is-active .cabinet-menu__icon,
.cabinet-menu__item.is-active .cabinet-menu__icon svg {
    fill: #fff;
    color: #fff;
}
.cabinet-menu__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--primary);
    flex-shrink: 0;
}
.cabinet-menu__icon svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
    display: block;
}
.cabinet-menu__label {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    word-break: break-word;
}

/* ============================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ (общая)
   ============================================================ */
@media (max-width: 992px) {
    .cabinet-grid { grid-template-columns: 1fr; }
    .product-detail { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .header-inner { flex-direction: column; gap: 15px; }
    .nav ul { flex-wrap: wrap; justify-content: center; gap: 10px; }
    .filter-row { flex-direction: column; }
    .per-page-control { justify-content: center; }

    .number-card {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }
    .number-info { justify-content: space-between; width: 100%; }
    .number-number { min-width: auto; }
    .number-price { min-width: auto; }
    .number-details {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
        width: 100%;
    }
    .number-operator,
    .number-region,
    .number-seller { min-width: auto; flex-shrink: 0; }
    .card-actions {
        width: 100%;
        justify-content: stretch;
        gap: 5px;
    }
    .card-actions .btn { flex: 1; }

    .product-meta { flex-wrap: wrap; gap: 10px; }
    .product-meta .operator,
    .product-meta .region,
    .product-meta .status { display: inline-block; }

    .product-actions { flex-direction: column; }
    .product-actions .btn { width: 100%; }

    .mask-input-container {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    .mask-def, .mask-number {
        gap: 5px;
        width: 100%;
        justify-content: center;
    }
    .mask-def-boxes, .mask-number-boxes {
        display: flex;
        gap: 4px;
        flex: 1;
        justify-content: center;
    }
    .mask-digit {
        width: calc((100vw - 40px) / 10);
        height: 40px;
        font-size: 1rem;
    }
    .mask-label { display: none; }
    #mask-search-btn { width: 100%; margin-top: 5px; }

    .filter-group { width: 100% !important; flex: none !important; }
    .filter-actions { justify-content: space-between; }

    .dealer-metrics {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        gap: 8px;
    }
    .dealer-metric { padding: 10px 8px; min-height: 76px; }
    .dealer-metric__icon,
    .dealer-metric__icon svg { width: 22px; height: 22px; }
    .dealer-metric__value { font-size: 1.05rem; }
    .dealer-metric__label { font-size: 0.65rem; }

    .dealer-auction {
        padding: 14px;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .dealer-auction__stats { justify-content: center; gap: 18px; }
    .dealer-auction .btn { width: 100%; }

    .dealer-actions {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 8px;
    }
    .dealer-action__icon,
    .dealer-action__icon svg { width: 22px; height: 22px; }
    .dealer-action__title { font-size: 0.7rem; }

    .cabinet-menu {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 6px;
        margin: 10px 0 16px;
    }
    .cabinet-menu__item {
        padding: 10px 4px;
        min-height: 72px;
        border-radius: 10px;
        gap: 4px;
    }
    .cabinet-menu__icon,
    .cabinet-menu__icon svg {
        width: 22px;
        height: 22px;
    }
    .cabinet-menu__label {
        font-size: 0.68rem;
    }

    .user-info { font-size: 0.8rem; padding: 4px 10px; }
}

.logo a { margin-right: -15px; }
.header-slogan { margin-left: 0; position: relative; left: -10px; }
.number-details { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; }

@media (max-width: 768px) {
    .number-display {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        padding: 20px 1.5px;
    }
    .large-number {
        font-size: 2rem;
        letter-spacing: 0.1px;
        display: inline-block;
        white-space: nowrap;
    }
}

.cart-table td { vertical-align: top !important; }
.cart-table .item-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* ============================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ СТРАНИЦЫ partner_numbers.php
   (кнопки в 2 ряда, карточки номеров, кнопки в один ряд)
   ============================================================ */
@media (max-width: 768px) {

    /* ---------- ПАНЕЛЬ ДЕЙСТВИЙ: формы и кнопки — 2 в ряд ---------- */
    .action-buttons {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    .action-buttons .btn-group {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    /* Форма внутри btn-group — тоже grid */
    .action-buttons .btn-group form {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        width: 100% !important;
        box-sizing: border-box;
        margin: 0;
        grid-column: 1 / -1;
    }
    .action-buttons .btn-group > * {
        width: 100% !important;
        min-width: 0 !important;
    }
    .action-buttons .btn,
    .action-buttons .btn-group button,
    .action-buttons .btn-group a {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        font-size: 0.78rem !important;
        padding: 10px 6px !important;
        white-space: normal !important;
        text-align: center !important;
        line-height: 1.25 !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        gap: 4px;
        box-sizing: border-box;
        overflow: hidden;
        word-break: break-word;
        height: 100% !important;
    }
    .action-buttons .btn svg {
        width: 14px !important;
        height: 14px !important;
        flex-shrink: 0;
    }

    /* ---------- ТАБЛИЦА → КАРТОЧКИ ---------- */
    .table-responsive {
        overflow-x: visible !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .admin-table-main {
        min-width: 0 !important;
        width: 100% !important;
    }
    .admin-table,
    .admin-table thead,
    .admin-table tbody,
    .admin-table th,
    .admin-table td,
    .admin-table tr {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    .admin-table thead { display: none !important; }

    .admin-table tr {
        background: #fff;
        border: 1px solid var(--gray-light);
        border-radius: 10px;
        padding: 12px;
        margin-bottom: 12px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    }
    .admin-table td {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        padding: 6px 0;
        border-bottom: 1px dashed var(--gray-light);
        font-size: 0.82rem;
        white-space: normal;
        word-break: break-word;
        text-align: right;
        min-height: 32px;
    }
    .admin-table td:last-child {
        border-bottom: none;
        padding-top: 10px;
    }
    .admin-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--gray-dark);
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.2px;
        flex-shrink: 0;
        text-align: left;
        padding-right: 8px;
        min-width: 90px;
        opacity: 0.75;
    }
    .admin-table td .number {
        font-size: 0.95rem;
        letter-spacing: 0.3px;
    }
    .number-thumb { max-height: 32px; }

    /* ---------- КНОПКИ В КАРТОЧКЕ: 2 в ряд, одинаковые, без переноса ---------- */
    .admin-table td[data-label="Действия"] {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
        justify-content: stretch !important;
        align-items: stretch !important;
        padding-top: 10px !important;
    }
    .admin-table td[data-label="Действия"] .btn {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        width: 50% !important;
        font-size: 0.78rem !important;
        padding: 8px 4px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        text-align: center !important;
        box-sizing: border-box !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
    }

    /* ---------- ФИЛЬТРЫ ---------- */
    .filter-form > div {
        flex: 1 1 100% !important;
        width: 100% !important;
    }
    .filter-form > div > button,
    .filter-form > div > a {
        width: 100%;
        margin-top: 4px;
    }

    /* ---------- ПАНЕЛЬ БЫСТРОГО ПРИМЕНЕНИЯ ---------- */
    .quick-apply-form {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .quick-apply-form select,
    .quick-apply-form input,
    .quick-apply-form button {
        width: 100% !important;
        min-width: 0;
    }

    /* ---------- КНОПКИ МАССОВОГО РЕДАКТИРОВАНИЯ ---------- */
    .bulk-edit-actions {
        flex-direction: column !important;
        gap: 8px !important;
    }
    .bulk-edit-actions .btn,
    .bulk-edit-actions form {
        width: 100% !important;
        min-width: 0;
    }

    /* ---------- ФОРМА ДОБАВЛЕНИЯ/РЕДАКТИРОВАНИЯ ---------- */
    .admin-form .form-group {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .admin-form .form-group label {
        width: auto !important;
        margin-bottom: 4px;
    }
    .admin-form .form-actions {
        margin-left: 0 !important;
        flex-direction: column;
        gap: 8px;
    }
    .admin-form .form-actions .btn { width: 100%; }

    /* ---------- ПЛАВАЮЩАЯ КНОПКА ---------- */
    .floating-delete-btn {
        left: 10px !important;
        right: 10px !important;
        bottom: 15px !important;
        width: calc(100% - 20px) !important;
        justify-content: center;
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .action-buttons .btn-group {
        grid-template-columns: 1fr !important;
    }
    .action-buttons .btn-group form {
        grid-template-columns: 1fr !important;
    }
    .action-buttons .btn,
    .action-buttons .btn-group button,
    .action-buttons .btn-group a {
        font-size: 0.82rem !important;
    }
    .admin-table td {
        font-size: 0.78rem;
    }
    .admin-table td::before {
        min-width: 70px;
        font-size: 0.68rem;
    }
}
/* ============================================================
   ШАПКА КАБИНЕТА — 2 строки на мобильном
   ============================================================ */
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: nowrap;
}
.nav-main ul,
.nav-icons ul {
    display: flex;
    gap: 10px;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

@media (max-width: 768px) {
    .header-inner {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "logo     nav-main"
            "nav-icons user-info";
        gap: 8px 10px;
        align-items: center;
    }
    .logo        { grid-area: logo; }
    .nav-main    { grid-area: nav-main; }
    .nav-icons   { grid-area: nav-icons; }
    .user-info   { grid-area: user-info; }

    .logo-text {
        font-size: 1.2rem;
    }

    .nav-main ul {
        gap: 8px;
    }
    .nav-main a {
        padding: 6px 8px;
        font-size: 0.85rem;
    }

    .nav-icons ul {
        gap: 6px;
    }
    .nav-icons .icon-link {
        width: 34px;
        height: 34px;
    }
    .nav-icons .icon,
    .nav-icons svg {
        width: 20px;
        height: 20px;
    }

    .user-info {
        font-size: 0.8rem;
        padding: 4px 10px;
        white-space: nowrap;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Слоган на мобильном скрыт */
    .header-slogan { display: none; }
}