* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1;
    background-color: #f4f4f4;
}

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

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    color: #666;
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin-bottom: 30px;
}

th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.form-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.form-section input,
.form-section select,
.form-section textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-section button {
    background: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.form-section button:hover {
    background: #0056b3;
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.error {
    color: #dc3545;
    margin-bottom: 15px;
}

.success {
    color: #28a745;
    margin-bottom: 15px;
}
/* Дополнительные стили */
.login-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.login-option {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 15px;
}

.btn:hover {
    background: #0056b3;
}

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

.tender-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.tender-form input,
.tender-form textarea,
.tender-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.price-warning {
    background: #ffe6e6;
    border: 1px solid #ffcccc;
    padding: 5px;
    border-radius: 3px;
    margin-top: 5px;
}

input:invalid {
    border-color: #dc3545;
}

input:valid {
    border-color: #28a745;
}

.item-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr 1fr auto;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.bid-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 10px;
    align-items: end;
}

.remove-item {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
}

.suppliers-checkbox {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
}

.tenders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.tender-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tender-card h3 {
    margin-bottom: 10px;
    color: #333;
}

.tender-card p {
    margin-bottom: 8px;
    color: #666;
}

.bidding-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.bids-history {
    background: white;
    padding: 20px;
    border-radius: 8px;
}

.auto-refresh {
    background: #e3f2fd;
    padding: 10px;
    border-radius: 5px;
    margin: 15px 0;
    text-align: center;
}
.refresh-indicator {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4caf50;
    margin-left: 10px;
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.price-comparison {
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    border-left: 4px solid #6c757d;
}

.price-better {
    color: #28a745;
    font-weight: bold;
}

.price-worse {
    color: #dc3545;
    font-weight: bold;
}

.price-neutral {
    color: #6c757d;
}

.comparison-better {
    border-left-color: #28a745;
    background: #e8f5e8;
}

.comparison-worse {
    border-left-color: #dc3545;
    background: #fce8e6;
}

.comparison-neutral {
    border-left-color: #6c757d;
    background: #f8f9fa;
}

/* Адаптивность */
@media (max-width: 768px) {
    .item-row {
        grid-template-columns: 1fr;
    }
    
    .stat-cards {
        grid-template-columns: 1fr;
    }
    
    .login-options {
        grid-template-columns: 1fr;
    }
}

/* Стили для динамических элементов */
.tender-timer {
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    background: #f8f9fa;
}

.tender-timer.ended {
    background: #dc3545;
    color: white;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.new-bid {
    animation: fadeIn 1s;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .item-row {
        grid-template-columns: 1fr;
    }
    
    .stat-cards {
        grid-template-columns: 1fr;
    }
    
    .tenders-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-menu {
        grid-template-columns: 1fr;
    }
}

/* Стили для уведомлений */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px;
    border-radius: 5px;
    color: white;
    z-index: 1000;
    animation: slideIn 0.3s;
}

.notification.success {
    background: #28a745;
}

.notification.error {
    background: #dc3545;
}

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


.time-update-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px;
    border-radius: 5px;
    z-index: 10000;
    font-weight: 500;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 300px;
}

.notification-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.notification-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.time-warning {
    color: #dc2626;
    font-weight: 600;
}

/* Стили для выбора поставщиков */
.supplier-search {
    margin-bottom: 15px;
}

.supplier-search input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.suppliers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
}

.supplier-card {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.supplier-card:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
    transform: translateY(-2px);
}

.supplier-card.selected {
    border-color: #007bff;
    background-color: #f0f8ff;
}

.supplier-checkbox {
    position: relative;
    margin-right: 15px;
}

.supplier-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: white;
    transition: all 0.3s ease;
}

.supplier-checkbox input:checked ~ .checkmark {
    background: #007bff;
    border-color: #007bff;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.supplier-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.supplier-info {
    flex: 1;
}

.supplier-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.supplier-email {
    color: #666;
    font-size: 14px;
    margin-bottom: 2px;
}

.supplier-company {
    color: #888;
    font-size: 13px;
    font-style: italic;
}

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

.status-active {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-inactive {
    background: #ffebee;
    color: #c62828;
}

.selected-count {
    margin-top: 10px;
    padding: 10px;
    background: #e3f2fd;
    border-radius: 6px;
    font-weight: 500;
    color: #1976d2;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .suppliers-grid {
        grid-template-columns: 1fr;
    }

    .supplier-card {
        flex-direction: column;
        text-align: center;
    }

    .supplier-checkbox {
        margin-right: 0;
        margin-bottom: 10px;
    }
}