* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

main {
    padding: 40px;
}

.step {
    display: none;
}

.step.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="file"],
.form-group input[type="number"],
.form-group input[type="date"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group input[type="file"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.9em;
}

.form-row {
    display: flex;
    gap: 20px;
}

.checkbox-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 6px;
    transition: background 0.3s;
}

.checkbox-group label:hover {
    background: #e0e0e0;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.btn-primary,
.btn-secondary {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    margin-left: 10px;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.table-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.table-card:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.table-card.selected {
    border-color: #667eea;
    background: #f0f4ff;
}

.table-card h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.table-card p {
    color: #666;
    font-size: 0.95em;
}

.quarter-item,
.holiday-item,
.special-holiday-item {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 6px;
}

.quarter-item input,
.holiday-item input,
.special-holiday-item input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.quarter-item button,
.holiday-item button,
.special-holiday-item button {
    padding: 8px 12px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.quarter-item button:hover,
.holiday-item button:hover,
.special-holiday-item button:hover {
    background: #cc0000;
}

#resultInfo {
    background: #f0f4ff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

#resultInfo h3 {
    color: #667eea;
    margin-bottom: 15px;
}

#resultInfo p {
    margin-bottom: 10px;
    color: #333;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading.hidden {
    display: none;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading p {
    color: white;
    margin-top: 20px;
    font-size: 1.2em;
}

.error {
    background: #ff4444;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.error.hidden {
    display: none;
}

.days-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.day-config-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 8px;
    transition: background 0.3s;
}

.day-config-item:hover {
    background: #e8e8e8;
}

.day-config-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex: 1;
    font-weight: 500;
}

.day-config-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.day-config-item input[type="number"] {
    width: 60px;
    padding: 6px 8px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    text-align: center;
    transition: all 0.3s;
}

.day-config-item input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
}

.day-config-item input[type="number"]:disabled {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
}

.contacts {
    background: #f8f9fa;
    padding: 15px 40px;
    text-align: center;
    border-top: 1px solid #e9ecef;
    font-size: 0.95em;
}

.contacts a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.contacts a:hover {
    text-decoration: underline;
}

.btn-report {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 22px;
    background: #667eea;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.contacts a.btn-report {
    color: #ffffff;
}

.btn-report:hover {
    background: #5a6bd6;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.35);
    text-decoration: none;
}

.header-sub {
    max-width: 700px;
    margin: 10px auto 0;
    font-size: 1.05em;
    opacity: 0.95;
    line-height: 1.5;
}

.seo {
    padding: 30px 40px 40px;
    border-top: 1px solid #e9ecef;
    background: #fafbff;
}

.seo h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.6em;
}

.seo h3 {
    color: #444;
    margin: 20px 0 10px;
    font-size: 1.2em;
}

.seo p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 12px;
}

.seo details {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 10px;
}

.seo details summary {
    cursor: pointer;
    font-weight: 600;
    color: #333;
}

.seo details p {
    margin: 10px 0 0;
    font-size: 0.95em;
}

.subscribe-block {
    margin-top: 20px;
    padding: 20px;
    background: #f0f4ff;
    border: 2px solid #667eea;
    border-radius: 8px;
    text-align: center;
}

.subscribe-block p {
    color: #333;
    font-weight: 500;
    margin-bottom: 14px;
    line-height: 1.5;
}

.subscribe-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.sub-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    transition: all 0.3s;
}

.sub-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.sub-btn.vk {
    background: #0077ff;
}

.sub-btn.max {
    background: #667eea;
}
