:root {
    --theme-bg: #090706;
    --theme-surface: rgba(24, 18, 14, 0.72);
    --theme-card-bg: rgba(30, 22, 17, 0.65);
    --theme-card-secondary: rgba(38, 28, 22, 0.6);
    --theme-card-elevated: rgba(48, 36, 28, 0.7);
    --theme-card-ring: rgba(255, 255, 255, 0.08);
    --theme-card-hover-ring: rgba(255, 140, 0, 0.45);
    --theme-input-bg: rgba(20, 16, 13, 0.85);
    --theme-input-placeholder: #7c726a;
    --theme-muted-text: #9e9188;
    
    --astral-accent: #ff8c00;
    --astral-accent-gradient: linear-gradient(135deg, #ffa02e 0%, #ff6a00 100%);
    --astral-green: #34c759;
    --astral-red: #ff3b30;
    
    /* Telegram WebApp Safe Area Variables */
    --tg-safe-top: calc(env(safe-area-inset-top, 20px) + 48px);
    --tg-safe-bottom: env(safe-area-inset-bottom, 0px);
    --cw-header-total-height: 110px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Onest', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    background-color: var(--theme-bg);
    background-image: 
        radial-gradient(circle 420px at 50% -40px, rgba(255, 122, 0, 0.48), transparent 75%),
        radial-gradient(circle 260px at 85% 60px, rgba(255, 154, 46, 0.22), transparent 70%),
        linear-gradient(180deg, rgba(255, 115, 0, 0.16) 0%, rgba(14, 10, 8, 0.96) 38%, #090706 100%);
    background-attachment: fixed;
    color: #ffffff;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--astral-accent);
    color: #000000;
}

/* ===================================================
   SPLASH SCREEN
   =================================================== */
.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.splash-screen.splash-hidden {
    opacity: 0;
    transform: scale(1.05);
    visibility: hidden;
    pointer-events: none;
    display: none !important;
}

.splash-bg-glow {
    position: absolute;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(255, 140, 0, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
}

.splash-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.splash-logo-container {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.splash-aura {
    position: absolute;
    inset: 0;
    background: rgba(255, 140, 0, 0.2);
    border-radius: 50%;
    filter: blur(14px);
}

.splash-logo-box {
    position: relative;
    z-index: 3;
    width: 68px;
    height: 68px;
    background: #161618;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--astral-accent);
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.3);
    color: var(--astral-accent);
}

.splash-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff;
    margin-bottom: 4px;
}

.splash-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 140, 0, 0.1);
    border: 1px solid rgba(255, 140, 0, 0.3);
    border-radius: 20px;
    padding: 4px 12px;
    margin-bottom: 20px;
    color: var(--astral-accent);
}

.badge-text {
    font-family: 'Unbounded', sans-serif;
    font-size: 10.5px;
    font-weight: 800;
    color: var(--astral-accent);
    letter-spacing: 1.5px;
}

.splash-loader-wrap {
    width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.splash-progress-track {
    width: 100%;
    height: 4px;
    background: #1c1c1e;
    border-radius: 10px;
    overflow: hidden;
}

.splash-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--astral-accent);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.splash-status-text {
    font-size: 11.5px;
    color: var(--theme-muted-text);
}

/* ===================================================
   КОНТЕЙНЕРЫ И ФИКСИРОВАННЫЙ ХЕДЕР
   =================================================== */
#root,
.app-root {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Элегантная полупрозрачная сетка в стиле Suno */
.app-root::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 480px;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    mask-image: radial-gradient(circle at 50% 20%, black 25%, transparent 75%);
    -webkit-mask-image: radial-gradient(circle at 50% 20%, black 25%, transparent 75%);
    z-index: 0;
}

/* ФИКСИРОВАННЫЙ ХЕДЕР: ГАРАНТИРУЕТ, ЧТО НАЗВАНИЕ И ЛОГОТИП СТРОГО НИЖЕ TELEGRAM UI */
.cw-fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(14, 10, 8, 0.84);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 140, 0, 0.12);
    padding-top: calc(env(safe-area-inset-top, 20px) + 48px);
    padding-bottom: 12px;
    padding-left: max(env(safe-area-inset-left, 0px), 16px);
    padding-right: max(env(safe-area-inset-right, 0px), 16px);
    box-sizing: border-box;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
}

.cw-header-container {
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.app-container {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding-top: calc(var(--cw-header-total-height, 110px) + 14px);
    padding-left: max(env(safe-area-inset-left, 0px), 16px);
    padding-right: max(env(safe-area-inset-right, 0px), 16px);
    padding-bottom: max(calc(env(safe-area-inset-bottom, 0px) + 80px), 88px);
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    box-sizing: border-box;
    flex: 1;
}

.cw-subnav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
    width: 100%;
}

.cw-brand-badge {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cw-logo-icon {
    width: 36px;
    height: 36px;
    background: #1c1c1e;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--astral-accent);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.cw-brand-info {
    display: flex;
    flex-direction: column;
}

.cw-brand-name {
    font-family: 'Unbounded', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

.cw-brand-tagline {
    font-size: 11px;
    color: var(--theme-muted-text);
    font-weight: 500;
}

.cw-user-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #161618;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--theme-muted-text);
    max-width: 150px;
}

.cw-user-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Плашка сервера с копированием IP */
.cw-server-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #161618;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 9px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cw-server-bar:hover {
    border-color: rgba(255, 255, 255, 0.16);
}

.cw-server-bar:active {
    transform: scale(0.99);
}

.cw-server-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cw-live-dot {
    width: 7px;
    height: 7px;
    background-color: var(--astral-green);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--astral-green);
    flex-shrink: 0;
}

.cw-live-dot.small {
    width: 6px;
    height: 6px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 2px;
}

.cw-server-ip {
    font-family: 'Unbounded', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
}

.cw-copy-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #1c1c1e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--theme-muted-text);
    padding: 4px 9px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.15s;
}

.cw-copy-badge.copied {
    background: rgba(52, 199, 89, 0.15);
    border-color: rgba(52, 199, 89, 0.35);
    color: var(--astral-green);
}

/* ===================================================
   СЕГМЕНТИРОВАННЫЙ ПЕРЕКЛЮЧАТЕЛЬ (СТИЛЬ РЕФЕРЕНСА)
   =================================================== */
.apple-segmented-container {
    display: flex;
    position: relative;
    background: rgba(22, 16, 12, 0.9);
    border-radius: 9999px;
    padding: 3px;
    border: 1px solid rgba(255, 140, 0, 0.18);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    margin-bottom: 14px;
}

.segmented-glider {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc(50% - 3px);
    background: linear-gradient(135deg, #ffffff 0%, #f2f2f4 100%);
    border-radius: 9999px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    pointer-events: none;
    z-index: 1;
}

.apple-segmented-container.mode-ft .segmented-glider {
    transform: translateX(100%);
}

.segmented-pill {
    flex: 1;
    height: 40px;
    border: none;
    background: transparent;
    color: #9c8e82;
    font-family: 'Onest', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    border-radius: 9999px;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: color 0.24s cubic-bezier(0.16, 1, 0.3, 1), transform 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    touch-action: manipulation;
}

.segmented-pill.active {
    color: #000000;
}

.segmented-pill:not(.active):hover {
    color: #ffffff;
}

.segmented-pill:active {
    transform: scale(0.97);
}

/* ===================================================
   ПОШАГОВЫЙ АККОРДЕОН (STEP-BY-STEP ACCORDION)
   =================================================== */
.cw-step-card {
    background: rgba(22, 17, 14, 0.74);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 140, 0, 0.12);
    border-radius: 20px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.cw-step-card.active {
    border-color: rgba(255, 140, 0, 0.45);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 24px rgba(255, 140, 0, 0.15);
    background: rgba(26, 20, 16, 0.82);
}

.cw-step-card.done {
    border-color: rgba(52, 199, 89, 0.35);
    background: rgba(18, 22, 18, 0.75);
}

.cw-step-card.locked {
    opacity: 0.55;
    background: rgba(16, 13, 11, 0.5);
    border-color: rgba(255, 255, 255, 0.05);
}

.cw-step-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 16px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: background-color 0.15s ease;
}

.cw-step-card.locked .cw-step-header {
    cursor: not-allowed;
}

.cw-step-card.done .cw-step-header:hover,
.cw-step-card.active .cw-step-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.cw-step-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cw-step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #1c1c1e;
    color: var(--theme-muted-text);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Unbounded', sans-serif;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.cw-step-card.active .cw-step-num {
    background: var(--astral-accent);
    color: #000000;
    border-color: var(--astral-accent);
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.4);
}

.cw-step-card.done .cw-step-num {
    background: var(--astral-green);
    color: #000000;
    border-color: var(--astral-green);
}

.cw-step-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.cw-step-card.locked .cw-step-title {
    color: #636366;
}

.cw-step-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-badge-done,
.status-badge-current,
.status-badge-locked {
    display: none;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9999px;
    padding: 3px 9px;
}

.status-badge-done {
    background: rgba(52, 199, 89, 0.12);
    border: 1px solid rgba(52, 199, 89, 0.3);
    color: var(--astral-green);
}

.status-badge-current {
    background: rgba(255, 140, 0, 0.12);
    border: 1px solid rgba(255, 140, 0, 0.3);
    color: var(--astral-accent);
}

.status-badge-locked {
    background: #1c1c1e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #636366;
    padding: 4px 6px;
}

.cw-step-card.done .status-badge-done {
    display: inline-flex;
}

.cw-step-card.active .status-badge-current {
    display: inline-flex;
}

.cw-step-card.locked .status-badge-locked {
    display: inline-flex;
}

/* Accordion Smooth Body Collapse/Expand */
.cw-step-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    opacity: 0;
}

.cw-step-card.active .cw-step-body {
    grid-template-rows: 1fr;
    opacity: 1;
}

.cw-step-content {
    overflow: hidden;
    min-height: 0;
    padding: 0 16px 16px 16px;
}

/* Button between steps */
.cw-step-btn {
    width: 100%;
    height: 46px;
    background: #1c1c1e;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: #ffffff;
    font-family: 'Onest', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.cw-step-btn:hover {
    background: #242426;
    border-color: rgba(255, 140, 0, 0.5);
    color: var(--astral-accent);
}

.cw-step-btn:active {
    transform: scale(0.98);
}

/* Primary Step Button (Bright Accent) */
.cw-step-btn.cw-step-primary-btn {
    background: var(--astral-accent-gradient);
    color: #000000;
    border: none;
    font-family: 'Unbounded', sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.2px;
    box-shadow: 0 4px 14px rgba(255, 140, 0, 0.28);
}

.cw-step-btn.cw-step-primary-btn:hover {
    filter: brightness(1.06);
    color: #000000;
    box-shadow: 0 6px 18px rgba(255, 140, 0, 0.38);
}

/* Row of navigation buttons inside step cards */
.cw-step-nav-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    width: 100%;
}

.cw-step-nav-row .cw-step-btn {
    margin-top: 0;
    flex: 1;
}

.cw-step-back-btn {
    height: 46px;
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: #aeaeb2;
    font-family: 'Onest', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 0 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.cw-step-back-btn:hover {
    background: #242428;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

.cw-step-back-btn:active {
    transform: scale(0.97);
}

.cw-step-subactions {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.cw-step-subactions .cw-step-back-btn {
    flex: 1;
    height: 46px;
}

.cw-step-subactions .cw-secondary-close-btn {
    flex: 1;
}

.cw-field {
    margin-bottom: 14px;
}

.cw-field:last-child {
    margin-bottom: 0;
}

.cw-field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.cw-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #d1d1d6;
    margin-bottom: 6px;
}

.cw-req {
    color: var(--astral-accent);
}

.cw-subtext {
    font-size: 11px;
    color: var(--theme-muted-text);
}

/* ===================================================
   ПОЛЯ ВВОДА (APPLE DARK INPUTS)
   =================================================== */
.cw-input-wrap,
.cw-password-wrap,
.cw-price-input-wrap {
    position: relative;
    width: 100%;
}

.cw-input {
    width: 100%;
    height: 46px;
    background: var(--theme-input-bg);
    border: 1px solid var(--theme-card-ring);
    border-radius: 14px;
    padding: 0 14px;
    font-size: 16px; /* 16px гарантирует отсутствие зума и дерганий на iOS */
    color: #ffffff;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    -webkit-appearance: none;
    touch-action: manipulation;
}

.cw-input:focus {
    border-color: var(--astral-accent);
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.2);
}

.cw-input::placeholder {
    color: var(--theme-input-placeholder);
    font-size: 13.5px;
}

.cw-pass-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--theme-muted-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.cw-price-input {
    padding-right: 36px;
    font-weight: 700;
}

.cw-currency-symbol {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    color: var(--astral-accent);
    font-size: 14px;
}

/* ===================================================
   ПОПУЛЯРНЫЕ СЕРВЕРЫ (ГОРИЗОНТАЛЬНЫЕ ТЕГИ)
   =================================================== */
.apple-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.apple-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #e5e5ea;
}

.apple-pills-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 6px;
    scrollbar-width: none;
}

.apple-pills-row::-webkit-scrollbar {
    display: none;
}

.cw-quick-pill {
    background: #1c1c1e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    padding: 7px 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.cw-quick-pill:hover {
    background: #242426;
    border-color: rgba(255, 255, 255, 0.16);
}

.cw-quick-pill:active,
.cw-quick-pill.selected {
    background: rgba(255, 140, 0, 0.16);
    border-color: var(--astral-accent);
    color: var(--astral-accent);
}

/* Поиск сервера */
.cw-search-input-wrap {
    position: relative;
    width: 100%;
}

.cw-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--theme-muted-text);
    pointer-events: none;
}

.cw-search-input {
    padding-left: 40px;
    padding-right: 40px;
}

.cw-search-spinner {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #333;
    border-top-color: var(--astral-accent);
    border-radius: 50%;
    animation: cwSpin 0.7s linear infinite;
}

.cw-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 50;
    background: #1c1c1e;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.cw-suggestion-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: background 0.15s;
}

.cw-suggestion-item:last-child {
    border-bottom: none;
}

.cw-suggestion-item:hover {
    background: #242426;
}

.suggestion-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.suggestion-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--astral-accent);
}

.suggestion-name {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
}

.suggestion-type {
    font-size: 11px;
    color: var(--theme-muted-text);
}

.suggestion-ip {
    font-size: 11.5px;
    color: var(--astral-accent);
    font-family: 'Unbounded', sans-serif;
    font-weight: 600;
}

.cw-verified-ip-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(52, 199, 89, 0.08);
    border: 1px solid rgba(52, 199, 89, 0.25);
    border-radius: 12px;
    padding: 8px 12px;
    margin-top: 8px;
    gap: 8px;
}

.cw-verified-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.cw-verified-title {
    font-size: 10.5px;
    color: var(--theme-muted-text);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.cw-verified-ip {
    font-family: 'Unbounded', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    color: #ffffff;
}

.cw-verified-check {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--astral-green);
    display: flex;
    align-items: center;
}

/* ===================================================
   ВИТРИНА РАНГОВ (ЖЕЛАЕМАЯ ПРИВИЛЕГИЯ)
   =================================================== */
/* ===================================================
   ВИТРИНА РАНГОВ (ЖЕЛАЕМАЯ ПРИВИЛЕГИЯ — МИНИМАЛИЗМ)
   =================================================== */
.cw-rank-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    max-height: 270px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding-right: 4px;
    box-sizing: border-box;
}

@keyframes cwRankSwitch {
    0% {
        opacity: 0;
        transform: translateY(6px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.cw-rank-grid.cw-anim-switch {
    animation: cwRankSwitch 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.cw-rank-grid::-webkit-scrollbar {
    width: 4px;
}

.cw-rank-grid::-webkit-scrollbar-thumb {
    background: #2c2c2e;
    border-radius: 10px;
}

.cw-rank-card {
    width: 100%;
    box-sizing: border-box;
    background: rgba(26, 20, 16, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    min-height: 52px;
    overflow: hidden;
    touch-action: pan-y;
}

.cw-rank-card:active {
    transform: scale(0.985);
}

.cw-rank-card:hover {
    border-color: rgba(255, 140, 0, 0.35);
    background: rgba(38, 28, 22, 0.85);
}

.cw-rank-card.active {
    border-color: var(--astral-accent);
    background: rgba(255, 140, 0, 0.14);
    box-shadow: 0 4px 18px rgba(255, 140, 0, 0.22);
}

.cw-rank-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    flex: 1;
}

.cw-rank-price {
    font-family: 'Unbounded', sans-serif;
    font-size: 11px;
    font-weight: 800;
    color: #000000;
    background: var(--astral-accent);
    padding: 4px 10px;
    border-radius: 9999px;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.35);
}

/* ===================================================
   ВАЛИДАЦИЯ ЛАТИНИЦЫ (ПОДСКАЗКИ)
   =================================================== */
.cw-latin-hint {
    display: none;
    font-size: 11px;
    color: var(--astral-accent);
    margin-top: 5px;
    padding-left: 2px;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.cw-input.invalid-latin {
    border-color: #ff453a !important;
    box-shadow: 0 0 0 2px rgba(255, 69, 58, 0.25) !important;
}

/* ===================================================
   ПРИВЯЗКА АККАУНТА (3 ВАРИАНТА В СТИЛЕ APPLE)
   =================================================== */
.cw-social-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
}

.cw-social-chip {
    cursor: pointer;
    width: 100%;
    display: block;
}

.cw-social-chip input {
    display: none;
}

.cw-social-chip-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 42px;
    background: #161618;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--theme-muted-text);
    transition: all 0.15s ease;
    box-sizing: border-box;
    text-align: center;
}

.cw-social-chip-inner svg {
    flex-shrink: 0;
}

.cw-social-chip input:checked + .cw-social-chip-inner {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ===================================================
   СКРИНШОТЫ
   =================================================== */
.cw-dropzone {
    position: relative;
    border: 1.5px dashed rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    padding: 20px 14px;
    text-align: center;
    background: #161618;
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cw-dropzone:hover,
.cw-dropzone.dragover {
    border-color: var(--astral-accent);
    background: rgba(255, 140, 0, 0.04);
}

.cw-drop-icon {
    color: var(--astral-accent);
    margin-bottom: 6px;
}

.cw-drop-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
}

.cw-drop-sub {
    font-size: 11px;
    color: var(--theme-muted-text);
    margin-top: 2px;
}

.cw-file-hidden {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.cw-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.cw-preview-thumb {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cw-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cw-remove-thumb {
    position: absolute;
    top: 3px;
    right: 3px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* ===================================================
   ПОЛЬЗОВАТЕЛЬСКОЕ СОГЛАШЕНИЕ
   =================================================== */
.cw-terms-card {
    background: var(--theme-surface);
    border: 1px solid var(--theme-card-ring);
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.cw-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.cw-terms-cb {
    margin-top: 2px;
    accent-color: var(--astral-accent);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.cw-terms-text {
    font-size: 11.5px;
    color: #aeaeb2;
    line-height: 1.4;
}

/* ===================================================
   КНОПКИ ДЕЙСТВИЯ (СТИЛЬ APPLE / WALL)
   =================================================== */
.cw-actions-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.cw-submit-btn {
    width: 100%;
    height: 52px;
    background: var(--astral-accent);
    color: #000000;
    border: none;
    border-radius: 16px;
    font-family: 'Unbounded', sans-serif;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(255, 140, 0, 0.35);
    transition: transform 0.15s ease, opacity 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cw-submit-btn:hover {
    filter: brightness(1.05);
}

.cw-submit-btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.cw-submit-btn:disabled {
    background: #2c2c2e;
    box-shadow: none;
    color: #636366;
    cursor: not-allowed;
    transform: none;
}

.btn-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-loader {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cw-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-top-color: #000000;
    border-radius: 50%;
    animation: cwSpin 0.7s linear infinite;
    display: inline-block;
}

.cw-secondary-close-btn {
    width: 100%;
    height: 46px;
    background: #161618;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--theme-muted-text);
    border-radius: 14px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.cw-secondary-close-btn:hover {
    background: #1c1c1e;
    color: #ffffff;
}

.cw-secondary-close-btn:active {
    transform: scale(0.98);
}

/* ===================================================
   ЭКРАН УСПЕХА
   =================================================== */
.cw-success-screen {
    position: relative;
    text-align: center;
    padding: 20px 0;
}

.cw-success-card {
    background: var(--theme-surface);
    border: 1px solid var(--theme-card-ring);
    border-radius: 24px;
    padding: 32px 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.cw-success-badge-icon {
    margin-bottom: 12px;
}

.cw-success-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
}

.cw-ticket-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 140, 0, 0.1);
    border: 1px solid rgba(255, 140, 0, 0.3);
    border-radius: 20px;
    padding: 6px 16px;
    margin-bottom: 14px;
}

.cw-ticket-prefix {
    font-size: 11.5px;
    color: var(--theme-muted-text);
}

.cw-ticket-number {
    font-family: 'Unbounded', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: var(--astral-accent);
}

.cw-success-desc {
    font-size: 13px;
    color: #aeaeb2;
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto;
}

@keyframes cwSpin {
    to { transform: rotate(360deg); }
}

/* ===================================================
   АДАПТИВНОСТЬ ДЛЯ DESKTOP (TELEGRAM DESKTOP / WEB)
   =================================================== */
@media (min-width: 641px) {
    body {
        display: flex;
        align-items: center;
        justify-content: center;
        background: #060504 radial-gradient(circle 800px at 50% 30%, rgba(255, 122, 0, 0.12), transparent 70%);
        padding: 24px 0;
        overflow: hidden;
    }

    .app-root {
        max-width: 480px;
        width: 100%;
        height: min(920px, calc(100dvh - 36px));
        min-height: min(920px, calc(100dvh - 36px));
        margin: 0 auto;
        border-radius: 28px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 140, 0, 0.15);
        background: #090706;
        position: relative;
        overflow: hidden;
    }

    .cw-fixed-header {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        max-width: 480px;
        margin: 0 auto;
        border-top-left-radius: 28px;
        border-top-right-radius: 28px;
        padding-top: 16px;
        padding-bottom: 12px;
    }

    .app-container {
        max-width: 100%;
        height: 100%;
        overflow-y: auto;
        padding-top: calc(var(--cw-header-total-height, 90px) + 16px);
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }

    /* Стильный тонкий скроллбар */
    .app-container::-webkit-scrollbar {
        width: 5px;
    }
    .app-container::-webkit-scrollbar-track {
        background: transparent;
    }
    .app-container::-webkit-scrollbar-thumb {
        background: rgba(255, 140, 0, 0.25);
        border-radius: 10px;
    }
    .app-container::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 140, 0, 0.5);
    }
}

/* ===================================================
   PULL-TO-REFRESH И ПАСХАЛКА «ПРОМО-КОД VOID»
   =================================================== */
.cw-pull-refresh {
    width: 100%;
    height: 0;
    opacity: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: height 0.15s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.15s ease;
    box-sizing: border-box;
    pointer-events: none;
}

.cw-pull-refresh.pulling,
.cw-pull-refresh.refreshing {
    opacity: 1;
    pointer-events: auto;
}

.cw-easter-egg {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 140, 0, 0.12);
    border: 1px solid rgba(255, 140, 0, 0.55);
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.35), inset 0 0 12px rgba(255, 140, 0, 0.2);
    cursor: pointer;
    user-select: none;
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease;
}

.cw-easter-egg:active {
    transform: scale(0.96);
    box-shadow: 0 0 28px rgba(255, 140, 0, 0.6);
}

.cw-easter-glow {
    position: absolute;
    inset: -6px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 140, 0, 0.4) 0%, transparent 70%);
    filter: blur(8px);
    pointer-events: none;
    animation: easterGlowPulse 2s infinite alternate ease-in-out;
}

@keyframes easterGlowPulse {
    0% { opacity: 0.5; transform: scale(0.96); }
    100% { opacity: 1; transform: scale(1.04); }
}

.cw-easter-badge {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cw-easter-sparkle {
    font-size: 14px;
}

.cw-easter-text {
    font-family: 'Unbounded', sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: #ffaa33;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 170, 51, 0.6);
}

.cw-easter-copy {
    font-size: 9.5px;
    font-weight: 700;
    background: #ff8c00;
    color: #000000;
    padding: 3px 7px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.cw-pull-spinner-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--theme-muted-text);
    font-size: 11px;
    font-weight: 500;
}

.cw-pull-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 140, 0, 0.25);
    border-top-color: #ff8c00;
    border-radius: 50%;
    animation: cwSpin 0.8s linear infinite;
    display: none;
}

.cw-pull-refresh.refreshing .cw-pull-spinner {
    display: block;
}

/* ===================================================
   НИЖНЯЯ ПАНЕЛЬ НАВИГАЦИИ (BOTTOM NAVIGATION BAR)
   =================================================== */
.cw-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(14, 10, 8, 0.88);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border-top: 1px solid rgba(255, 140, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 9999;
    box-sizing: border-box;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.cw-nav-tab {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    border: none;
    color: #8a7e74;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease, transform 0.15s ease;
    position: relative;
    padding: 0 4px;
}

.cw-nav-tab .cw-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
}

.cw-nav-tab .cw-nav-label {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.cw-nav-tab.active {
    color: #ff8c00;
}

.cw-nav-tab.active .cw-nav-icon {
    transform: translateY(-2px);
    background: rgba(255, 140, 0, 0.14);
}

.cw-nav-tab:active {
    transform: scale(0.93);
}

.cw-nav-dot {
    position: absolute;
    top: 6px;
    right: calc(50% - 14px);
    width: 7px;
    height: 7px;
    background: #ff3b30;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(255, 59, 48, 0.7);
}

/* ===================================================
   ТАБ-СТРАНИЦЫ И СТРУКТУРА КОНТЕНТА
   =================================================== */
.cw-tab-page {
    width: 100%;
    animation: pageFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.cw-page-header {
    margin-bottom: 16px;
    padding: 4px 2px;
}

.cw-page-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
    margin-bottom: 4px;
}

.cw-page-sub {
    font-size: 12.5px;
    color: var(--theme-muted-text);
    line-height: 1.4;
}

/* ===================================================
   СОВМЕЩЕНИЕ СЕРВЕРОВ И ДОНОР-КАРТОЧКИ
   =================================================== */
.cw-combine-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.12) 0%, rgba(255, 106, 0, 0.05) 100%);
    border: 1px solid rgba(255, 140, 0, 0.25);
    margin-bottom: 16px;
}

.cw-combine-icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
}

.cw-combine-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
    line-height: 1.4;
}

.cw-combine-info strong {
    color: #ff9d2b;
    font-weight: 700;
}

.cw-combine-info span {
    color: #c4b5aa;
}

.cw-donors-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 14px;
}

.cw-donor-card {
    background: rgba(26, 19, 15, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    padding: 14px;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: border-color 0.2s ease;
}

.cw-donor-card:hover {
    border-color: rgba(255, 140, 0, 0.3);
}

.cw-donor-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cw-donor-badge {
    font-family: 'Unbounded', sans-serif;
    font-size: 11px;
    font-weight: 800;
    color: #ff9d2b;
    background: rgba(255, 140, 0, 0.14);
    padding: 3px 9px;
    border-radius: 8px;
    letter-spacing: 0.5px;
}

.cw-del-server-btn {
    background: rgba(255, 59, 48, 0.12);
    color: #ff453a;
    border: 1px solid rgba(255, 59, 48, 0.25);
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background 0.15s ease, transform 0.15s ease;
}

.cw-del-server-btn:hover {
    background: rgba(255, 59, 48, 0.24);
    transform: scale(1.02);
}

.cw-add-server-btn {
    width: 100%;
    background: rgba(255, 140, 0, 0.08);
    border: 1.5px dashed rgba(255, 140, 0, 0.45);
    border-radius: 14px;
    padding: 13px;
    color: #ff9d2b;
    font-family: 'Onest', sans-serif;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    margin-bottom: 18px;
}

.cw-add-server-btn:hover {
    background: rgba(255, 140, 0, 0.16);
    border-color: #ff8c00;
    transform: translateY(-1px);
}

.cw-add-server-btn:active {
    transform: scale(0.98);
}

/* ===================================================
   КНОПКА «ОЧИСТИТЬ ТИКЕТ»
   =================================================== */
.cw-clear-btn {
    background: rgba(255, 59, 48, 0.12);
    color: #ff453a;
    border: 1px solid rgba(255, 59, 48, 0.28);
    border-radius: 12px;
    padding: 11px 14px;
    font-family: 'Onest', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    user-select: none;
}

.cw-clear-btn:hover {
    background: rgba(255, 59, 48, 0.22);
    border-color: rgba(255, 59, 48, 0.5);
    transform: translateY(-1px);
}

.cw-clear-btn:active {
    transform: scale(0.96);
}

/* ===================================================
   ВКЛАДКА: ЦЕНА НА САЙТЕ (КАТАЛОГ)
   =================================================== */
.cw-pricing-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.cw-filter-pill {
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #a89d95;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.cw-filter-pill.active {
    background: #ff8c00;
    color: #000000;
    font-weight: 800;
    border-color: #ff8c00;
    box-shadow: 0 4px 14px rgba(255, 140, 0, 0.35);
}

.cw-pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

@media (min-width: 440px) {
    .cw-pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.cw-price-card {
    background: rgba(24, 18, 14, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.cw-price-card:hover {
    border-color: rgba(255, 140, 0, 0.4);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.cw-price-card.featured {
    border-color: rgba(255, 140, 0, 0.5);
    background: linear-gradient(145deg, rgba(38, 26, 18, 0.9) 0%, rgba(20, 15, 12, 0.85) 100%);
}

.cw-price-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    background: #ff8c00;
    color: #000000;
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.cw-price-top {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cw-price-name {
    font-family: 'Unbounded', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
}

.cw-price-val-wrap {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.cw-price-amount {
    font-family: 'Unbounded', sans-serif;
    font-size: 20px;
    font-weight: 900;
    color: #ff9d2b;
}

.cw-price-old {
    font-size: 12px;
    color: #7c726a;
    text-decoration: line-through;
}

.cw-price-perks {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 11.5px;
    color: #c4b5aa;
    margin: 4px 0;
}

.cw-price-perks li {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cw-price-perks li::before {
    content: "✓";
    color: #34c759;
    font-weight: 900;
    font-size: 12px;
}

.cw-price-action-btn {
    width: 100%;
    background: rgba(255, 140, 0, 0.12);
    border: 1px solid rgba(255, 140, 0, 0.35);
    border-radius: 10px;
    padding: 8px 10px;
    color: #ff9d2b;
    font-family: 'Onest', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.cw-price-action-btn:hover {
    background: #ff8c00;
    color: #000000;
    border-color: #ff8c00;
}

/* ===================================================
   ВКЛАДКА: ПРАВИЛА ПЕРЕНОСОВ (АККОРДЕОН)
   =================================================== */
.cw-rules-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.cw-rule-card {
    background: rgba(24, 18, 14, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.cw-rule-card.active {
    border-color: rgba(255, 140, 0, 0.35);
    background: rgba(30, 22, 17, 0.85);
}

.cw-rule-header {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.cw-rule-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cw-rule-icon {
    font-size: 16px;
}

.cw-rule-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(255, 140, 0, 0.12);
    border: 1px solid rgba(255, 140, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff8c00;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.cw-rule-card.active .cw-rule-icon-box {
    background: rgba(255, 140, 0, 0.22);
    border-color: rgba(255, 140, 0, 0.45);
    box-shadow: 0 0 12px rgba(255, 140, 0, 0.25);
}

.cw-rule-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.cw-rule-arrow {
    font-size: 14px;
    color: #8a7e74;
    transition: transform 0.2s ease;
}

.cw-rule-card.active .cw-rule-arrow {
    transform: rotate(180deg);
    color: #ff8c00;
}

.cw-rule-body {
    padding: 0 16px 14px 16px;
    font-size: 12.5px;
    color: #c4b5aa;
    line-height: 1.5;
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    margin-top: 2px;
    padding-top: 10px;
}

.cw-rule-card.active .cw-rule-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cw-rules-cta {
    margin-top: 8px;
    margin-bottom: 24px;
}

/* ===================================================
   ВКЛАДКА: ЧАТ И ТИКЕТЫ
   =================================================== */
.cw-tickets-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.cw-ticket-item {
    background: rgba(24, 18, 14, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cw-ticket-item:hover {
    border-color: rgba(255, 140, 0, 0.4);
    transform: translateY(-1px);
}

.cw-t-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cw-t-code-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cw-t-code {
    font-family: 'Unbounded', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
}

.cw-t-status-pill {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cw-t-status-pill.pending {
    background: rgba(255, 170, 0, 0.16);
    color: #ffaa00;
    border: 1px solid rgba(255, 170, 0, 0.3);
}

.cw-t-status-pill.in_progress {
    background: rgba(10, 132, 255, 0.16);
    color: #0a84ff;
    border: 1px solid rgba(10, 132, 255, 0.3);
}

.cw-t-status-pill.approved {
    background: rgba(52, 199, 89, 0.16);
    color: #34c759;
    border: 1px solid rgba(52, 199, 89, 0.3);
}

.cw-t-status-pill.rejected,
.cw-t-status-pill.cancelled {
    background: rgba(255, 59, 48, 0.16);
    color: #ff453a;
    border: 1px solid rgba(255, 59, 48, 0.3);
}

.cw-t-sub {
    font-size: 11.5px;
    color: #8a7e74;
}

.cw-t-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cw-t-chat-btn {
    background: rgba(255, 140, 0, 0.14);
    color: #ff8c00;
    border: 1px solid rgba(255, 140, 0, 0.3);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 11.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ЧАТ ТИКЕТА */
.cw-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(24, 18, 14, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    margin-bottom: 12px;
}

.cw-chat-back-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.cw-chat-title-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cw-chat-code {
    font-family: 'Unbounded', sans-serif;
    font-size: 13.5px;
    font-weight: 800;
    color: #ffffff;
}

.cw-chat-status {
    font-size: 11px;
    color: #ff9d2b;
    font-weight: 600;
}

.cw-chat-clear-btn {
    background: rgba(255, 59, 48, 0.12);
    color: #ff453a;
    border: 1px solid rgba(255, 59, 48, 0.25);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cw-chat-clear-btn:active {
    transform: scale(0.95);
}

.cw-chat-body {
    min-height: 260px;
    max-height: 420px;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(18, 14, 11, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    margin-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

.cw-chat-empty {
    margin: auto;
    text-align: center;
    color: #7c726a;
    font-size: 12px;
    padding: 20px;
    line-height: 1.4;
}

.cw-chat-bubble {
    max-width: 82%;
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.45;
    position: relative;
    word-break: break-word;
}

.cw-chat-bubble.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #ffa02e 0%, #ff6a00 100%);
    color: #000000;
    font-weight: 500;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 14px rgba(255, 140, 0, 0.3);
}

.cw-chat-bubble.admin {
    align-self: flex-start;
    background: rgba(36, 27, 21, 0.95);
    border: 1px solid rgba(255, 140, 0, 0.25);
    color: #ffffff;
    border-bottom-left-radius: 4px;
}

.cw-chat-bubble.system {
    align-self: center;
    background: rgba(255, 255, 255, 0.06);
    color: #a89d95;
    font-size: 11px;
    border-radius: 10px;
    padding: 4px 10px;
}

.cw-bubble-header {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.cw-chat-bubble.admin .cw-bubble-header {
    color: #ff9d2b;
}

.cw-chat-bubble.user .cw-bubble-header {
    color: rgba(0, 0, 0, 0.7);
}

.cw-bubble-time {
    font-size: 9.5px;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}

.cw-quick-replies-bar {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.cw-quick-reply-chip {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: #c4b5aa;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cw-quick-reply-chip:hover {
    background: rgba(255, 140, 0, 0.15);
    border-color: rgba(255, 140, 0, 0.4);
    color: #ffaa33;
}

.cw-chat-input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(24, 18, 14, 0.9);
    border: 1px solid rgba(255, 140, 0, 0.25);
    border-radius: 16px;
    padding: 4px 6px 4px 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.cw-chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 14px;
    font-family: 'Onest', sans-serif;
    outline: none;
    padding: 8px 0;
}

.cw-chat-input::placeholder {
    color: #7c726a;
}

.cw-chat-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #ff8c00;
    border: none;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease, background 0.15s ease;
}

.cw-chat-send-btn:hover {
    background: #ffa02e;
    transform: scale(1.04);
}

.cw-chat-send-btn:active {
    transform: scale(0.92);
}

/* ===================================================
   ВСПЛЫВАЮЩИЙ ТОСТ (TOAST)
   =================================================== */
.cw-toast {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(18, 14, 11, 0.95);
    border: 1px solid rgba(255, 140, 0, 0.5);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(255, 140, 0, 0.3);
    color: #ffffff;
    font-family: 'Onest', sans-serif;
    font-weight: 700;
    font-size: 13px;
    padding: 9px 18px;
    border-radius: 999px;
    z-index: 9999999;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.cw-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

@keyframes cwSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes cwCollapse {
  from { opacity: 1; max-height: 500px; }
  to { opacity: 0.6; max-height: 58px; }
}
@keyframes cwExpand {
  from { opacity: 0.6; max-height: 58px; }
  to { opacity: 1; max-height: 500px; }
}
.cw-anim-slide-in { animation: cwSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.cw-donor-collapsed { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: rgba(255, 140, 0, 0.08); border: 1px solid rgba(255, 140, 0, 0.2); border-radius: 14px; cursor: pointer; transition: all 0.25s ease; margin-bottom: 10px; }
.cw-donor-collapsed:active { transform: scale(0.97); }
.cw-collapsed-info { font-size: 13px; font-weight: 600; color: #f5e6d3; }
.cw-collapsed-edit { font-size: 11px; color: #ff8c00; background: none; border: 1px solid rgba(255, 140, 0, 0.3); border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.cw-donor-card.collapsing { animation: cwCollapse 0.3s ease forwards; overflow: hidden; }
.cw-donor-card.expanding { animation: cwExpand 0.3s ease forwards; overflow: hidden; }

/* Admin Panel */
.cw-admin-section { margin-bottom: 20px; }
.cw-admin-section-title { font-size: 15px; font-weight: 700; color: #ff8c00; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid rgba(255, 140, 0, 0.15); }
.cw-admin-ticket-card { background: rgba(30, 20, 10, 0.7); border: 1px solid rgba(255, 140, 0, 0.12); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; transition: all 0.2s ease; }
.cw-admin-ticket-card:active { transform: scale(0.98); }
.cw-admin-ticket-card .ticket-code { font-weight: 700; color: #ff8c00; font-size: 13px; }
.cw-admin-ticket-card .ticket-info { font-size: 12px; color: #a09080; margin-top: 4px; }
.cw-admin-ticket-card .ticket-status { font-size: 11px; padding: 2px 8px; border-radius: 6px; display: inline-block; margin-top: 6px; }
.cw-admin-ticket-card .ticket-status.pending { background: rgba(255, 200, 0, 0.15); color: #ffc800; }
.cw-admin-ticket-card .ticket-status.in_progress { background: rgba(0, 150, 255, 0.15); color: #0096ff; }
.cw-admin-ticket-card .ticket-status.approved { background: rgba(0, 200, 100, 0.15); color: #00c864; }
.cw-admin-ticket-card .ticket-status.rejected { background: rgba(255, 60, 60, 0.15); color: #ff3c3c; }
.cw-admin-chat-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: rgba(30, 20, 10, 0.7); border: 1px solid rgba(255, 140, 0, 0.12); border-radius: 14px; margin-bottom: 8px; cursor: pointer; transition: all 0.2s ease; }
.cw-admin-chat-item:active { transform: scale(0.98); }
.cw-admin-chat-item .chat-name { font-size: 14px; font-weight: 600; color: #f5e6d3; }
.cw-admin-chat-item .chat-preview { font-size: 12px; color: #8a7e74; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.cw-admin-chat-item .chat-unread { background: #ff3b30; color: #fff; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.cw-admin-filters { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.cw-admin-filter-btn { font-size: 12px; padding: 5px 12px; border-radius: 8px; border: 1px solid rgba(255, 140, 0, 0.2); background: transparent; color: #a09080; cursor: pointer; transition: all 0.2s ease; }
.cw-admin-filter-btn.active { background: rgba(255, 140, 0, 0.15); color: #ff8c00; border-color: #ff8c00; }
.cw-admin-form-row { display: flex; gap: 8px; margin-bottom: 12px; }
.cw-admin-form-row input { flex: 1; }
.cw-admin-add-btn { font-size: 13px; padding: 8px 16px; background: #ff8c00; color: #fff; border: none; border-radius: 10px; cursor: pointer; font-weight: 600; }
.cw-admin-remove-btn { font-size: 11px; color: #ff3b30; background: none; border: 1px solid rgba(255, 60, 60, 0.3); border-radius: 6px; padding: 3px 8px; cursor: pointer; margin-left: 8px; }

.cw-support-header { text-align: center; padding: 16px 0 12px; }
.cw-support-header h3 { font-size: 16px; font-weight: 700; color: #f5e6d3; }
.cw-support-header p { font-size: 12px; color: #8a7e74; margin-top: 4px; }

/* ===================================================
   ПРОМО-КАРТОЧКА VOID В КОНЦЕ СТРАНИЦ (БОНУС ПРИ ПЕРЕНОСЕ)
   =================================================== */
.cw-bottom-promo-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg, rgba(32, 22, 16, 0.88) 0%, rgba(18, 14, 11, 0.95) 100%);
    border: 1px dashed rgba(255, 140, 0, 0.38);
    border-radius: 16px;
    padding: 12px 16px;
    margin-top: 18px;
    margin-bottom: 24px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 16px rgba(255, 140, 0, 0.08);
    position: relative;
    overflow: hidden;
    user-select: none;
    touch-action: manipulation;
}

.cw-bottom-promo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 140, 0, 0.08), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.cw-bottom-promo-card:hover::before,
.cw-bottom-promo-card:active::before {
    left: 150%;
}

.cw-bottom-promo-card:hover {
    border-color: rgba(255, 140, 0, 0.65);
    background: linear-gradient(135deg, rgba(38, 26, 18, 0.92) 0%, rgba(22, 16, 12, 0.98) 100%);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 20px rgba(255, 140, 0, 0.16);
}

.cw-bottom-promo-card:active {
    transform: scale(0.985);
    border-color: rgba(255, 140, 0, 0.8);
}

.cw-promo-badge-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.cw-promo-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #a09080;
}

.cw-promo-code-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cw-promo-prefix {
    font-size: 12px;
    color: #e6dacd;
    font-weight: 600;
}

.cw-promo-code {
    font-family: 'Unbounded', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #ff8c00;
    letter-spacing: 1.5px;
    background: rgba(255, 140, 0, 0.12);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 140, 0, 0.28);
}

.cw-promo-action {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 140, 0, 0.15);
    border: 1px solid rgba(255, 140, 0, 0.35);
    color: #ff8c00;
    font-family: 'Onest', sans-serif;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cw-promo-action:hover,
.cw-bottom-promo-card:hover .cw-promo-action {
    background: #ff8c00;
    color: #120e0a;
}

/* ===================================================
   АДМИН-ПАНЕЛЬ: ДЕТАЛЬНАЯ КАРТОЧКА ТИКЕТА И МОДАЛЬНОЕ ОКНО
   =================================================== */
.cw-modal {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
    pointer-events: none;
}

/* Гарантированное отображение flex-контейнера при открытии */
.cw-modal.active,
.cw-modal[style*="display: block"],
.cw-modal[style*="display: flex"] {
    display: flex !important;
    pointer-events: auto !important;
}

.cw-modal-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.76);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    z-index: 1;
}

.cw-admin-detail-dialog {
    position: relative;
    width: 100%;
    max-width: 540px;
    max-height: 88vh;
    margin: 0 auto;
    background: #130e0a;
    border: 1px solid rgba(255, 140, 0, 0.32);
    border-bottom: none;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.85), 0 0 35px rgba(255, 140, 0, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: cwSheetSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    z-index: 2;
    box-sizing: border-box;
}

@keyframes cwSheetSlideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cw-modal-drag-handle {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.22);
    margin: 10px auto 4px;
    flex-shrink: 0;
}

.cw-admin-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px 14px;
    background: rgba(26, 18, 12, 0.98);
    border-bottom: 1px solid rgba(255, 140, 0, 0.18);
    flex-shrink: 0;
}

.cw-detail-header-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cw-detail-code-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cw-detail-code {
    font-family: 'Unbounded', sans-serif;
    font-size: 17px;
    font-weight: 800;
    color: #ff8c00;
    letter-spacing: -0.3px;
}

.cw-detail-date {
    font-size: 11px;
    color: #9c8e82;
}

.cw-modal-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2d5c8;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cw-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    transform: rotate(90deg);
}

.cw-admin-detail-body {
    padding: 16px 18px max(24px, env(safe-area-inset-bottom, 24px));
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

/* Профиль игрока в Telegram */
.cw-admin-player-card {
    background: linear-gradient(145deg, rgba(32, 22, 14, 0.95), rgba(20, 14, 9, 0.95));
    border: 1px solid rgba(255, 140, 0, 0.25);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cw-player-info-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cw-player-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.25), rgba(255, 140, 0, 0.08));
    border: 1.5px solid rgba(255, 140, 0, 0.38);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #ff8c00;
    flex-shrink: 0;
}

.cw-player-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.cw-player-name {
    font-size: 15px;
    font-weight: 700;
    color: #f7efe7;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cw-player-sub {
    font-size: 12px;
    color: #9c8e82;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cw-btn-tg-direct {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #2AABEE, #229ED9);
    color: #ffffff;
    padding: 11px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(42, 171, 238, 0.35);
}

.cw-btn-tg-direct:hover {
    background: linear-gradient(135deg, #32b5f9, #25a4e0);
    box-shadow: 0 6px 18px rgba(42, 171, 238, 0.45);
}

.cw-btn-tg-direct:active {
    transform: scale(0.98);
}

/* Секции деталей */
.cw-detail-section {
    background: rgba(22, 15, 10, 0.7);
    border: 1px solid rgba(255, 140, 0, 0.16);
    border-radius: 16px;
    padding: 14px 16px;
}

.cw-detail-section-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #ff8c00;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 140, 0, 0.12);
}

.cw-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.cw-detail-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 140, 0, 0.12);
    border-radius: 10px;
    padding: 8px 12px;
}

.cw-detail-label {
    font-size: 11px;
    color: #9c8e82;
}

.cw-detail-val {
    font-size: 13px;
    color: #f7efe7;
    font-weight: 600;
    word-break: break-word;
}

.cw-highlight-orange {
    color: #ff991a !important;
    font-weight: 700;
}

/* Карточки доноров */
.cw-detail-donors {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cw-detail-donor-card {
    background: rgba(16, 11, 8, 0.9);
    border: 1px solid rgba(255, 140, 0, 0.2);
    border-radius: 12px;
    padding: 12px 14px;
}

.cw-donor-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 7px;
    border-bottom: 1px solid rgba(255, 140, 0, 0.12);
}

.cw-donor-num {
    font-size: 13px;
    font-weight: 700;
    color: #ff8c00;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cw-donor-ip {
    font-size: 11px;
    color: #a09080;
    font-family: monospace;
    background: rgba(0, 0, 0, 0.4);
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid rgba(255, 140, 0, 0.1);
}

.cw-donor-fields {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.cw-donor-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.cw-donor-field:last-child {
    border-bottom: none;
}

.cw-donor-field .lbl {
    color: #9c8e82;
    flex-shrink: 0;
}

.cw-donor-field .val {
    color: #f7ede3;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.cw-pwd-val-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cw-pwd-text {
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 7px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 12px;
    color: #ffd699;
    border: 1px solid rgba(255, 140, 0, 0.2);
}

.cw-pwd-redacted {
    font-size: 11px;
    color: #8a7e74;
    font-style: italic;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
}

.cw-btn-pwd-toggle,
.cw-btn-pwd-copy {
    background: rgba(255, 140, 0, 0.12);
    border: 1px solid rgba(255, 140, 0, 0.28);
    color: #ff8c00;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1;
}

.cw-btn-pwd-toggle:hover,
.cw-btn-pwd-copy:hover {
    background: rgba(255, 140, 0, 0.25);
    border-color: #ff8c00;
}

/* Галерея скриншотов */
.cw-detail-gallery {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: thin;
}

.cw-detail-screen-thumb {
    display: block;
    width: 88px;
    height: 88px;
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid rgba(255, 140, 0, 0.28);
    background: rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.cw-detail-screen-thumb:hover {
    transform: scale(1.05);
    border-color: #ff8c00;
    box-shadow: 0 6px 16px rgba(255, 140, 0, 0.25);
}

.cw-detail-screen-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Сообщения по заявке */
.cw-detail-msgs-box {
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 10px;
    margin-bottom: 10px;
}

.cw-msg-bubble {
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 90%;
    font-size: 13px;
    line-height: 1.35;
}

.cw-msg-admin {
    align-self: flex-end;
    background: rgba(255, 140, 0, 0.18);
    border: 1px solid rgba(255, 140, 0, 0.32);
    color: #fff2e0;
}

.cw-msg-user {
    align-self: flex-start;
    background: rgba(42, 171, 238, 0.18);
    border: 1px solid rgba(42, 171, 238, 0.32);
    color: #e0f4ff;
}

.cw-msg-meta {
    font-size: 10px;
    color: #a09080;
    margin-bottom: 3px;
}

.cw-admin-msg-bar {
    display: flex;
    gap: 8px;
}

.cw-admin-msg-bar input {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 140, 0, 0.25);
    border-radius: 10px;
    padding: 10px 14px;
    color: #f5e6d3;
    font-size: 13px;
    font-family: inherit;
    outline: none;
}

.cw-admin-msg-bar input:focus {
    border-color: #ff8c00;
}

.cw-admin-msg-bar button {
    background: #ff8c00;
    color: #0d0b09;
    border: none;
    border-radius: 10px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.cw-admin-msg-bar button:hover {
    filter: brightness(1.1);
}

/* Действия со статусом */
.cw-status-current-banner {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
    line-height: 1.4;
}

.cw-status-current-banner.approved {
    background: rgba(52, 199, 89, 0.16);
    border: 1px solid rgba(52, 199, 89, 0.4);
    color: #4cd964;
}

.cw-status-current-banner.rejected {
    background: rgba(255, 59, 48, 0.16);
    border: 1px solid rgba(255, 59, 48, 0.4);
    color: #ff6b6b;
}

.cw-detail-actions-panel {
    background: rgba(26, 17, 10, 0.65);
    border: 1px solid rgba(255, 140, 0, 0.2);
    border-radius: 14px;
    padding: 14px;
}

.cw-status-btn-group {
    display: flex;
    gap: 10px;
}

.cw-status-action-btn {
    flex: 1;
    height: 44px;
    border-radius: 12px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.cw-status-action-btn:active {
    transform: scale(0.97);
}

.cw-btn-approve {
    background: #34c759;
    color: #08240f;
    box-shadow: 0 4px 14px rgba(52, 199, 89, 0.28);
}

.cw-btn-approve:hover {
    filter: brightness(1.08);
}

.cw-btn-reject {
    background: #ff3b30;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(255, 59, 48, 0.28);
}

.cw-btn-reject:hover {
    filter: brightness(1.08);
}

.cw-reject-chips-label {
    font-size: 11px;
    color: #a09080;
    margin-bottom: 6px;
}

.cw-reject-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.cw-reject-chip {
    background: rgba(255, 59, 48, 0.12);
    border: 1px solid rgba(255, 59, 48, 0.28);
    color: #ff9994;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cw-reject-chip:hover {
    background: rgba(255, 59, 48, 0.24);
    color: #ffffff;
}

.cw-btn-danger {
    background: #ff3b30;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    height: 40px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.cw-btn-danger:hover {
    filter: brightness(1.1);
}

/* ===================================================
   АДМИН-ВКЛАДКА НАВИГАЦИИ (ПОКАЗЫВАЕТСЯ ТОЛЬКО АДМИНАМ)
   =================================================== */
.cw-admin-only-tab {
    display: none !important;
}

.cw-admin-only-tab.visible {
    display: flex !important;
}

/* ===================================================
   МОДАЛЬНОЕ ОКНО ПОДТВЕРЖДЕНИЯ ТИКЕТА (П. 4)
   =================================================== */
.cw-confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    animation: cwFadeIn 0.2s ease-out forwards;
}

.cw-confirm-modal-card {
    background: linear-gradient(165deg, #18120c 0%, #100b07 100%);
    border: 1px solid rgba(255, 159, 10, 0.32);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 35px rgba(255, 140, 0, 0.14);
    border-radius: 24px;
    width: 100%;
    max-width: 380px;
    padding: 22px 20px;
    box-sizing: border-box;
    animation: cwModalPop 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cwModalPop {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.cw-confirm-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 18px;
}

.cw-confirm-modal-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cw-confirm-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 159, 10, 0.15);
    border: 1px solid rgba(255, 159, 10, 0.35);
    color: #ff9f0a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cw-confirm-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #f5e6d3;
    margin: 0;
    line-height: 1.25;
}

.cw-confirm-subtitle {
    font-size: 11px;
    color: #8a7e74;
    display: block;
    margin-top: 3px;
}

.cw-modal-close-btn {
    background: none;
    border: none;
    color: #8a7e74;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.15s ease;
}

.cw-modal-close-btn:hover {
    color: #fff;
}

/* Карточка сводки (квитанция) */
.cw-confirm-receipt {
    background: rgba(24, 18, 12, 0.85);
    border: 1px solid rgba(255, 159, 10, 0.2);
    border-radius: 18px;
    padding: 14px;
    margin-bottom: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.cw-receipt-main-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 159, 10, 0.08);
    border: 1px solid rgba(255, 159, 10, 0.25);
    border-radius: 12px;
    padding: 12px 14px;
}

.cw-receipt-main-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #c8b8a8;
}

.cw-receipt-main-label svg {
    color: #ff9f0a;
}

.cw-receipt-main-amount {
    font-family: 'Unbounded', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #ff9f0a;
    text-shadow: 0 0 14px rgba(255, 159, 10, 0.35);
}

.cw-receipt-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 14px 0 12px;
}

.cw-receipt-divider::before,
.cw-receipt-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px dashed rgba(255, 159, 10, 0.22);
}

.cw-receipt-divider-text {
    padding: 0 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ff9f0a;
}

.cw-receipt-rewards-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cw-reward-row {
    display: flex;
    align-items: center;
    background: rgba(12, 9, 6, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 10px 12px;
    gap: 10px;
}

.cw-reward-icon-box {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cw-reward-icon-box.role-icon {
    background: rgba(255, 159, 10, 0.16);
    color: #ff9f0a;
    border: 1px solid rgba(255, 159, 10, 0.3);
}

.cw-reward-icon-box.riliki-icon {
    background: rgba(255, 214, 10, 0.16);
    color: #ffd60a;
    border: 1px solid rgba(255, 214, 10, 0.3);
}

.cw-reward-details {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.cw-reward-label {
    font-size: 10.5px;
    color: #8a7e74;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.cw-reward-value {
    font-family: 'Unbounded', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: #f5e6d3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cw-reward-value.riliki-highlight {
    color: #ffd60a;
}

.cw-reward-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.cw-reward-badge.status-badge {
    background: rgba(52, 199, 89, 0.15);
    color: #34c759;
    border: 1px solid rgba(52, 199, 89, 0.35);
}

.cw-reward-badge.bonus-badge {
    background: rgba(255, 159, 10, 0.15);
    color: #ff9f0a;
    border: 1px solid rgba(255, 159, 10, 0.35);
}

.cw-confirm-sub {
    font-size: 12.5px;
    color: #a09080;
    text-align: center;
    margin: 0 0 16px;
    line-height: 1.4;
}

.cw-confirm-btns-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
    width: 100%;
}

.cw-confirm-btns-row .cw-step-btn,
.cw-confirm-btns-row .cw-step-back-btn {
    height: 48px;
    margin: 0 !important;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1;
    vertical-align: middle;
    transition: all 0.15s ease;
}

.cw-confirm-btns-row .cw-step-btn {
    flex: 1.25;
    background: var(--astral-accent-gradient);
    color: #000000;
    font-family: 'Unbounded', sans-serif;
    font-weight: 800;
    border: none;
    box-shadow: 0 4px 14px rgba(255, 140, 0, 0.28);
}

.cw-confirm-btns-row .cw-step-back-btn {
    flex: 1;
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e5e5ea;
    font-family: 'Onest', sans-serif;
    font-weight: 600;
}


