/* Material Design базовые стили */
:root {
    --primary-color: #1E90FF;
    --primary-dark: #0d47a1;
    --secondary-color: #f5f5f5;
    --text-primary: #212121;
    --text-secondary: #757575;
    --divider-color: #e0e0e0;
    --background: #ffffff;
    --error: #d32f2f;
    --success: #388e3c;
    --warning: #f57c00;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
}

body {
    background-color: #fafafa;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Контейнеры */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Карточки */
.card {
    background: var(--background);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 24px;
    margin-bottom: 20px;
    transition: box-shadow 0.3s;
}

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

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(30, 144, 255, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: rgba(30, 144, 255, 0.1);
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--divider-color);
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(30, 144, 255, 0.2);
}

/* Навигация */
.navbar {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 64px;
}

.nav-brand {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 20px;
    list-style: none;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: rgba(0,0,0,0.05);
}

/* Таблицы */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.table th, .table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--divider-color);
}

.table th {
    font-weight: 600;
    color: var(--text-secondary);
    background-color: #f8f9fa;
}

.table tr:hover {
    background-color: #f5f5f5;
}

/* Рейтинг звёзд */
.rating-stars {
    color: #ffc107;
    font-size: 20px;
}

.rating-stars .empty {
    color: var(--divider-color);
}

/* Статусные метки */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-active {
    background-color: #e8f5e9;
    color: var(--success);
}

.status-completed {
    background-color: #f5f5f5;
    color: var(--text-secondary);
}

.status-cancelled {
    background-color: #ffebee;
    color: var(--error);
}

/* Карта */
#map-container {
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
    border: 1px solid var(--divider-color);
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .table {
        display: block;
        overflow-x: auto;
    }
}
/* Hintbox стили */
.hintbox {
    background: #f0f7ff;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.hintbox h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hintbox ul {
    color: var(--text-primary);
    padding-left: 20px;
    margin: 0;
}

/* Стили для комментариев в мессенджере */
.comment-message {
    background: #e3f2fd;
    padding: 12px 16px;
    border-radius: 18px;
    border-top-left-radius: 4px;
    margin-bottom: 10px;
    max-width: 80%;
    position: relative;
}

.comment-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: -10px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid #e3f2fd;
}

.comment-author {
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.comment-time {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: right;
    margin-top: 5px;
}

/* Стили для управления аукционом */
.auction-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.control-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--divider-color);
}

/* Карточки заявок с фиксированной высотой */
.po-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px;
}

.po-title {
    min-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.po-param-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 15px 0;
}

.po-param-item {
    text-align: center;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 6px;
}

.po-param-label {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 4px;
}

.po-param-value {
    font-weight: 500;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Синий таймер */
.timer-blue {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    display: inline-block;
}

/* Иконка галочки в кружке */
.checkmark-circle {
    background: var(--primary-color);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

/* Flash сообщения */
.flash-messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    width: 100%;
}

.flash-message {
    padding: 16px 20px;
    margin-bottom: 12px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.flash-message::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
}

.flash-message.success {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
}

.flash-message.success::before {
    background-color: #4caf50;
}

.flash-message.danger {
    background-color: #ffebee;
    border-left: 4px solid #f44336;
    color: #c62828;
}

.flash-message.danger::before {
    background-color: #f44336;
}

.flash-message.warning {
    background-color: #fff3e0;
    border-left: 4px solid #ff9800;
    color: #ef6c00;
}

.flash-message.warning::before {
    background-color: #ff9800;
}

.flash-message.info {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    color: #1565c0;
}

.flash-message.info::before {
    background-color: #2196f3;
}

.flash-message .icon {
    font-size: 20px;
    flex-shrink: 0;
}

.flash-message .content {
    flex-grow: 1;
}

.flash-message .close-btn {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.flash-message .close-btn:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.1);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.flash-message.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

/* Автоматическое скрытие сообщений */
.flash-message.auto-hide {
    animation: slideIn 0.3s ease-out, fadeOut 0.3s ease-out 5s forwards;
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .flash-messages {
        left: 20px;
        right: 20px;
        max-width: none;
        top: 70px;
    }
    
    .flash-message {
        padding: 14px 16px;
    }
}

/* Анимация появления страницы */
.container {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Улучшенные стили для карточек заявок */
.card {
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Стили для кнопок в карточках */
.card .btn {
    transition: all 0.3s ease;
}

.card .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Стили для таблиц */
.table tr {
    transition: background-color 0.3s ease;
}

.table tr:hover {
    background-color: #f5f5f5;
}

/* Стили для форм */
.form-control:focus {
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.1);
}

/* Прогресс бар для таймеров */
.timer-progress {
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, #e0e0e0 100%);
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
}

.timer-progress-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    transition: width 1s linear;
}

/* Flash сообщения - добавляем в конец файла style.css */
.flash-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    width: 100%;
}

.flash-message {
    padding: 16px 20px;
    margin-bottom: 12px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
    min-width: 300px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.flash-message::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
}

.flash-message.success {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
}

.flash-message.success::before {
    background-color: #4caf50;
}

.flash-message.danger {
    background-color: #ffebee;
    border-left: 4px solid #f44336;
    color: #c62828;
}

.flash-message.danger::before {
    background-color: #f44336;
}

.flash-message.warning {
    background-color: #fff3e0;
    border-left: 4px solid #ff9800;
    color: #ef6c00;
}

.flash-message.warning::before {
    background-color: #ff9800;
}

.flash-message.info {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    color: #1565c0;
}

.flash-message.info::before {
    background-color: #2196f3;
}

.flash-message .flash-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.flash-message .flash-content {
    flex-grow: 1;
    font-weight: 500;
}

.flash-message .close-btn {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.flash-message .close-btn:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.1);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.flash-message.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

/* Автоматическое скрытие сообщений */
.flash-message.auto-hide {
    animation: slideIn 0.3s ease-out, fadeOut 0.3s ease-out 5s forwards;
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .flash-container {
        left: 20px;
        right: 20px;
        max-width: none;
        top: 70px;
    }
    
    .flash-message {
        min-width: auto;
        padding: 14px 16px;
    }
}

/* Иконки для разных типов сообщений */
.flash-icon.success::before {
    content: '✓';
}

.flash-icon.danger::before {
    content: '✗';
}

.flash-icon.warning::before {
    content: '⚠';
}

.flash-icon.info::before {
    content: 'ℹ';
}

/* Добавьте эти стили в конец файла style.css */

/* Анимация для элементов */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Улучшенные стили для карточек на главной */
.hero-section h1 {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Стили для списков */
ul.custom-list {
    list-style: none;
    padding: 0;
}

ul.custom-list li {
    padding-left: 28px;
    position: relative;
    margin-bottom: 12px;
    line-height: 1.5;
}

ul.custom-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4CAF50;
    font-weight: bold;
    font-size: 18px;
}

/* Адаптивность для лендинга */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 36px !important;
    }
    
    .hero-section p {
        font-size: 18px !important;
    }
    
    .benefits > .container > div {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
    
    .cta-section .btn {
        width: 100%;
        margin-bottom: 15px;
    }
}