:root {
    --primary-blue: #0052cc;
    --primary-red: #FF4B4B;
    --primary-yellow: #FFD700;
    --white: #ffffff;
    --yellow: #ffd700;
    --orange: #ffa500;
    --dark: #333333;
    --light-gray: #f5f5f5;
    --border-color: #e0e0e0;
    --primary-color: #4a90e2;
    --primary-dark: #357abd;
    --primary-light: #e3f2fd;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --gray: #666;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    background: var(--light-gray);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    width: 100%;
}

/* Стили для форм */
.form-container {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 40px auto;
}

/* Стили для административной панели */
.dashboard-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.logo {
    width: 150px;
    margin-right: 2rem;
}

.logo img {
    max-width: 100%;
    height: auto;
}

.admin-info {
    flex-grow: 1;
}

.admin-info h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.admin-nav {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.nav-link {
    text-decoration: none;
    color: #666;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-link.active {
    background: #f44336;
    color: white;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 2rem;
}

/* Стили для статусов */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.table td {
    vertical-align: middle;
    padding: 0.75rem;
}

/* Стили для кнопок действий */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    font-size: 1.2rem;
    color: #666;
    transition: color 0.2s;
}

.btn-icon:hover {
    color: #f44336;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.stat-card h3 {
    margin: 0 0 15px;
    color: var(--dark);
    font-size: 16px;
    font-weight: 600;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-red);
}

/* Остальные стили */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: var(--primary-red);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 75, 75, 0.1);
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-red);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #ff3333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 75, 75, 0.3);
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
}

.alert-danger {
    background-color: #ffe6e6;
    color: var(--danger-color);
    border: 1px solid #ffcccc;
}

.alert-success {
    background-color: #e8f5e9;
    color: var(--success-color);
    border: 1px solid #c8e6c9;
}

/* Стили для таблиц */
.table {
    width: 100%;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    background-color: var(--primary-blue);
    color: var(--white);
    font-weight: bold;
}

/* Стили для модальных окон */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    margin: 50px auto;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    cursor: pointer;
}

/* Утилиты */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 40px;
}

.mb-4 {
    margin-bottom: 40px;
}

h1, h2 {
    color: var(--dark);
    margin: 0 0 30px;
    font-weight: 600;
}

/* Адаптивность */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        padding: 15px;
    }

    .dashboard-header nav {
        margin: 15px 0;
        width: 100%;
    }

    .dashboard-header nav ul {
        flex-direction: column;
        text-align: center;
    }

    .user-menu {
        flex-direction: column;
        gap: 10px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Стили для фильтров */
.filters {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filters-form .form-group {
    flex: 1;
    min-width: 200px;
}

/* Стили для таблицы */
.table-responsive {
    overflow-x: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* Статусы лидов */
.status-new {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status-called {
    background-color: #fff3e0;
    color: #f57c00;
}

.status-tour-scheduled {
    background-color: #e8f5e9;
    color: #388e3c;
}

.status-tour-completed {
    background-color: #e8eaf6;
    color: #3f51b5;
}

.status-declined {
    background-color: #ffebee;
    color: #d32f2f;
}

.status-no-answer {
    background-color: #fce4ec;
    color: #c2185b;
}

.status-conditions-declined {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.status-callback {
    background-color: #fff8e1;
    color: #ffa000;
}

/* Кнопки действий */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: #f5f5f5;
    transition: background 0.2s;
    text-decoration: none;
}

.btn-icon:hover {
    background: #e0e0e0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .filters-form {
        flex-direction: column;
    }
    
    .filters-form .form-group {
        width: 100%;
    }
    
    .table th,
    .table td {
        padding: 8px 10px;
    }
}

/* Заголовок контента */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.content-header h1 {
    margin: 0;
    font-size: 24px;
    color: var(--dark);
}

/* Стили для статических полей формы */
.form-control-static {
    padding: 8px 12px;
    margin: 0;
    background: var(--light-gray);
    border-radius: 8px;
    color: var(--dark);
}

/* Стили для текстовых подсказок */
.form-text {
    font-size: 0.85em;
    color: #666;
    margin-top: 4px;
}

/* Стили для действий формы */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Стили для обязательных полей */
label[for]:after {
    content: " *";
    color: var(--primary-red);
}

/* Стили для валидации формы */
.form-control:invalid {
    border-color: var(--primary-red);
}

.form-control:invalid:focus {
    box-shadow: 0 0 0 3px rgba(255, 75, 75, 0.1);
}

/* Адаптивность для форм */
@media (max-width: 768px) {
    .form-container {
        padding: 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}

/* Дашборд */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.branch-info {
    text-align: center;
}

.branch-info h2 {
    margin: 0;
    font-size: 24px;
    color: var(--dark);
}

.branch-type {
    display: inline-block;
    padding: 4px 8px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 14px;
    margin-top: 5px;
}

/* Статистика */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    margin: 0 0 10px 0;
    color: var(--gray);
    font-size: 16px;
    font-weight: normal;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--dark);
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background: #fff;
    margin: 50px auto;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: var(--dark);
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray);
    cursor: pointer;
}

.close-modal:hover {
    color: var(--dark);
}

/* Основные стили форм */
.form-group {
    margin-bottom: 20px;
}

.form-control {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--dark);
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--gray);
}

.btn-outline:hover {
    background: var(--light-gray);
    color: var(--dark);
}

/* Адаптивность */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .modal-content {
        margin: 20px;
        width: auto;
    }

    .stat-card {
        text-align: center;
    }
}

/* Графики */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chart-card h3 {
    margin: 0 0 15px 0;
    color: var(--dark);
    font-size: 18px;
}

.chart-card canvas {
    width: 100% !important;
    height: 300px !important;
}

/* Админ панель */
.admin-info {
    text-align: center;
}

.admin-info h2 {
    margin: 0;
    font-size: 24px;
    color: var(--dark);
    font-weight: 600;
}

/* Расширенные фильтры */
.filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filters-form .form-group:last-child {
    display: flex;
    gap: 10px;
}

@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-card canvas {
        height: 250px !important;
    }

    .filters-form {
        grid-template-columns: 1fr;
    }

    .filters-form .form-group:last-child {
        flex-direction: column;
    }
}

.card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-body {
    padding: 20px;
}

/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1100;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification-success {
    background-color: #4caf50;
}

.notification-error {
    background-color: #f44336;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
} 