/* ================================
   АИС «Медвеженок» — Signup Page
   ================================ */

:root {
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --primary-dark: #5b21b6;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --bg: #ffffff;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --gradient: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    --shadow: 0 8px 32px rgba(124, 58, 237, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-light);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 18px;
}

.logo svg {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.nav {
    display: flex;
    gap: 24px;
}

.nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav a:hover {
    color: var(--primary);
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.4);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--bg-light);
    border-color: var(--primary-light);
}

.btn-large {
    padding: 14px 32px;
    font-size: 16px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    background: var(--bg);
    padding: 6px;
    border-radius: var(--radius-sm);
    margin: 32px 0 24px;
    max-width: 400px;
}

.tab-btn {
    flex: 1;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active {
    background: var(--gradient);
    color: white;
}

.tab-btn:hover:not(.active) {
    background: var(--bg-light);
    color: var(--text);
}

/* Main Content */
.main {
    padding: 24px 0 64px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Info Banner */
.info-banner {
    background: linear-gradient(135deg, #fef3c7, #fef9c3);
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-bottom: 32px;
}

.info-banner h2 {
    font-size: 18px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-banner h2 svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.info-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.info-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f59e0b;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.info-item strong {
    display: block;
    font-size: 13px;
    color: #78350f;
    margin-bottom: 2px;
}

.info-item span {
    font-size: 12px;
    color: #a16207;
    line-height: 1.4;
}

/* Form Section */
.form-section {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    max-width: 800px;
    margin: 0 auto 32px;
}

.form-header {
    margin-bottom: 32px;
}

.form-header h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text);
}

.form-header p {
    color: var(--text-muted);
    font-size: 15px;
}

/* Benefits Section */
.benefits-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 0;
}

.benefits-section h2 {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 28px;
    color: var(--text);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.benefit-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    transition: var(--transition);
}

.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.benefit-card svg {
    width: 36px;
    height: 36px;
    color: var(--primary);
    margin: 0 auto 16px;
    display: block;
}

.benefit-card strong {
    display: block;
    font-size: 15px;
    color: var(--text);
    margin-bottom: 6px;
}

.benefit-card span {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Form */
.application-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

legend {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
}

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

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 8px;
}

.required {
    color: var(--error);
    margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg);
    color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.hint {
    display: block;
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.form-row .half {
    grid-column: span 2;
}

.form-row .third {
    grid-column: span 1;
}

/* Checkbox */
.checkbox-group {
    margin-top: 24px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Form Actions */
.form-actions {
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.form-actions .btn-primary {
    width: 100%;
}

.form-note {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 12px;
    text-align: center;
}

/* Status Check */
.status-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.status-header {
    text-align: center;
    margin-bottom: 40px;
}

.status-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}

.status-header p {
    color: var(--text-muted);
    font-size: 15px;
}

.status-check-form {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 32px;
}

.status-input-group {
    margin-bottom: 20px;
}

.status-input-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 8px;
}

.status-input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: var(--transition);
}

.status-input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.status-check-form .btn {
    width: 100%;
}

/* Status Result */
.status-result {
    animation: fadeIn 0.4s ease;
}

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

.status-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
}

.status-header-result {
    display: flex;
    gap: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 24px;
}

.status-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.status-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

.status-icon.success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.status-icon.pending {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.status-icon.rejected {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.status-info h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.status-info p {
    color: var(--text-muted);
    font-size: 14px;
}

.status-details {
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 24px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 14px;
    color: var(--text-muted);
}

.detail-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

/* Timeline */
.status-timeline {
    margin: 24px 0;
    padding-left: 20px;
}

.timeline-item {
    position: relative;
    padding-left: 24px;
    padding-bottom: 24px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-dot {
    position: absolute;
    left: -6px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--border);
    border: 2px solid white;
}

.timeline-item.active .timeline-dot {
    background: var(--primary);
}

.timeline-item.completed .timeline-dot {
    background: var(--success);
}

.timeline-content {
    padding-bottom: 4px;
}

.timeline-content strong {
    display: block;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 4px;
}

.timeline-content span {
    font-size: 13px;
    color: var(--text-muted);
}

.status-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.status-actions .btn {
    flex: 1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: var(--bg);
    border-radius: var(--radius);
    padding: 40px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.modal-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.modal-icon.success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.modal-content h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text);
}

.modal-content p {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.modal-note {
    font-size: 14px !important;
    color: var(--text-dim) !important;
}

.modal-content .btn {
    margin-top: 24px;
    width: 100%;
}

/* Footer */
.footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 24px 0;
    text-align: center;
}

.footer-info p {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-info a {
    color: var(--primary);
    text-decoration: none;
    margin: 0 8px;
}

.footer-info a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
    .info-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-section {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .info-banner {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-row .half,
    .form-row .third {
        grid-column: span 1;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .status-header h1,
    .form-header h1 {
        font-size: 22px;
    }

    .status-actions {
        flex-direction: column;
    }

    .tabs {
        max-width: 100%;
    }
}
