/* ===== ОСНОВНЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #f5f7fb;
    min-height: 100vh;
    color: #1a1f36;
}

/* ===== ХЕДЕР ===== */
.site-header {
    width: 100%;
    background: white;
    border-bottom: 1px solid #eef2f6;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.header-left {
    flex-shrink: 0;
}

.logo-link {
    text-decoration: none;
}

.site-logo {
    max-height: 40px;
    width: auto;
    display: block;
}

/* Навигация (десктоп) */
.header-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.nav-link {
    color: #4a5568;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    transition: all 0.2s;
    white-space: nowrap;
}

    .nav-link:hover {
        background: #f0f0f0;
        color: #00b3ff;
    }

.register-link {
    background: #00b3ff;
    color: white;
}

    .register-link:hover {
        background: #0099cc;
        color: white;
    }

.logout-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    white-space: nowrap;
}

    .logout-btn:hover {
        background: #dc2626;
    }

.btn-danger-mobile {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    white-space: nowrap;
}

    .btn-danger-mobile:hover {
        background: #dc2626;
    }

/* Мобильная кнопка меню */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #1a1f36;
    padding: 8px;
}

/* ===== АДАПТИВ ДЛЯ МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {
    .header-container {
        padding: 10px 16px;
    }

    .mobile-menu-btn {
        display: block;
        order: 2;
    }

    .header-left {
        order: 1;
        margin-right: auto;
    }

    .header-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 12px;
        border-top: 1px solid #eef2f6;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
        z-index: 99;
        margin-left: 0;
    }

        .header-nav.mobile-open {
            display: flex;
        }

    .nav-link,
    .logout-btn,
    .btn-danger-mobile {
        width: 100%;
        text-align: center;
        padding: 12px 16px;
        white-space: normal;
    }

    .site-logo {
        max-height: 35px;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 8px 12px;
    }

    .site-logo {
        max-height: 30px;
    }

    .mobile-menu-btn {
        font-size: 20px;
        padding: 6px;
    }

    .nav-link,
    .logout-btn,
    .btn-danger-mobile {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
}

/* ===== КОНТЕЙНЕРЫ ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ===== ФОРМЫ ===== */
.form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 28px;
    padding: 40px;
    border: 1px solid #eef2f6;
    margin-top: 60px;
}

.form-header {
    text-align: center;
    margin-bottom: 32px;
}

    .form-header h2 {
        font-size: 1.8rem;
        color: #1a1f36;
        margin-bottom: 12px;
    }

    .form-header p {
        color: #6b7280;
        line-height: 1.5;
    }

.partner-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .form-group label {
        font-weight: 500;
        color: #374151;
        font-size: 0.9rem;
    }

.required {
    color: #ef4444;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
}

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        outline: none;
        border-color: #00b3ff;
    }

    .form-group input.error,
    .form-group select.error,
    .form-group textarea.error {
        border-color: #ef4444;
        background-color: #fef2f2;
    }

.field-error {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 4px;
}

/* Социальные сети */
.social-accounts {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 16px;
    margin: 8px 0;
}

.social-group {
    margin-bottom: 12px;
}

.social-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    color: #374151;
}

    .social-label input {
        width: 18px;
        height: 18px;
        cursor: pointer;
    }

.social-input-group {
    margin-top: 8px;
    margin-left: 28px;
}

    .social-input-group input {
        width: 100%;
        padding: 10px 14px;
        border: 1.5px solid #e5e7eb;
        border-radius: 10px;
        font-size: 0.9rem;
    }

/* Чекбокс соглашения */
.form-checkbox {
    margin: 8px 0;
}

    .form-checkbox label {
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
        color: #4a5568;
        font-size: 0.9rem;
    }

    .form-checkbox input {
        width: 18px;
        height: 18px;
        cursor: pointer;
    }

/* Кнопка отправки */
.btn-submit {
    background: #00b3ff;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    width: 100%;
    transition: all 0.2s;
}

    .btn-submit:hover {
        background: #0099cc;
        transform: translateY(-1px);
    }

    .btn-submit:disabled {
        background: #9ca3af;
        cursor: not-allowed;
        transform: none;
    }

/* Сообщения формы */
.form-message {
    padding: 14px 20px;
    border-radius: 12px;
    margin-top: 16px;
    text-align: center;
    display: none;
    font-size: 0.9rem;
}

    .form-message.success {
        display: block;
        background: #dcfce7;
        color: #16a34a;
        border: 1px solid #bbf7d0;
    }

    .form-message.error {
        display: block;
        background: #fee2e2;
        color: #dc2626;
        border: 1px solid #fecaca;
    }

    .form-message.warning {
        display: block;
        background: #fef3c7;
        color: #d97706;
        border: 1px solid #fde68a;
    }

/* Ссылка входа/регистрации */
.login-link {
    text-align: center;
    margin-top: 24px;
}

    .login-link a {
        color: #00b3ff;
        text-decoration: none;
        font-weight: 500;
    }

        .login-link a:hover {
            text-decoration: underline;
        }

/* ===== СТАТУСЫ ===== */
.status-pending {
    color: #f59e0b;
    font-weight: 500;
}

.status-approved {
    color: #10b981;
    font-weight: 500;
}

.status-rejected {
    color: #ef4444;
    font-weight: 500;
}

.status-active {
    color: #10b981;
    font-weight: 500;
}

.status-blocked {
    color: #ef4444;
    font-weight: 500;
}

/* ===== ТАБЛИЦЫ ===== */
.table-wrapper {
    background: white;
    border-radius: 20px;
    padding: 20px;
    overflow-x: auto;
    border: 1px solid #eef2f6;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #374151;
}

/* ===== КНОПКИ ДЕЙСТВИЙ ===== */
.btn-approve, .btn-reject, .btn-view, .btn-generate, .btn-delete {
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    margin: 2px;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.btn-approve {
    background: #10b981;
    color: white;
}

    .btn-approve:hover {
        background: #059669;
    }

.btn-reject {
    background: #ef4444;
    color: white;
}

    .btn-reject:hover {
        background: #dc2626;
    }

.btn-view {
    background: #3b82f6;
    color: white;
}

    .btn-view:hover {
        background: #2563eb;
    }

.btn-generate {
    background: #00b3ff;
    color: white;
}

    .btn-generate:hover {
        background: #0099cc;
    }

.btn-delete {
    background: #ef4444;
    color: white;
}

    .btn-delete:hover {
        background: #dc2626;
    }

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 28px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
}

    .modal-close:hover {
        color: #1a1f36;
    }

.link-box {
    background: #f5f7fb;
    padding: 12px;
    border-radius: 12px;
    margin: 16px 0;
    word-break: break-all;
    font-family: monospace;
    font-size: 0.85rem;
}

.copy-btn {
    background: #00b3ff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
}

    .copy-btn:hover {
        background: #0099cc;
    }

/* ===== ФИЛЬТРЫ ===== */
.filters {
    background: white;
    border-radius: 20px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid #eef2f6;
}

    .filters select,
    .filters input {
        padding: 8px 14px;
        border: 1.5px solid #e5e7eb;
        border-radius: 12px;
        font-size: 0.9rem;
        background: white;
    }

        .filters select:focus,
        .filters input:focus {
            outline: none;
            border-color: #00b3ff;
        }

    .filters button {
        background: #00b3ff;
        color: white;
        border: none;
        padding: 8px 20px;
        border-radius: 30px;
        cursor: pointer;
        transition: background 0.2s;
    }

        .filters button:hover {
            background: #0099cc;
        }

.btn-cleanup {
    background: #8b5cf6;
}

    .btn-cleanup:hover {
        background: #7c3aed;
    }

.btn-payouts {
    background: #10b981;
}

    .btn-payouts:hover {
        background: #059669;
    }

/* ===== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ===== */
.social-input {
    margin-bottom: 12px;
    width: 100%;
}

    .social-input input {
        width: 100%;
        padding: 14px 18px;
        border: 1.5px solid #e5e7eb;
        border-radius: 12px;
        font-size: 1rem;
        transition: all 0.2s;
        box-sizing: border-box;
    }

        .social-input input:focus {
            outline: none;
            border-color: #00b3ff;
            box-shadow: 0 0 0 3px rgba(0, 179, 255, 0.1);
        }

        .social-input input.error {
            border-color: #ef4444;
            background-color: #fef2f2;
        }

.socials-hint {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
}

.field-hint {
    font-size: 11px;
    color: #8b9eb0;
    margin-top: 4px;
}

#countryOther {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    margin-top: 8px;
}

    #countryOther:focus {
        outline: none;
        border-color: #00b3ff;
    }

/* ===== АДАПТИВ ДЛЯ ФОРМ ===== */
@media (max-width: 768px) {
    .container {
        padding: 20px 16px;
    }

    .form-wrapper {
        padding: 24px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .form-header h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .btn-submit {
        width: 100%;
    }
}

/* Стили для блока согласия ЕРИР */
.ord-consent-block {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 16px;
    padding: 16px;
    margin: 20px 0;
}

.ord-consent-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 16px;
}

.ord-icon {
    font-size: 20px;
}

.ord-consent-text {
    font-size: 13px;
    color: #475569;
    margin-bottom: 16px;
    line-height: 1.5;
}

    .ord-consent-text p {
        margin: 0 0 8px 0;
    }

.ord-note {
    color: #dc2626;
    font-size: 12px;
}

.ord-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 8px 0;
}

.ord-checkbox input {
    margin-top: 2px;
    width: 18px;
    height: 18px;
}

.ord-checkbox span {
    font-size: 14px;
    color: #1e293b;
}

.field-hint {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

.optional {
    font-weight: normal;
    font-size: 12px;
    color: #6c757d;
}

