/* ===== Базовые стили ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f7f7f7;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* ===== Заголовки ===== */
h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2em;
    font-weight: 600;
    padding: 20px 0;
}

h2 {
    text-align: center;
    color: #333;
    margin: 30px 0 20px 0;
    font-size: 1.5em;
    font-weight: 500;
}

h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    color: #333;
    font-weight: 600;
}

/* ===== Контейнеры ===== */
.container {
    max-width: 900px;
    margin: 30px auto;
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.login-container {
    max-width: 420px;
    margin: 60px auto;
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.login-container h1 {
    font-size: 1.6em;
    margin-bottom: 30px;
    text-align: center;
}

.info-block {
    background: #fff8e1;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 25px;
    color: #856404;
    font-size: 14px;
    border: 1px solid #ffe082;
}

/* ===== Формы ===== */
form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

label {
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

input[type="file"] {
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #fafafa;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-size: 14px;
}

input[type="file"]:hover {
    border-color: #ff6b00;
}

input[type="text"],
input[type="password"] {
    padding: 16px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
    width: 100%;
    background: #fafafa;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #ff6b00;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
    background: white;
}

/* ===== Кнопки - Стиль PIK.ru ===== */
.download-button,
.selection-button,
.action-button {
    display: inline-block;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    color: white;
    background-color: #ff6b00;
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.25);
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.2s;
    width: 100%;
    max-width: 400px;
    letter-spacing: 0.2px;
}

.download-button:hover,
.selection-button:hover,
.action-button:hover {
    background-color: #e65c00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

.download-button:active,
.selection-button:active,
.action-button:active {
    transform: translateY(0);
}

/* Цветовые варианты кнопок */
.download-button.verify,
.selection-button.compare,
.action-button.verify {
    background-color: #4caf50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.25);
}

.download-button.verify:hover,
.selection-button.compare:hover,
.action-button.verify:hover {
    background-color: #43a047;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.download-button.extract,
.selection-button.extract,
.action-button.extract {
    background-color: #ff6b00;
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.25);
}

.download-button.extract:hover,
.selection-button.extract:hover,
.action-button.extract:hover {
    background-color: #e65c00;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

.download-button.success {
    background-color: #4caf50;
}

.download-button.success:hover {
    background-color: #43a047;
}

.download-button.non-matching-pdf {
    background-color: #ff9800;
}

.download-button.non-matching-pdf:hover {
    background-color: #f57c00;
}

.download-button.non-matching-xlsx {
    background-color: #757575;
}

.download-button.non-matching-xlsx:hover {
    background-color: #616161;
}

/* ===== Кнопки навигации ===== */
.back-button,
.logout-button {
    display: inline-block;
    margin: 10px;
    padding: 12px 24px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    background-color: white;
    color: #555;
    text-decoration: none;
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

.back-button:hover,
.logout-button:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
    color: #333;
}

.logout-button {
    border-color: #ff6b00;
    color: #ff6b00;
}

.logout-button:hover {
    background-color: #ff6b00;
    color: white;
}

/* ===== Страница выбора ===== */
.selection-container {
    max-width: 1000px;
    margin: 40px auto;
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.selection-button {
    display: block;
    width: 360px;
    padding: 32px 28px;
    border-radius: 16px;
    text-decoration: none;
    color: white;
    text-align: left;
    transition: transform 0.2s, box-shadow 0.2s;
}

.selection-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.selection-button p {
    margin: 12px 0 0 0;
    font-size: 14px;
    opacity: 0.95;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
}

/* ===== Контейнер кнопок ===== */
.button-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    margin: 25px 0;
}

/* ===== Уведомления ===== */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin: 20px 0;
    font-weight: 400;
    text-align: center;
    font-size: 15px;
}

.alert-success {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
}

.alert-danger {
    background: #ffebee;
    border: 1px solid #ffcdd2;
    color: #c62828;
}

/* ===== Верхняя панель ===== */
.header-bar {
    background: white;
    border-bottom: 1px solid #e8e8e8;
    padding: 0;
    margin-bottom: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.header-bar .container {
    margin: 0 auto;
    padding: 16px 40px;
    background: transparent;
    box-shadow: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    border-radius: 0;
}

.header-logo {
    font-size: 1.4em;
    font-weight: 600;
    color: #ff6b00;
    text-decoration: none;
    transition: color 0.3s;
}

.header-logo:hover {
    color: #e65c00;
}

.header-user {
    color: #555;
    font-size: 14px;
}

/* ===== Подвал ===== */
.footer {
    text-align: center;
    padding: 30px 0;
    color: #999;
    font-size: 13px;
    margin-top: 40px;
    border-top: 1px solid #e8e8e8;
}

/* ===== Карточки ===== */
.card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

/* ===== Разделители ===== */
.divider {
    height: 1px;
    background: #e8e8e8;
    margin: 20px 0;
}

/* ===== Адаптивность ===== */
@media (max-width: 768px) {
    body {
        padding: 0;
    }
    
    h1 {
        font-size: 1.5em;
        padding: 15px 0;
    }
    
    .container,
    .login-container {
        margin: 20px;
        padding: 28px;
        border-radius: 12px;
    }
    
    .selection-container {
        flex-direction: column;
        align-items: center;
        margin: 20px auto;
        gap: 16px;
    }
    
    .selection-button {
        width: 100%;
        max-width: 340px;
    }
    
    .download-button,
    .action-button {
        width: 100%;
        max-width: 340px;
    }
    
    .button-container {
        width: 100%;
    }
    
    .header-bar .container {
        padding: 16px 20px;
        flex-direction: column;
        gap: 12px;
    }
    
    .back-button,
    .logout-button {
        display: block;
        margin: 8px 0;
        width: 100%;
        max-width: 340px;
    }
}
