/* ============================================================
   ОБЩИЕ СТИЛИ ДЛЯ ВСЕХ СТРАНИЦ
   ============================================================ */

/* ----- Базовые сбросы ----- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --orange: #F97316;
    --orange-dark: #EA580C;
    --orange-light: #FFEDD5;
    --blue: #1E3A8A;
    --blue-light: #DBEAFE;
    --gray-bg: #F8FAFC;
    --gray-border: #E2E8F0;
    --white: #FFFFFF;
    --shadow: 0 4px 12px rgba(0,0,0,0.05);
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: #F4F6FA;
    color: #1E293B;
}

/* ----- Кнопки ----- */
.btn {
    background: var(--orange);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 40px;
    cursor: pointer;
    transition: 0.2s;
}
.btn:hover { background: var(--orange-dark); }

.btn-approve { background: #10B981; }
.btn-approve:hover { background: #059669; }

.btn-reject { background: #EF4444; }
.btn-reject:hover { background: #DC2626; }

.btn-edit { background: #3B82F6; }
.btn-edit:hover { background: #2563EB; }

.btn-secondary { background: var(--blue); }
.btn-secondary:hover { background: #152C6B; }

.btn-danger { background: #EF4444; }
.btn-danger:hover { background: #DC2626; }

.btn-outline {
    background: white;
    border: 1px solid var(--gray-border);
    color: var(--blue);
}
.btn-outline:hover { background: #F1F5F9; }

/* ----- Карточки ----- */
.card {
    background: white;
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--shadow);
}

/* ----- Уведомления (тосты) ----- */
.toast {
    position: fixed;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%);
    background: #1E293B;
    color: white;
    padding: 12px 24px;
    border-radius: 40px;
    font-size: 0.85rem;
    z-index: 3000;
    animation: fadeInUp 0.4s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.toast.success { background: #10B981; }
.toast.error { background: #EF4444; }
.toast.info { background: #3B82F6; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ----- Модалки ----- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-overlay.active { display: flex; }

.modal-content {
    background: white;
    max-width: 500px;
    width: 90%;
    border-radius: 28px;
    padding: 28px;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-content.wide { max-width: 800px; }

/* ----- Формы ----- */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: #475569;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-border);
    border-radius: 16px;
    font-family: inherit;
    font-size: 16px;
    transition: 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(249,115,22,0.1);
}

.info-text {
    font-size: 0.7rem;
    color: #64748B;
    margin-top: 4px;
}

/* ----- Статус-бейджи ----- */
.status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}
.status-open { background: #D1FAE5; color: #065F46; }
.status-closed { background: #FEE2E2; color: #991B1B; }
.status-pending { background: #FEF3C7; color: #92400E; }
.status-active { background: #DBEAFE; color: #1E40AF; }
.status-expired { background: #F1F5F9; color: #64748B; }

/* ----- Чекбоксы согласия ----- */
.consent-checkbox {
    margin: 20px 0;
    padding: 12px;
    background: var(--gray-bg);
    border-radius: 16px;
}
.consent-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: normal;
    cursor: pointer;
}
.consent-checkbox input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}
.consent-checkbox a { color: var(--orange); text-decoration: none; }
.consent-checkbox a:hover { text-decoration: underline; }

/* ----- Подвал ----- */
footer {
    text-align: center;
    padding: 24px 0 16px;
    border-top: 1px solid var(--gray-border);
    margin-top: 40px;
    font-size: 12px;
    color: #64748B;
}
.footer-links { margin-top: 8px; }
.footer-links a {
    color: #64748B;
    margin: 0 8px;
    text-decoration: none;
    font-size: 11px;
}
.footer-links a:hover { text-decoration: underline; }

/* ----- Мобильная версия ----- */
@media (max-width: 700px) {
    .toast {
        bottom: 140px;
        white-space: normal;
        max-width: 90%;
        text-align: center;
        font-size: 0.75rem;
        padding: 10px 16px;
    }
    .modal-content { padding: 20px; }
}