/* ── Page ── */
.cs-page {
    padding: 120px 0 80px;
    background: var(--bg-primary);
    min-height: 100vh;
}

.cs-container {
    max-width: 900px;
}

/* ── Header ── */
.cs-header {
    margin-bottom: 40px;
}

.cs-title {
    font-size: 36px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.cs-title-accent {
    color: var(--accent);
}

.cs-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.6;
}

/* ── Layout ── */
.cs-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 768px) {
    .cs-layout {
        grid-template-columns: 1fr;
    }
}

/* ── Form card ── */
.cs-form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.cs-form-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.cs-form-card__icon-wrap {
    width: 40px;
    height: 40px;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cs-form-card__icon {
    font-size: 20px;
    color: var(--accent);
}

.cs-form-card__title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-primary);
}

.cs-form-card__subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Field ── */
.cs-field-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: end;
    margin-bottom: 20px;
}

.cs-field-row--narrow {
    grid-template-columns: 1fr 1fr;
    max-width: 300px;
}

.cs-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cs-field--wide {
    flex: 1;
}

.cs-label {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.cs-label-required {
    color: var(--accent);
}

/* ── Input wrap ── */
.cs-input-wrap {
    position: relative;
}

.cs-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

/* ── Input ── */
.cs-input {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 13px 16px;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.cs-input--with-icon {
    padding-left: 44px;
}

.cs-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.05em;
    font-size: 16px;
}

.cs-input:focus {
    border-color: var(--accent);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.cs-input--error {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(227, 57, 44, 0.12) !important;
}

/* ── Select ── */
.cs-select {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 13px 16px;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23717171' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.cs-select:focus {
    border-color: var(--accent);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Divider ── */
.cs-field-divider {
    display: flex;
    align-items: center;
    padding-bottom: 14px;
}

.cs-field-divider__dots {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    white-space: nowrap;
}

/* ── Field error ── */
.cs-field-error {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--danger);
    font-weight: 500;
}

.cs-field-error i {
    font-size: 13px;
}

/* ── Card preview ── */
.cs-card-preview {
    background: linear-gradient(135deg, #1e2130 0%, #2a2d3e 100%);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
}

.cs-card-preview::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255, 114, 80, 0.12);
    pointer-events: none;
}

.cs-card-preview::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    pointer-events: none;
}

.cs-card-preview__chip {
    width: 32px;
    height: 24px;
    background: linear-gradient(135deg, #d4a76a, #c49458);
    border-radius: 4px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.cs-card-preview__number {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.12em;
    position: relative;
    z-index: 1;
    margin-bottom: 14px;
}

.cs-card-preview__gap {
    color: rgba(255, 255, 255, 0.4);
}

.cs-card-preview__bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.cs-card-preview__meta-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2px;
    font-family: var(--font-heading);
    font-weight: 600;
}

.cs-card-preview__meta-val {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.06em;
}

.cs-card-preview__logo {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.6);
}

/* ── Alert ── */
.cs-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.cs-alert--danger {
    background: var(--danger-bg);
    border: 1px solid rgba(227, 57, 44, 0.2);
}

.cs-alert--success {
    background: var(--success-bg);
    border: 1px solid rgba(12, 195, 107, 0.2);
}

.cs-alert__icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.cs-alert--danger .cs-alert__icon { color: var(--danger); }
.cs-alert--success .cs-alert__icon { color: var(--success); }

.cs-alert__text {
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.cs-alert--danger .cs-alert__text { color: var(--danger); }
.cs-alert--success .cs-alert__text { color: var(--success); }

/* ── Submit button ── */
.cs-btn-primary {
    width: 100%;
    padding: 15px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 14px var(--accent-glow);
    transition: var(--transition);
    margin-bottom: 14px;
}

.cs-btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

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

.cs-btn-primary i {
    font-size: 18px;
}

/* ── Form hint ── */
.cs-form-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.cs-form-hint i {
    font-size: 14px;
    color: var(--success);
}

/* ── Sidebar ── */
.cs-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── Info card ── */
.cs-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.cs-info-card--accent {
    background: var(--accent-soft);
    border-color: var(--border-accent);
}

.cs-info-card__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.cs-info-card__icon {
    font-size: 18px;
    color: var(--accent);
    flex-shrink: 0;
}

.cs-info-card__title {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-primary);
}

.cs-info-card__text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 10px;
}

.cs-info-card__text:last-child {
    margin-bottom: 0;
}

.cs-info-card__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

.cs-info-card__link:hover {
    gap: 8px;
}

/* ── Back row ── */
.cs-back-row {
    margin-top: 28px;
}

.cs-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.cs-back-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── Dark mode ── */
[data-theme="dark"] .cs-card-preview {
    background: linear-gradient(135deg, #0d0f18 0%, #181c2a 100%);
}

[data-theme="dark"] .cs-input,
[data-theme="dark"] .cs-select {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .cs-input:focus,
[data-theme="dark"] .cs-select:focus {
    background: var(--bg-card);
}

[data-theme="dark"] .cs-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A7D85' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

[data-theme="dark"] .cs-info-card {
    background: var(--bg-card);
}

[data-theme="dark"] .cs-info-card--accent {
    background: var(--accent-soft);
}
