* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
    color: #333;
    padding: 15px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
}

header h1 {
    font-size: 2rem;
    background: linear-gradient(90deg, #e94560, #c73e54);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

header p {
    color: #666;
    font-size: 1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.card h2 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: #e94560;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group {
    margin-bottom: 10px;
}

.form-row {
    display: flex;
    gap: 10px;
}

.half {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 3px;
    font-size: 0.8rem;
    color: #555;
    font-weight: 500;
}

input[type="number"],
select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #fafafa;
    color: #333;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: #e94560;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

input:disabled {
    opacity: 0.5;
    background: #e8e8e8;
    cursor: not-allowed;
}

input[readonly] {
    background: #e8e8e8;
    cursor: default;
}

select option {
    background: #fff;
    color: #333;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checkbox-group.compact {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
    font-size: 0.85rem;
}

.checkbox-label:hover,
.radio-label:hover {
    background: rgba(233, 69, 96, 0.05);
}

.checkbox-label input,
.radio-label input {
    width: 16px;
    height: 16px;
    accent-color: #e94560;
}

.small-input {
    width: 70px !important;
    padding: 6px 8px !important;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.radio-group.compact {
    gap: 15px;
}

.radio-group.compact .radio-label {
    font-size: 0.85rem;
}

.info-card {
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    border: 1px solid #ffe0e0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row.compact {
    padding: 6px 0;
}

.info-row span {
    color: #666;
    font-size: 0.85rem;
}

.info-row strong {
    color: #e94560;
    font-size: 0.95rem;
}

.results {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 20px;
    border: 2px solid #e94560;
    margin-top: 15px;
}

.results h2 {
    text-align: center;
    margin-bottom: 16px;
    color: #333;
    font-size: 1.3rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.result-item {
    background: #fff;
    padding: 14px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #e8e8e8;
    transition: all 0.2s ease;
}

.result-item:hover {
    background: #fafafa;
    transform: scale(1.02);
}

.result-item.highlight {
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    border-color: #e94560;
    border-width: 2px;
}

.result-item span {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 4px;
}

.result-item strong {
    display: block;
    font-size: 1.1rem;
    color: #333;
}

.result-item.highlight strong {
    color: #e94560;
    font-size: 1.3rem;
}

footer {
    text-align: center;
    margin-top: 25px;
    padding: 15px;
    color: #888;
    font-size: 0.85rem;
}

.printer-fields.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Анимация загрузки */
.results.loading {
    opacity: 0.7;
}

.results.loading .result-item {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Адаптивность */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .form-row {
        flex-direction: row;
        gap: 8px;
    }

    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .card {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.3rem;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .radio-group.compact {
        gap: 10px;
    }

    .checkbox-group.compact {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Scrollbar стилизация */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}
