/* ============================================
   ГЛОБАЛЬНЫЕ СТИЛИ
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
    line-height: 1.6;
    min-height: 100vh;
}

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

a {
    text-decoration: none;
    color: #667eea;
}

a:hover {
    text-decoration: underline;
}

/* ============================================
   ШАПКА
   ============================================ */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 18px 0;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header h1 {
    font-size: 26px;
    font-weight: 700;
}

.header h1 a {
    color: white;
    text-decoration: none;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.header-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.header-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    text-decoration: none;
}

.header-nav .user-email {
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 18px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   КАРТОЧКИ
   ============================================ */
.card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card h2 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: 700;
}

/* ============================================
   КНОПКИ
   ============================================ */
.btn {
    display: inline-block;
    padding: 10px 28px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.btn-success:hover {
    box-shadow: 0 6px 25px rgba(72, 187, 120, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(252, 129, 129, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 6px 25px rgba(252, 129, 129, 0.5);
}

.btn-sm {
    padding: 5px 14px;
    font-size: 12px;
    border-radius: 8px;
}

/* ============================================
   ФОРМЫ
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f7fafc;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: white;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ============================================
   ТАБЛИЦЫ
   ============================================ */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: #f7fafc;
    font-weight: 600;
    color: #2d3748;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:hover {
    background: #f7fafc;
}

/* ============================================
   СТАТИСТИКА
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.stat-card .number {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .label {
    color: #718096;
    font-size: 14px;
    margin-top: 6px;
    font-weight: 500;
}

/* ============================================
   БЭЙДЖИ
   ============================================ */
.badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-active {
    background: #c6f6d5;
    color: #22543d;
}

.badge-pending {
    background: #fefcbf;
    color: #975a16;
}

.badge-inactive {
    background: #fed7d7;
    color: #9b2c2c;
}

.badge-approved {
    background: #c6f6d5;
    color: #22543d;
}

.badge-rejected {
    background: #fed7d7;
    color: #9b2c2c;
}

.badge-verified {
    background: #c6f6d5;
    color: #22543d;
}

.badge-unverified {
    background: #fefcbf;
    color: #975a16;
}

/* ============================================
   АЛЕРТЫ
   ============================================ */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    color: #22543d;
}

.alert-error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #9b2c2c;
}

/* ============================================
   СТРАНИЦА ВХОДА
   ============================================ */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-box {
    background: white;
    border-radius: 24px;
    padding: 50px 45px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.auth-box h1 {
    text-align: center;
    font-size: 34px;
    color: #2d3748;
    margin-bottom: 8px;
}

.auth-box .subtitle {
    text-align: center;
    color: #718096;
    margin-bottom: 30px;
    font-size: 16px;
}

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

.auth-box .form-group label {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.auth-box .form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.auth-box .form-group input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: white;
}

.auth-box .btn {
    width: 100%;
    padding: 14px;
    font-size: 18px;
    margin-top: 10px;
}

.auth-box .auth-links {
    text-align: center;
    margin-top: 25px;
    color: #718096;
    font-size: 14px;
}

.auth-box .auth-links a {
    color: #667eea;
    font-weight: 600;
    display: inline-block;
    margin: 4px 0;
}

/* ============================================
   ГЛАВНАЯ СТРАНИЦА (ПОСЛЕ ВХОДА)
   ============================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.dashboard-card {
    background: white;
    border-radius: 16px;
    padding: 35px 25px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    color: #1a1a2e;
}

.dashboard-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    text-decoration: none;
}

.dashboard-card .icon {
    font-size: 52px;
    margin-bottom: 15px;
}

.dashboard-card h3 {
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 20px;
}

.dashboard-card p {
    color: #718096;
    font-size: 14px;
}

/* ============================================
   ПОДВАЛ
   ============================================ */
.footer {
    background: #2d3748;
    color: #a0aec0;
    padding: 25px 0;
    text-align: center;
    margin-top: 40px;
    font-size: 14px;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .header-nav {
        justify-content: center;
    }

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

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

    .auth-box {
        padding: 30px 20px;
        margin: 0 15px;
    }

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

    .card {
        padding: 20px;
    }
}
