

/* Secondary button (glass violet) */
.btn-secondary{
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(138,43,226,0.35);
  color: rgba(255,255,255,0.92);
  border-radius: 12px;
  transition: 0.25s ease;
}
.btn-secondary:hover{
  background: rgba(138,43,226,0.10);
  border-color: rgba(138,43,226,0.55);
}
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');
:root {
    --bg-dark: #050512;
    --violet-main: #8a2be2;
    --violet-glow: rgba(138, 43, 226, 0.3);
    --glass: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(138, 43, 226, 0.2);
    --text: #f0f0ff;
    --text-dim: rgba(200, 200, 255, 0.5);
}
body {
    background-color: var(--bg-dark);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    margin: 0;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 50% 50%, #121235 0%, transparent 70%),
        url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='grid' width='100' height='100' patternUnits='userSpaceOnUse'%3E%3Cpath d='M 100 0 L 0 0 0 100' fill='none' stroke='%238a2be2' stroke-width='0.5' opacity='0.1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100' height='100' fill='url(%23grid)'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='100' cy='100' r='2' fill='%238a2be2' opacity='0.15'/%3E%3Ccircle cx='50' cy='50' r='1.5' fill='%238a2be2' opacity='0.1'/%3E%3Ccircle cx='150' cy='150' r='1.5' fill='%238a2be2' opacity='0.1'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg width='150' height='150' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='75,10 85,45 120,45 95,70 105,105 75,85 45,105 55,70 30,45 65,45' fill='none' stroke='%238a2be2' stroke-width='0.3' opacity='0.08'/%3E%3C/svg%3E");
    background-size: 100% 100%, 200px 200px, 400px 400px, 300px 300px;
    background-position: center center, 0 0, 100px 100px, 200px 200px;
    background-attachment: fixed;
    position: relative;
}
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(138, 43, 226, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(138, 43, 226, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(138, 43, 226, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    animation: backgroundGlow 20s ease-in-out infinite;
}
@keyframes backgroundGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 25px; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulseGlow {
    0% { box-shadow: 0 0 20px rgba(138, 43, 226, 0.2); }
    50% { box-shadow: 0 0 40px rgba(138, 43, 226, 0.5); }
    100% { box-shadow: 0 0 20px rgba(138, 43, 226, 0.2); }
}
.reveal { animation: fadeInUp 1s cubic-bezier(0.2, 1, 0.3, 1) forwards; opacity: 0; }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.glass {
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    transition: 0.4s ease;
}
.glass:hover {
    border-color: var(--violet-main);
    background: rgba(138, 43, 226, 0.05);
    transform: translateY(-5px);
}

/* Fixed/Sticky Header Navigation */
header {
    position: sticky;
    top: 0;
    z-index: 999;
    width: 100%;
    box-shadow: 0 4px 20px rgba(138, 43, 226, 0.1);
}

.hero {
    padding: 200px 0 100px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center; 
}
.hero-title {
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -3px;
    line-height: 0.95;
    margin: 20px 0;
    background: linear-gradient(180deg, #fff 0%, #a29bfe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.btn-premium {
    background: var(--violet-main);
    color: #fff;
    border: none;
    padding: 18px 45px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    animation: pulseGlow 3s infinite;
    transition: 0.3s;
}
.btn-premium:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}
.grid-3x2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 50px;
}
.feature-card { padding: 40px; }
.feature-card i { font-size: 2.5rem; color: var(--violet-main); margin-bottom: 20px; display: block; }
.lang-switcher {
    display: flex;
    gap: 5px;
    align-items: center;
    background: rgba(255,255,255,0.05);
    padding: 5px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}
.lang-btn {
    padding: 6px 12px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    transition: 0.3s;
    outline: none;
    font-family: inherit;
}
.lang-btn:hover {
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.05);
}
.lang-btn.active {
    color: var(--violet-main);
    background: rgba(138, 43, 226, 0.2);
    border: 1px solid rgba(138, 43, 226, 0.3);
}
.form-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}
.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
.form-input:hover {
    border-color: rgba(138, 43, 226, 0.4);
    background: rgba(255, 255, 255, 0.05);
}
.form-input:focus {
    border-color: var(--violet-main);
    background: rgba(138, 43, 226, 0.1);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.2);
}
.form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
/* Checkout Styles */
.checkout-container {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 30px;
    padding: 180px 0 100px;
    align-items: start;
}
.checkout-summary {
    padding: 40px;
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    position: sticky;
    top: 120px;
    grid-column: 2;
    grid-row: 1;
}
.checkout-summary h2 {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 30px;
}
.checkout-form {
    padding: 40px;
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    grid-column: 1;
    grid-row: 1;
}
.payment-methods {
    margin: 26px auto;
    max-width: 520px;
}
.payment-methods h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 20px;
}
.payment-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    transition: 0.3s;
}
.payment-method:hover {
    background: rgba(138, 43, 226, 0.1);
    border-color: var(--violet-main);
}
.payment-method input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(138, 43, 226, 0.4);
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

/* Universal modal overlay (used by instruction modal and other lightweight modals) */
.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 8, 20, 0.62);
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    /* If content is tall (small screens), scroll the overlay instead of clipping */
    overflow: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, visibility 0s linear .18s;
}

/* Instruction modal enter/exit animation */
.modal-overlay.is-open{ opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .18s ease; }
.modal-overlay.is-closing{ opacity: 0; visibility: visible; pointer-events: none; transition: opacity .18s ease, visibility 0s linear .18s; }

.instruction-modal-card{
  max-height: calc(100vh - 48px);
  overflow: auto;
  transform: translateY(10px) scale(0.985);
  opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
  will-change: transform, opacity;
}
.modal-overlay.is-open .instruction-modal-card{
  transform: translateY(0) scale(1);
  opacity: 1;
}
.modal-overlay.is-closing .instruction-modal-card{
  transform: translateY(8px) scale(0.985);
  opacity: 0;
}

@media (max-width: 520px){
  .modal-overlay{
    /* Give more usable space on 360/390px */
    padding: 14px;
    align-items: flex-start;
  }
  .instruction-modal-card{
    max-height: calc(100vh - 28px);
  }
}
.payment-method input[type="radio"]:hover {
    border-color: var(--violet-main);
    background: rgba(138, 43, 226, 0.1);
}
.payment-method input[type="radio"]:checked {
    background: var(--violet-main);
    border-color: var(--violet-main);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.5);
}
.payment-method input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
}
.payment-method span {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 600;
}
.payment-method strong {
    color: var(--violet-main);
    font-weight: 800;
}
.error {
    padding: 15px;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 12px;
    color: #ff4444;
    font-weight: 600;
    margin: 20px 0;
}
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.cart-item:last-child {
    border-bottom: none;
}
.checkout-total {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(138, 43, 226, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.4rem;
    font-weight: 900;
}
.checkout-total strong {
    color: var(--violet-main);
}
.form-group {
    margin-bottom: 25px;
}
.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    opacity: 0.6;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.form-label.required::after {
    content: ' *';
    color: var(--violet-main);
}
.form-control {
    width: 100%;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: 0.3s;
    box-sizing: border-box;
    font-family: inherit;
}
.form-control:focus {
    border-color: var(--violet-main);
    background: rgba(138, 43, 226, 0.1);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.2);
}
.btn--primary {
    background: var(--violet-main);
    color: #fff;
    border: none;
    padding: 18px 45px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    transition: 0.3s;
}
.btn--primary:hover:not(:disabled) {
    transform: scale(1.05);
    filter: brightness(1.2);
}
.btn--primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.btn--full {
    width: 100%;
}
@media (max-width: 992px) {
    .checkout-container {
        grid-template-columns: 1fr;
        padding: 140px 0 60px;
    }
    .checkout-summary {
        position: static;
    }
}

/* Стили для ошибок формы регистрации */
.form-errors {
    background: rgba(255, 84, 89, 0.15);
    border: 1px solid rgba(255, 84, 89, 0.4);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease;
}

.error-item {
    color: #ff5459;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 6px;
    font-weight: 600;
}

.error-item:last-child {
    margin-bottom: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar Logo Styles */
.navbar-logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    transition: transform 0.3s ease;
}

.navbar-logo-container:hover {
    transform: scale(1.05);
}

.navbar-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    filter: drop-shadow(0 0 10px rgba(138, 43, 226, 0.5));
    animation: logoFloat 3s ease-in-out infinite;
    flex-shrink: 0;
}

/* Make all logo.webp images circular in navbars and headers */
nav img[src*="logo.webp"],
header img[src*="logo.webp"],
.navbar-logo-container img[src*="logo.webp"],
.logo-nav img[src*="logo.webp"],
#logoNav img[src*="logo.webp"],
img[src*="logo.webp"][alt*="SphereNet"],
img[src*="Logo.webp"],
img[src*="assets/img/logo.webp"] {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    object-fit: cover;
    filter: drop-shadow(0 0 10px rgba(138, 43, 226, 0.5));
    animation: logoFloat 3s ease-in-out infinite;
}

/* Also make any logo images in navbar containers circular (if not already styled) */
.navbar-logo-container img:not(.navbar-logo),
.logo-nav img:not(.navbar-logo),
#logoNav img:not(.navbar-logo) {
    border-radius: 50% !important;
    object-fit: cover;
    width: 50px !important;
    height: 50px !important;
}

@keyframes logoFloat {
    0%, 100% { 
        transform: translateY(0); 
    }
    50% { 
        transform: translateY(-3px); 
    }
}

.navbar-brand {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    display: none;
}

/* Navbar links (used across all pages, including about/contacts) */
.nav-menu a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    transition: 0.25s ease;
}

.nav-menu a:hover {
    color: var(--violet-main);
}

@media (min-width: 768px) {
    .navbar-brand {
        display: block;
    }
    
    /* Скрываем гамбургер на десктопе */
    .hamburger {
        display: none !important;
    }
    
    /* Показываем обычное меню на десктопе */
    .nav-menu {
        display: flex !important;
    }
}

/* === АДМИН ПАНЕЛЬ === */

#adminPanel {
    min-height: 100vh;
    background: var(--bg-dark);
}

.admin-nav-link {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
    font-size: 0.85rem;
    font-weight: 600;
}

.admin-nav-link:hover {
    color: var(--violet-main);
    opacity: 1 !important;
}

.admin-nav-link.active {
    color: var(--violet-main);
    opacity: 1 !important;
}

.admin-content {
    padding: 24px;
    overflow-y: auto;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-header {
    margin-bottom: 24px;
}

.admin-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.admin-subtitle {
    color: var(--text-dim);
    font-size: 14px;
}

/* Виджеты статистики */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-widget {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 12px;
    padding: 20px;
    transition: all 250ms ease;
}

.stat-widget:hover {
    border-color: rgba(138, 43, 226, 0.5);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.1);
}

.stat-label {
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #d946ef;
}

.stat-change {
    color: var(--text-dim);
    font-size: 12px;
    margin-top: 8px;
}

.stat-change.positive {
    color: #00d950;
}

.stat-change.negative {
    color: #ff5459;
}

/* Таблицы в админке */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

.data-table thead {
    background: rgba(138, 43, 226, 0.1);
    border-bottom: 1px solid rgba(138, 43, 226, 0.2);
}

.data-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    /* Headers should be readable (not neon pink) and not "shouty" */
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    text-transform: none;
    letter-spacing: 0.02em;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(138, 43, 226, 0.1);
    color: var(--text);
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: rgba(138, 43, 226, 0.05);
}

/* Статусы */
.status {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-open {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.status-pending {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
}

.status-paid {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.status-in_progress {
    background: rgba(156, 39, 176, 0.2);
    color: #9c27b0;
}

.status-completed {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.status-canceled {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

/* Кнопки в админке */
.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    background: rgba(138, 43, 226, 0.2);
    color: #d946ef;
    border: 1px solid rgba(138, 43, 226, 0.4);
    border-radius: 6px;
    cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    transition: all 250ms ease;
}

.btn-small:hover {
    background: rgba(138, 43, 226, 0.4);
}

/* Формы в админке */
.admin-form {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 12px;
    padding: 24px;
    max-width: 600px;
}

.admin-form .form-group,
.admin-glass .form-group,
#adminPanel .form-group {
    margin-bottom: 20px;
}

.admin-form .form-label,
.admin-glass .form-label,
#adminPanel .form-label,
#adminPanel label:not(.lang-btn):not(.mobile-menu-item) {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    opacity: 0.6;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text);
}

/* Textarea в админке */
.admin-form textarea,
.admin-glass textarea,
#adminPanel textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

/* Формы в админке - единый стиль с основным сайтом */
.admin-form .form-control,
.admin-glass .form-control,
#adminPanel .form-control,
#adminPanel input[type="text"],
#adminPanel input[type="email"],
#adminPanel input[type="password"],
#adminPanel input[type="number"],
#adminPanel textarea {
    width: 100%;
    padding: 14px 18px;
    background: #050512;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.admin-form .form-control::placeholder,
.admin-glass .form-control::placeholder,
#adminPanel .form-control::placeholder,
#adminPanel input::placeholder,
#adminPanel textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.admin-form .form-control:hover,
.admin-glass .form-control:hover,
#adminPanel .form-control:hover,
#adminPanel input:hover,
#adminPanel textarea:hover {
    border-color: rgba(138, 43, 226, 0.4);
    background: #0a0a1a;
}

.admin-form .form-control:focus,
.admin-glass .form-control:focus,
#adminPanel .form-control:focus,
#adminPanel input:focus,
#adminPanel textarea:focus {
    border-color: var(--violet-main);
    background: rgba(138, 43, 226, 0.1);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.2);
    outline: none;
}

.admin-form .form-control:disabled,
.admin-glass .form-control:disabled,
#adminPanel .form-control:disabled,
#adminPanel input:disabled,
#adminPanel textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Checkbox в админке - единый стиль с основным сайтом */
#adminPanel input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    padding: 0;
    cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    box-sizing: border-box;
    flex-shrink: 0;
}

#adminPanel input[type="checkbox"]:hover {
    border-color: rgba(138, 43, 226, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

#adminPanel input[type="checkbox"]:checked {
    background: var(--violet-main);
    border-color: var(--violet-main);
}

#adminPanel input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

#adminPanel input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.3);
}

/* Label для checkbox */
#adminPanel label[for*="checkbox"],
#adminPanel label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    font-size: 14px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    opacity: 1;
    margin-bottom: 0;
}

/* Select в админке - единый стиль с основным сайтом */
.form-control[type="select"],
select.form-control,
#adminPanel select,
#adminPanel select.form-control,
.order-status-select,
.admin-glass select {
    width: 100%;
    padding: 14px 40px 14px 18px;
    background: #050512;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
    appearance: none;
    cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

#adminPanel select option,
.admin-glass select option,
select.form-control option {
    background: #050512;
    color: #fff;
    padding: 10px;
}

.form-control[type="select"]:hover,
select.form-control:hover,
#adminPanel select:hover,
.order-status-select:hover,
.admin-glass select:hover {
    border-color: rgba(138, 43, 226, 0.4);
    background-color: #0a0a1a;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.form-control[type="select"]:focus,
select.form-control:focus,
#adminPanel select:focus,
.order-status-select:focus,
.admin-glass select:focus {
    border-color: var(--violet-main);
    background-color: #0a0a1a;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.2);
    outline: none;
}

/* Специфичные стили для select в таблицах */
.order-status-select {
    min-width: 150px;
    padding: 10px 40px 10px 16px;
    font-size: 0.85rem;
    margin: 0;
}

.ticket-status-select {
    padding: 14px 40px 14px 18px;
    font-size: 0.85rem;
    margin: 0;
}

/* Модальные окна в админке */
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(800px 420px at 50% 20%, rgba(138, 43, 226, 0.20), rgba(0,0,0,0)), rgba(5, 5, 18, 0.82);
    backdrop-filter: blur(12px) saturate(160%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.admin-modal-content {
    background: linear-gradient(180deg, rgba(12, 12, 34, 0.92), rgba(5, 5, 18, 0.86));
    backdrop-filter: blur(22px) saturate(170%);
    border: 1px solid rgba(138, 43, 226, 0.24);
    border-radius: 18px;
    padding: 22px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 18px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.04) inset;
    transform: translateY(2px);
    animation: adminModalIn 160ms ease-out;
}

@media (max-width: 520px){
  .admin-modal{ align-items: flex-start; }
  .admin-modal-content{
    width: calc(100% - 24px);
    margin-top: 14px;
    padding: 16px;
    border-radius: 16px;
    max-height: calc(100vh - 28px);
  }
  .admin-modal-title{ font-size: 18px; }
}

/* Size modifiers for admin modals */
.admin-modal-content--wide{ max-width: 820px; }
.admin-modal-content--xl{ max-width: 920px; }

@keyframes adminModalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(2px) scale(1.0); }
}

@media (prefers-reduced-motion: reduce){
  .admin-modal-content{ animation: none; transform: none; }
  .admin-modal-close{ transition: none; }
}

/* Ensure native dropdown options stay readable on dark background */
select option,
select optgroup{
  background: #060617;
  color: rgba(255,255,255,0.92);
}

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(138, 43, 226, 0.2);
    padding-bottom: 16px;
}

.admin-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.admin-modal-close {
    background: none;
    border: none;
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 250ms ease;
}

.admin-modal-close:hover {
    color: #d946ef;
    transform: rotate(90deg);
}

/* Options in native selects: avoid black text on dark background */
select option,
select optgroup{
  background: #070716;
  color: rgba(255,255,255,0.92);
}

@media (prefers-reduced-motion: reduce){
  .admin-modal-content{ animation: none; }
  .admin-modal-close{ transition: none; }
}

/* Мобильная адаптация админки */
@media (max-width: 768px) {
    .admin-container {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        display: none;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 999;
    }

    .admin-sidebar.active {
        display: flex;
        flex-direction: column;
    }

    .admin-content {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .data-table {
        font-size: 12px;
    }

}

/* === FAQ ACCORDION === */
.faq-item {
    margin-bottom: 15px;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(138, 43, 226, 0.2);
    background: rgba(20, 20, 40, 0.4);
}

.faq-trigger {
    width: 100%;
    padding: 25px;
    text-align: left;
    background: rgba(138, 43, 226, 0.05);
    border: none;
    color: #fff;
    cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.3s ease;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: inherit;
}

.faq-trigger:hover {
    background: rgba(138, 43, 226, 0.1);
}

.faq-trigger i {
    transition: transform 0.3s ease;
    color: rgba(138, 43, 226, 0.6);
    margin-left: 15px;
    flex-shrink: 0;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.2);
    padding: 0 25px;
    opacity: 0;
    color: rgba(240, 240, 255, 0.7);
    line-height: 1.6;
}

.faq-item.active .faq-content {
    padding: 20px 25px 30px;
    max-height: 400px;
    opacity: 1;
}

.faq-item.active .faq-trigger {
    color: #8a2be2;
    background: rgba(138, 43, 226, 0.15);
}

.faq-item.active .faq-trigger i {
    transform: rotate(180deg);
    color: #8a2be2;
}

/* === CART & CHECKOUT IMPROVEMENTS === */
.cart-container,
.checkout-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    padding: 30px;
}

.cart-items {
    background: var(--glass);
    border-radius: 16px;
    padding: 25px;
    min-height: 300px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px;
    margin-bottom: 12px;
    background: rgba(138, 43, 226, 0.08);
    border-left: 3px solid #8a2be2;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.cart-item:hover {
    background: rgba(138, 43, 226, 0.15);
    transform: translateX(8px);
}

.cart-item-info {
    flex: 1;
    margin-right: 15px;
}

.cart-item-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
}

.cart-item-price {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.cart-item-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.qty-input {
    width: 50px;
    height: 32px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(138, 43, 226, 0.5);
    color: var(--text);
    border-radius: 6px;
    text-align: center;
    font-size: 12px;
}

.remove-btn {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.5);
    color: #ff6b6b;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    font-size: 11px;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: rgba(255, 0, 0, 0.3);
    border-color: #ff6b6b;
}

.cart-summary {
    background: var(--glass);
    border-radius: 16px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(138, 43, 226, 0.2);
}

.summary-item.total {
    font-weight: 700;
    font-size: 16px;
    color: #00d9ff;
    margin-top: 15px;
    border: none;
    padding: 0;
}

.checkout-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #8a2be2 0%, #00d9ff 100%);
    color: #050512;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    margin-top: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.5);
}

.checkout-btn:active {
    transform: translateY(0);
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}

.cart-empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.cart-empty-text {
    font-size: 14px;
    margin-bottom: 20px;
}

/* Payment methods select (vertical stack) */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
.payment-method { width: 100%; margin-bottom: 0; }
.payment-method-btn {
    padding: 12px;
    background: rgba(138, 43, 226, 0.1);
    border: 2px solid rgba(138, 43, 226, 0.3);
    border-radius: 10px;
    color: var(--text);
    cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.payment-method-btn:hover {
    border-color: #8a2be2;
    background: rgba(138, 43, 226, 0.2);
}

.payment-method-btn.active {
    background: rgba(138, 43, 226, 0.4);
    border-color: #8a2be2;
    color: #00d9ff;
}

@media (max-width: 768px) {
    .cart-container,
    .checkout-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 16px;
    }
    
    .cart-summary {
        position: relative;
        top: auto;
    }
    
    .cart-item {
        flex-direction: column;
    }
    
    .cart-item-controls {
        margin-top: 10px;
        width: 100%;
    }
}

    .data-table th,
    .data-table td {
        padding: 8px;
    }

    .admin-modal-content {
        width: 95%;
        padding: 16px;
    }
}

/* Modal close button (glass violet) */
.modal-close-btn{
  all: unset;
  -webkit-appearance: none;
  appearance: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(138, 43, 226, 0.45) !important;
  background: linear-gradient(180deg, rgba(138, 43, 226, 0.22), rgba(255,255,255,0.06)) !important;
  backdrop-filter: blur(10px);
  color: rgba(255,255,255,0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35) !important;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.modal-close-btn:focus-visible{
  outline: 2px solid rgba(138, 43, 226, 0.55);
  outline-offset: 2px;
}
.modal-close-btn:hover{
  background: rgba(138, 43, 226, 0.22) !important;
  border-color: rgba(138, 43, 226, 0.65) !important;
  transform: translateY(-1px) rotate(2deg);
  box-shadow: 0 14px 36px rgba(0,0,0,0.40), 0 0 0 4px rgba(138,43,226,0.10) !important;
}
.modal-close-btn:active{
  transform: translateY(0px) scale(0.98);
}


/* SphereNet Offline Banner */
#sph-offline-banner{
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 99999;
  display: none;
  pointer-events: none;
}
#sph-offline-banner.is-visible{ display:block; pointer-events:auto; }
#sph-offline-banner .sph-offline-inner{
  background: rgba(10,10,14,0.72);
  border: 1px solid rgba(138,43,226,0.35);
  backdrop-filter: blur(14px);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  color: rgba(255,255,255,0.92);
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
#sph-offline-banner .sph-offline-title{
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.1;
}
#sph-offline-banner .sph-offline-sub{
  font-size: 0.82rem;
  opacity: 0.85;
  margin-top: 2px;
}
#sph-offline-banner .sph-offline-actions{
  display:flex;
  gap: 10px;
  flex-shrink: 0;
}
#sph-offline-banner .sph-offline-btn{
  appearance:none;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(138,43,226,0.50);
  background: rgba(138,43,226,0.22);
  color: rgba(255,255,255,0.95);
  font-weight: 700;
  cursor: pointer;
  transition: 0.18s ease;
}
#sph-offline-banner .sph-offline-btn:hover{
  background: rgba(138,43,226,0.30);
  border-color: rgba(138,43,226,0.65);
}
#sph-offline-banner .sph-offline-btn--ghost{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.16);
}
@media (max-width: 420px){
  #sph-offline-banner .sph-offline-inner{ align-items: flex-start; flex-direction: column; }
  #sph-offline-banner .sph-offline-actions{ width:100%; }
  #sph-offline-banner .sph-offline-btn{ flex:1; text-align:center; }
}
