/**
 * THEME v5.0 — Premium Design System
 */
:root {
    --pia-navy: #1d2a45;
    --pia-navy-light: #253352;
    --pia-gold: #d4af37;
    --pia-gold-soft: rgba(212, 175, 55, 0.12);
    --bg-app: #eef1f6;
    --card-bg: #ffffff;
    --card-border: rgba(29, 42, 69, 0.06);
    --card-shadow: 0 1px 3px rgba(29, 42, 69, 0.04), 0 4px 12px rgba(29, 42, 69, 0.03);
    --card-shadow-hover: 0 2px 8px rgba(29, 42, 69, 0.06), 0 8px 24px rgba(29, 42, 69, 0.06);
    --text-primary: #1d2a45;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --radius-card: 14px;
    --radius-button: 10px;
    --spacing-card: 12px;
    --content-max-width: 520px;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-app);
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    color: var(--text-primary);
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── ЗАГРУЗОЧНЫЙ ЭКРАН ─────────────────────────────── */
.loader-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.loader-dot {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: var(--pia-gold);
    opacity: 0.12;
    animation: loaderPulse 2.4s ease-in-out infinite;
}

.loader-dot:nth-child(1) {
    animation-delay: 0s;
}

.loader-dot:nth-child(2) {
    animation-delay: 0.15s;
}

.loader-dot:nth-child(3) {
    animation-delay: 0.3s;
}

.loader-dot:nth-child(4) {
    animation-delay: 0.45s;
}

.loader-dot:nth-child(5) {
    animation-delay: 0.6s;
}

.loader-dot:nth-child(6) {
    animation-delay: 0.75s;
}

.loader-dot:nth-child(7) {
    animation-delay: 0.9s;
}

.loader-dot:nth-child(8) {
    animation-delay: 1.05s;
}

.loader-dot:nth-child(9) {
    animation-delay: 1.2s;
}

@keyframes loaderPulse {

    0%,
    100% {
        opacity: 0.12;
        transform: scale(1);
    }

    40% {
        opacity: 1;
        transform: scale(1.1);
        box-shadow: 0 0 10px rgba(212, 175, 55, 0.35);
    }
}

.loader-text {
    animation: loaderFade 3s ease-in-out infinite;
}

@keyframes loaderFade {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

/* ─── ТИПОГРАФИКА И UTILITY КЛАССЫ ──────────────────── */
.text-normal {
    text-transform: none !important;
}

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

.text-bold {
    font-weight: 600;
}

/* ─── КНОПКИ (Premium) ──────────────────────────────── */
.btn-base {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-button);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-transform: none;
    /* Убираем капс */
    font-family: inherit;
}

.btn-primary {
    background-color: var(--pia-navy);
    color: white;
    box-shadow: 0 2px 4px rgba(29, 42, 69, 0.2);
}

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

.btn-secondary {
    background-color: transparent;
    color: var(--pia-navy);
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: none;
}

.btn-secondary:active {
    background-color: rgba(212, 175, 55, 0.08);
}

.btn-icon-only {
    padding: 8px;
    border-radius: 50%;
}

/* ─── СТАТУСЫ (Badges) ──────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-active {
    background-color: rgba(34, 197, 94, 0.1);
    color: #166534;
}

.badge-muted {
    background-color: rgba(100, 116, 139, 0.1);
    color: var(--text-secondary);
}

.badge-info {
    background-color: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
}

/* ─── PREMIUM FORM INPUTS (Chanel Style) ───────────────── */
.input-group {
    position: relative;
    width: 100%;
}

.input-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 6px;
    margin-left: 4px;
}

.input-premium {
    width: 100%;
    background-color: #f8fafc;
    border: 1px solid rgba(29, 42, 69, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.25s ease;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.015);
}

.input-premium::placeholder {
    color: var(--text-muted);
    font-weight: 500;
}

.input-premium:focus {
    background-color: #ffffff;
    border-color: var(--pia-gold);
    box-shadow: 0 0 0 3px var(--pia-gold-soft);
}

.input-premium:disabled {
    opacity: 0.6;
    background-color: #f1f5f9;
    cursor: not-allowed;
}

/* Радио и Чекбоксы в виде элегантных чипсов */
.check-premium-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.check-premium-label {
    display: inline-flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid rgba(29, 42, 69, 0.08);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.check-premium-input:checked+.check-premium-label {
    background: var(--pia-navy);
    color: #ffffff;
    border-color: var(--pia-navy);
    box-shadow: 0 4px 10px rgba(29, 42, 69, 0.15);
}

.check-premium-input:checked+.check-premium-label.accent-gold {
    background: var(--pia-gold);
    color: var(--pia-navy);
    border-color: var(--pia-gold);
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.2);
}

.check-premium-input {
    display: none;
}