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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Форма входа */
.login-form {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
    animation: slideIn 0.6s ease-out;
}

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

.login-container {
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 3rem;
    color: #4facfe;
    margin-bottom: 15px;
}

.login-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.login-header p {
    color: #666;
    font-size: 0.95rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.form-group label i {
    color: #4facfe;
}

.form-group input {
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
    transform: translateY(-2px);
}

.login-btn {
    padding: 15px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.back-link {
    color: #4facfe;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: #3a8bfe;
    transform: translateX(-5px);
}

/* Админ панель */
.admin-panel {
    width: 100%;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
    animation: slideIn 0.6s ease-out;
}

.admin-panel.hidden {
    display: none;
}

.admin-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 25px 30px;
}

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

.header-content h1 {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logout-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.admin-content {
    padding: 30px;
}

.tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 5px;
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    background: rgba(79, 172, 254, 0.1);
    color: #4facfe;
}

.tab-btn.active {
    color: #4facfe;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

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

.rates-container {
    max-width: 800px;
    margin: 0 auto;
}

.rates-header {
    text-align: center;
    margin-bottom: 30px;
}

.rates-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.rates-header p {
    color: #6c757d;
    margin: 0;
}

.copy-section {
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.copy-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

.copy-btn i {
    transition: transform 0.3s ease;
}

.copy-btn:hover i {
    transform: scale(1.1);
}

.rates-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.rate-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    animation: slideInLeft 0.4s ease-out;
    cursor: grab;
    position: relative;
}

.rate-item:active {
    cursor: grabbing;
}

.rate-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.rate-item.drag-over {
    border-color: #4facfe;
    background: rgba(79, 172, 254, 0.1);
    transform: translateY(-5px);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.rate-item:hover {
    border-color: #4facfe;
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.rate-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.rate-item-title {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.drag-handle {
    color: #6c757d;
    cursor: grab;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.drag-handle:hover {
    color: #4facfe;
    background: rgba(79, 172, 254, 0.1);
}

.drag-handle:active {
    cursor: grabbing;
}

.delete-rate-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.delete-rate-btn:hover {
    background: #c82333;
    transform: scale(1.05);
}

.rate-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

.rate-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rate-field label {
    font-weight: 600;
    color: #495057;
    font-size: 0.85rem;
}

.rate-field input {
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    transition: all 0.3s ease;
}

.rate-field input:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 2px rgba(79, 172, 254, 0.1);
}

.add-rate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.add-rate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.add-rate-btn i {
    transition: transform 0.3s ease;
}

.add-rate-btn:hover i {
    transform: rotate(90deg);
}

.save-section {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.save-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.save-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
}

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

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

.notification.error {
    background: #dc3545;
}

.notification.info {
    background: #17a2b8;
}

/* Настройки */
.settings-container {
    max-width: 800px;
    margin: 0 auto;
}

.settings-header {
    text-align: center;
    margin-bottom: 30px;
}

.settings-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.settings-header p {
    color: #6c757d;
    margin: 0;
}

.settings-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

.settings-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

.setting-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.setting-info {
    flex: 1;
}

.setting-label {
    font-weight: 600;
    color: #495057;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    cursor: pointer;
}

.setting-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

.setting-control {
    margin-left: 20px;
}

/* Переключатель */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-switch:hover .toggle-slider {
    box-shadow: 0 0 5px rgba(79, 172, 254, 0.3);
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .login-container {
        padding: 30px 20px;
    }
    
    .admin-content {
        padding: 20px;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .rate-fields {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-content h1 {
        font-size: 1.5rem;
    }
    
    .logout-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Мобильная адаптация для настроек */
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .setting-control {
        margin-left: 0;
        align-self: flex-end;
    }
    
    /* Мобильная адаптация для drag & drop */
    .rate-item {
        cursor: default;
    }
    
    .drag-handle {
        padding: 8px;
        font-size: 1rem;
    }
    
    .rate-item.dragging {
        transform: scale(1.02);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    }
    
    .rate-item.drag-over {
        transform: translateY(-3px);
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 25px 15px;
    }
    
    .admin-content {
        padding: 15px;
    }
    
    .rate-item {
        padding: 15px;
    }
    
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        text-align: center;
    }
    
    .drag-handle {
        padding: 6px;
        font-size: 0.9rem;
    }
}

/* Модальное окно */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideInUp 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #dc3545;
}

.modal-body {
    padding: 25px;
}

.modal-body p {
    margin: 0 0 20px 0;
    color: #495057;
}

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

.modal-body .form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 0.85rem;
}

.example-preview {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #4facfe;
}

.example-preview p {
    margin: 0;
    font-size: 0.9rem;
}

.modal-footer {
    display: flex;
    gap: 15px;
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    justify-content: flex-end;
}

.modal-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.modal-btn.cancel {
    background: #6c757d;
    color: white;
}

.modal-btn.cancel:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.modal-btn.confirm {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.modal-btn.confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

/* Мобильная адаптация для модального окна */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        padding: 15px 20px;
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Стили для цен между городами */
.prices-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.prices-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.prices-header h2 {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.prices-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.prices-controls {
    padding: 20px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 0.9rem;
}

.search-box input {
    width: 100%;
    padding: 10px 15px 10px 35px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-controls label {
    font-size: 0.9rem;
    color: #495057;
    font-weight: 500;
}

.sort-controls select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-controls select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.prices-list {
    max-height: 600px;
    overflow-y: auto;
    padding: 0;
}

.price-item {
    display: flex;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.3s ease;
    cursor: pointer;
}

.price-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

.price-item:last-child {
    border-bottom: none;
}

.price-route {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.route-cities {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.city {
    font-weight: 600;
    color: #495057;
    font-size: 1rem;
}

.route-arrow {
    color: #6c757d;
    font-size: 0.9rem;
}

.route-distance {
    color: #6c757d;
    font-size: 0.85rem;
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.price-details {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: 20px;
}

.price-amount {
    font-size: 1.2rem;
    font-weight: 700;
    color: #28a745;
    white-space: nowrap;
}

.price-rate {
    color: #6c757d;
    font-size: 0.85rem;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.price-category {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-category.low {
    background: #d4edda;
    color: #155724;
}

.price-category.medium {
    background: #fff3cd;
    color: #856404;
}

.price-category.high {
    background: #f8d7da;
    color: #721c24;
}

.no-prices {
    padding: 60px 30px;
    text-align: center;
    color: #6c757d;
}

.no-prices i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-prices h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.no-prices p {
    margin: 0;
    font-size: 0.9rem;
}

/* Мобильная адаптация для цен */
@media (max-width: 768px) {
    .prices-header {
        padding: 20px;
    }
    
    .prices-controls {
        padding: 15px 20px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .sort-controls {
        justify-content: space-between;
    }
    
    .price-item {
        padding: 15px 20px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .price-route {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .route-cities {
        justify-content: center;
    }
    
    .price-details {
        margin-left: 0;
        justify-content: space-between;
    }
    
    .price-amount {
        font-size: 1.1rem;
    }
} 

/* Настройки */
.settings-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.settings-header {
    margin-bottom: 30px;
}

.settings-header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.settings-header h2 i {
    color: #3498db;
}

.settings-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.settings-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-item {
    display: flex;
    justify-content: between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #ecf0f1;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info {
    flex: 1;
}

.setting-label {
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.setting-description {
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.5;
}

.setting-control {
    margin-left: 20px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #27ae60;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* Управление городами */
.cities-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.cities-header {
    margin-bottom: 30px;
}

.cities-header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.cities-header h2 i {
    color: #e74c3c;
}

.add-city-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    border-left: 4px solid #e74c3c;
}

.add-city-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.add-city-form .form-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 15px;
    align-items: end;
    margin-bottom: 15px;
}

.add-city-form .form-group {
    display: flex;
    flex-direction: column;
}

.add-city-form label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-city-form input {
    padding: 12px 15px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.add-city-form input:focus {
    outline: none;
    border-color: #e74c3c;
}

.add-city-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-city-btn:hover {
    background: #c0392b;
}

.coordinate-help {
    background: #e8f5e8;
    border: 1px solid #27ae60;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.coordinate-help p {
    color: #27ae60;
    font-weight: 600;
    margin-bottom: 8px;
}

.coordinate-help ul {
    margin-left: 20px;
    color: #2c3e50;
}

.coordinate-help li {
    margin-bottom: 5px;
}

.coordinate-help a {
    color: #3498db;
    text-decoration: none;
}

.coordinate-help a:hover {
    text-decoration: underline;
}

.distance-management {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
}

.distance-management h3 {
    color: #856404;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.distance-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recalculate-btn {
    background: #ffc107;
    color: #212529;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
}

.recalculate-btn:hover {
    background: #e0a800;
}

.recalculate-btn.small {
    padding: 8px 15px;
    font-size: 14px;
}

.recalculate-info {
    color: #856404;
    font-size: 14px;
}

.cities-list-section {
    border-top: 2px solid #ecf0f1;
    padding-top: 30px;
}

.cities-list-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cities-controls {
    margin-bottom: 20px;
}

.cities-controls p {
    color: #7f8c8d;
    font-style: italic;
}

.cities-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.city-item {
    background: #f8f9fa;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    transition: all 0.3s ease;
}

.city-item:hover {
    background: #e3f2fd;
    border-color: #2196f3;
}

.city-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.city-info {
    flex: 1;
}

.city-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.city-coordinates {
    color: #7f8c8d;
    font-size: 14px;
    font-family: 'Courier New', monospace;
}

.city-actions {
    display: flex;
    gap: 10px;
}

.city-action-btn {
    background: none;
    border: 2px solid;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.view-distances-btn {
    color: #3498db;
    border-color: #3498db;
}

.view-distances-btn:hover {
    background: #3498db;
    color: white;
}

.edit-city-btn {
    color: #f39c12;
    border-color: #f39c12;
}

.edit-city-btn:hover {
    background: #f39c12;
    color: white;
}

.delete-city-btn {
    color: #e74c3c;
    border-color: #e74c3c;
}

.delete-city-btn:hover {
    background: #e74c3c;
    color: white;
}

/* Модальные окна для городов */
.modal-content.large {
    max-width: 800px;
}

.distances-list {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 15px;
}

.distance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #ecf0f1;
    background: #f8f9fa;
    margin-bottom: 5px;
    border-radius: 8px;
}

.distance-item:last-child {
    border-bottom: none;
}

.distance-city {
    font-weight: 600;
    color: #2c3e50;
}

.distance-details {
    display: flex;
    gap: 20px;
    color: #7f8c8d;
    font-size: 14px;
}

.distance-km {
    color: #27ae60;
    font-weight: 600;
}

.distance-time {
    color: #3498db;
}

/* Адаптивность для управления городами */
@media (max-width: 768px) {
    .add-city-form .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .city-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .city-actions {
        align-self: stretch;
        justify-content: space-between;
    }
    
    .city-action-btn {
        flex: 1;
        justify-content: center;
    }
} 

/* Модальное окно прогресса */
.progress-info {
    text-align: center;
    margin-bottom: 20px;
}

.progress-info p {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #2c3e50;
}

.progress-stats {
    font-size: 14px;
    color: #7f8c8d;
}

.progress-bar-container {
    position: relative;
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 10px;
    width: 0%;
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    color: #2c3e50;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.progress-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.progress-detail {
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
}

.progress-detail i {
    display: block;
    font-size: 16px;
    margin-bottom: 5px;
}

.text-success {
    color: #27ae60;
}

.text-warning {
    color: #f39c12;
}

.progress-log {
    margin-top: 20px;
}

.log-header {
    font-weight: 500;
    margin-bottom: 10px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.log-content {
    max-height: 150px;
    overflow-y: auto;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    line-height: 1.4;
}

.log-entry {
    margin-bottom: 3px;
    padding: 2px 0;
}

.log-entry.success {
    color: #27ae60;
}

.log-entry.error {
    color: #e74c3c;
}

.log-entry.info {
    color: #3498db;
}

.log-entry .timestamp {
    color: #7f8c8d;
    font-size: 11px;
}

/* Анимация для модального окна прогресса */
#progress-modal.show {
    display: flex;
    opacity: 1;
}

#progress-modal .modal-content {
    max-width: 600px;
    animation: progressModalIn 0.3s ease-out;
}

@keyframes progressModalIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 768px) {
    .progress-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .progress-detail {
        padding: 8px;
        font-size: 12px;
    }
    
    .log-content {
        max-height: 100px;
        font-size: 11px;
    }
} 

/* Управление границей */
.border-management {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
}

.border-management h3 {
    color: #c53030;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.border-info {
    color: #c53030;
    font-size: 14px;
    margin-bottom: 20px;
}

.border-settings-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto auto;
    gap: 15px;
    align-items: end;
}

.border-settings-form .form-group {
    display: flex;
    flex-direction: column;
}

.border-settings-form label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.border-settings-form input,
.border-settings-form select {
    padding: 12px 15px;
    border: 2px solid #fed7d7;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.border-settings-form input:focus,
.border-settings-form select:focus {
    outline: none;
    border-color: #c53030;
}

.save-border-btn {
    background: #c53030;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.save-border-btn:hover {
    background: #a53030;
}

/* Визуальная полоска границы */
.border-line {
    height: 4px;
    background: linear-gradient(90deg, #c53030, #e53e3e, #c53030);
    margin: 15px 0;
    border-radius: 2px;
    position: relative;
    box-shadow: 0 2px 8px rgba(197, 48, 48, 0.3);
}

.border-line::before {
    content: 'ГРАНИЦА';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #c53030;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.border-line::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #c53030;
}

/* Адаптивность для управления границей */
@media (max-width: 768px) {
    .border-settings-form .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .border-line::before {
        font-size: 10px;
        padding: 3px 8px;
    }
} 