/* Reset и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', sans-serif;
    background-color: #f8fafc;
    color: #333;
    line-height: 1.6;
}

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

/* Хедер */
.header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 0;
}

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

.logo {
    height: 32px;
    width: auto;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-weight: 600;
    color: #44D0B5;
    font-size: 14px;
}

.btn {
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    background: white;
    color: #333;
    transition: none;
}

.btn-primary {
    background-color: #44D0B5;
    border-color: #44D0B5;
    color: white;
}

.btn-secondary {
    background-color: white;
    border-color: #44D0B5;
    color: #44D0B5;
}

.btn-danger {
    background-color: white;
    border-color: #dc2626;
    color: #dc2626;
}

.btn-block {
    width: 100%;
    padding: 12px;
}

/* Контейнер авторизации */
.auth-container {
    max-width: 400px;
    margin: 60px auto;
    padding: 32px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-header h1 {
    font-size: 20px;
    margin: 16px 0 8px;
    color: #1a1a1a;
    font-weight: 600;
}

.auth-header .subtitle {
    color: #6b7280;
    font-size: 14px;
}

/* Табы */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 24px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: #44D0B5;
    border-bottom-color: #44D0B5;
}

/* Формы */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    background: white;
    color: #111827;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #44D0B5;
}

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

/* ПИН-код контейнер */
.pin-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 24px 0;
}

.pin-input {
    width: 48px;
    height: 48px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    color: #111827;
}

.pin-input:focus {
    border-color: #44D0B5;
    outline: none;
}

.pin-input.filled {
    border-color: #44D0B5;
    background-color: #f0fdfa;
}

/* Дашборд */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.card {
    background: white;
    border-radius: 4px;
    padding: 20px;
    border: 1px solid #e5e7eb;
}

.card h3 {
    color: #44D0B5;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
}

/* Админка */
.admin-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.admin-nav .btn {
    padding: 8px 16px;
}

.table-container {
    background: white;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

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

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.status-new {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.status-processed {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-rejected {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.status-answered {
    background-color: #faf5ff;
    color: #7c3aed;
    border: 1px solid #e9d5ff;
}

/* Утилиты */
.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 12px;
}

.mb-3 {
    margin-bottom: 12px;
}

.text-link {
    color: #44D0B5;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.alert {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid;
}

.alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
}

.page-link {
    padding: 6px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
}

.page-link.active {
    background-color: #44D0B5;
    color: white;
    border-color: #44D0B5;
}

/* Адаптивность */
@media (max-width: 768px) {
    .auth-container {
        margin: 20px;
        padding: 24px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .user-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .user-menu .btn {
        width: 100%;
        text-align: center;
    }
    
    .admin-nav {
        flex-direction: column;
    }
    
    table {
        display: block;
        overflow-x: auto;
    }
    
    .pin-input {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}