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

:root {
    --primary-blue: #2563eb;
    --dark-blue: #1e40af;
    --light-blue: #3b82f6;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --border-color: #e2e8f0;
    --hover-blue: #1d4ed8;
    --success-green: #10b981;
    --error-red: #ef4444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg,
            #ffffff 0%,
            #f0f9ff 15%,
            #e0f2fe 30%,
            #ffffff 45%,
            #f0f9ff 60%,
            #e0f2fe 75%,
            #ffffff 90%,
            #f0f9ff 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    transition: background 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
}

/* Дополнительный слой для более плавного переливания */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(225deg,
            rgba(255, 255, 255, 1) 0%,
            rgba(240, 249, 255, 0.95) 20%,
            rgba(224, 242, 254, 0.9) 40%,
            rgba(255, 255, 255, 1) 60%,
            rgba(240, 249, 255, 0.95) 80%,
            rgba(255, 255, 255, 1) 100%);
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite reverse;
    z-index: -2;
    opacity: 0.8;
}

/* Еще один слой для глубины */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
            rgba(255, 255, 255, 1) 0%,
            rgba(240, 249, 255, 0.9) 25%,
            rgba(224, 242, 254, 0.8) 50%,
            rgba(255, 255, 255, 1) 75%,
            rgba(240, 249, 255, 0.9) 100%);
    background-size: 300% 300%;
    animation: gradientShift 18s ease infinite;
    z-index: -3;
    opacity: 0.6;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, 0.4);
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow:
        2px 0 30px rgba(37, 99, 235, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.5),
        inset -1px 0 2px rgba(255, 255, 255, 0.7);
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-blue);
    padding: 0 24px 32px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 12px 12px;
    flex: 1;
    overflow-y: auto;
}

.menu-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-gray);
    padding: 0 4px 4px;
}

.menu-item {
    padding: 12px 16px;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-item:hover {
    background-color: var(--bg-light);
    color: var(--primary-blue);
}

.menu-item.active {
    background-color: var(--primary-blue);
    color: white;
}

.menu-group {
    display: flex;
    flex-direction: column;
}

.menu-parent {
    font-weight: 600;
}

.menu-subitems {
    display: flex;
    flex-direction: column;
    margin-left: 16px;
    margin-top: 4px;
}

.menu-subitems .menu-item {
    padding: 10px 16px;
    font-size: 14px;
}

.menu-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background-color: var(--bg-light);
    color: var(--text-gray);
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.my-icon {
    width: 50px;
    position: absolute;
    top: 20px;
    left: 30px;
}

.menu-item.active .menu-icon {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.menu-item.active .menu-text {
    color: white;
}

.menu-text {
    flex: 1;
}

.sidebar-footer {
    padding: 16px 24px 0;
    border-top: 1px solid var(--border-color);
}

.account-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-decoration: none;
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-dark);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.04);
}

.account-link:hover,
.account-link.active {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow:
        0 6px 16px rgba(37, 99, 235, 0.12),
        0 2px 6px rgba(0, 0, 0, 0.04);
    background: rgba(240, 249, 255, 0.9);
}

.account-link .menu-icon {
    background-color: transparent;
    border: 1px solid var(--border-color);
}

.account-link-hint {
    font-size: 16px;
    color: var(--text-gray);
}

/* Main Content */
.main-content {
    margin-left: 250px;
    min-height: 100vh;
    padding: 32px;
}

.main-content.full-width {
    margin-left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 40px;
}

/* Forms */
.form-container {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    padding: 40px;
    box-shadow:
        0 20px 60px rgba(37, 99, 235, 0.12),
        0 8px 24px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.6),
        inset 0 1px 3px rgba(255, 255, 255, 0.8);
    max-width: 500px;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.form-container[style*="display: none"] {
    display: none !important;
}

.page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
}

.back-button {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.form-group {
    margin-bottom: 24px;
}

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

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
    height: auto;
    max-height: 300px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label {
    font-size: 14px;
    color: var(--text-gray);
    cursor: pointer;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: white;
    width: 100%;
}

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

.btn-secondary {
    background-color: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

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

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    min-height: auto;
    align-items: start;
    transition: grid-template-columns 0.3s ease;
}

.two-column.show-add-form {
    grid-template-columns: 1fr 1fr;
    align-items: start;
}

.two-column.show-map {
    grid-template-columns: 1fr 1fr;
    align-items: start;
}

.column {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    padding: 32px;
    box-shadow:
        0 20px 60px rgba(37, 99, 235, 0.12),
        0 8px 24px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.6),
        inset 0 1px 3px rgba(255, 255, 255, 0.8);
    overflow-y: visible;
    overflow-x: visible;
    height: auto;
    min-height: auto;
    max-height: none;
    /* transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); */
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Скролл только если контент превышает высоту экрана */
.column:has(.table-container) {
    max-height: calc(100vh - 128px);
    overflow-y: auto;
}

.column[style*="display: none"] {
    display: none !important;
}

.map-container {
    background: linear-gradient(135deg,
            rgba(240, 249, 255, 0.8),
            rgba(224, 242, 254, 0.6));
    backdrop-filter: blur(10px);
    border-radius: 16px;
    min-height: 400px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    border: 2px dashed rgba(37, 99, 235, 0.3);
    box-shadow: inset 0 2px 8px rgba(37, 99, 235, 0.08);
    transition: all 0.3s ease;
}

/* Tables */
.table-container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    padding: 24px;
    box-shadow:
        0 20px 60px rgba(37, 99, 235, 0.1),
        0 8px 24px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(255, 255, 255, 0.5),
        inset 0 1px 3px rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
    width: 100%;
    height: auto;
    min-height: auto;
    overflow-x: auto;
    overflow-y: visible;
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); */
}

.table {
    width: 100%;
    border-collapse: collapse;
    height: auto;
    min-height: auto;
}

.table th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
    white-space: nowrap;
}

.table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.table tr:hover {
    background: linear-gradient(90deg,
            rgba(240, 249, 255, 0.8) 0%,
            rgba(224, 242, 254, 0.6) 100%);
    transform: translateX(2px);
    box-shadow: -4px 0 12px rgba(37, 99, 235, 0.08);
}

/* Selected orders panel */
#selected-orders-panel {
    transition: transform 0.3s ease;
}

#selected-orders-panel[style*="display: none"] {
    transform: translateY(100%);
}

/* Lists */
.list-section {
    margin-bottom: 32px;
    width: 100%;
    height: auto;
    min-height: auto;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-dark);
    width: 100%;
}

.list-item {
    padding: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    height: auto;
    min-height: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.04);
}

.list-item:hover {
    border-color: var(--primary-blue);
    box-shadow:
        0 8px 24px rgba(37, 99, 235, 0.12),
        0 4px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.95);
}

.list-item.active {
    border-color: var(--primary-blue);
    background-color: rgba(37, 99, 235, 0.05);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-gray);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tab.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab:hover {
    color: var(--primary-blue);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Date Input */
.date-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.date-label {
    font-weight: 500;
    color: var(--text-dark);
}

/* Radio Buttons */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    width: 100%;
    height: auto;
    min-height: auto;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    height: auto;
    min-height: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.04);
}

.radio-item label {
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.radio-item:hover {
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(37, 99, 235, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.95);
}

.radio-item input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.radio-item input[type="radio"]:checked+label {
    color: var(--primary-blue);
    font-weight: 500;
}

.radio-item.primary-point {
    border-color: var(--primary-blue);
    background: linear-gradient(135deg,
            rgba(37, 99, 235, 0.12),
            rgba(59, 130, 246, 0.06));
    box-shadow:
        0 6px 20px rgba(37, 99, 235, 0.15),
        0 2px 8px rgba(37, 99, 235, 0.08),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.primary-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--primary-blue);
    color: #fff;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 12px;
    margin-left: 8px;
}

.primary-badge::before {
    content: '★';
}

.radio-item:has(input[type="radio"]:checked) {
    border-color: var(--primary-blue);
    background: linear-gradient(135deg,
            rgba(37, 99, 235, 0.08),
            rgba(59, 130, 246, 0.04));
    box-shadow:
        0 4px 16px rgba(37, 99, 235, 0.12),
        0 2px 6px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(10px);
}

/* Popup */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.popup.active {
    display: flex;
}

.popup-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow:
        0 20px 60px rgba(37, 99, 235, 0.15),
        0 8px 24px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.popup-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

.popup-close {
    float: right;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-gray);
}

/* Courier Icons */
.courier-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

.courier-icon.car::before {
    content: '🚗';
}

.courier-icon.truck::before {
    content: '🚚';
}

.courier-icon.bicycle::before {
    content: '🚲';
}

.courier-icon.scooter::before {
    content: '🛵';
}

/* ============================================
   BEAUTIFUL SMOOTH ANIMATIONS
   ============================================ */

/* Keyframes */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slideUpFromBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDownToBottom {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes scaleOut {
    from {
        transform: scale(1);
        opacity: 1;
    }

    to {
        transform: scale(0.8);
        opacity: 0;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Enhanced transitions */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar animations */
.sidebar {
    animation: fadeIn 0.4s ease-out;
}

.menu-item {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.menu-item:hover::before {
    left: 100%;
}

.menu-item.active {
    animation: pulse 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Column animations */
.column {
    animation: fadeIn 0.5s ease-out;
}

.column[style*="display: block"] {
    animation: slideInFromRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Two column layout animations */
.two-column {
    transition: grid-template-columns 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.two-column.show-add-form .column:last-child {
    animation: slideInFromRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Panel animations */
#selected-orders-panel,
#selected-point-panel,
#selected-courier-panel {
    animation: slideUpFromBottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom;
}

#selected-orders-panel[style*="display: none"],
#selected-point-panel[style*="display: none"],
#selected-courier-panel[style*="display: none"] {
    animation: slideDownToBottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button animations */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    box-shadow:
        0 8px 20px rgba(37, 99, 235, 0.3),
        0 4px 10px rgba(37, 99, 235, 0.2),
        0 0 20px rgba(37, 99, 235, 0.1);
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::before {
    width: 400px;
    height: 400px;
}

.btn-primary:hover {
    box-shadow:
        0 12px 32px rgba(37, 99, 235, 0.4),
        0 6px 16px rgba(37, 99, 235, 0.25),
        0 0 30px rgba(37, 99, 235, 0.2);
    transform: translateY(-4px) scale(1.03);
    background: linear-gradient(135deg, var(--hover-blue), var(--primary-blue));
}

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

/* Table animations */
.table-container {
    animation: fadeIn 0.5s ease-out;
}

.table tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
}

.table tr:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.table tbody tr {
    animation: fadeIn 0.4s ease-out;
    animation-fill-mode: both;
}

.table tbody tr:nth-child(1) {
    animation-delay: 0.05s;
}

.table tbody tr:nth-child(2) {
    animation-delay: 0.1s;
}

.table tbody tr:nth-child(3) {
    animation-delay: 0.15s;
}

.table tbody tr:nth-child(4) {
    animation-delay: 0.2s;
}

.table tbody tr:nth-child(5) {
    animation-delay: 0.25s;
}

/* List item animations */
.list-item {
    animation: fadeIn 0.4s ease-out;
    animation-fill-mode: both;
    transform: translateZ(0);
}

.list-item:nth-child(1) {
    animation-delay: 0.05s;
}

.list-item:nth-child(2) {
    animation-delay: 0.1s;
}

.list-item:nth-child(3) {
    animation-delay: 0.15s;
}

.list-item:nth-child(4) {
    animation-delay: 0.2s;
}

.list-item:hover {
    transform: translateX(4px) scale(1.01);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.list-item.active {
    animation: pulse 0.3s ease-out;
}

/* Radio item animations */
.radio-item {
    transform: translateZ(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.radio-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.radio-item:has(input[type="radio"]:checked) {
    animation: pulse 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* Form input animations */
.form-input,
.form-select,
.form-textarea {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.15);
}

/* Popup animations */
.popup {
    animation: fadeIn 0.3s ease-out;
    backdrop-filter: blur(4px);
}

.popup.active .popup-content {
    animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.popup-content {
    transform-origin: center;
}

.popup-close {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.popup-close:hover {
    transform: rotate(90deg) scale(1.1);
    color: var(--error-red);
}

/* Back button animation */
.back-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-button:hover {
    transform: translateX(-4px);
    color: var(--primary-blue);
}

/* Tab animations - улучшенные плавные переходы */
.tab {
    position: relative;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.5);
}

.tab.active::after {
    width: 100%;
}

.tab:hover {
    transform: translateY(-2px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tab.active {
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Page title animation */
.page-title {
    animation: fadeIn 0.6s ease-out;
}

/* Table container animation */
.table-container {
    animation: fadeIn 0.5s ease-out;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.table-container:hover {
    box-shadow:
        0 12px 40px rgba(37, 99, 235, 0.1),
        0 4px 16px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Map container animation */
.map-container {
    animation: fadeIn 0.6s ease-out;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-container:hover {
    box-shadow: inset 0 0 20px rgba(37, 99, 235, 0.1);
}

/* Form container animation */
.form-container {
    animation: fadeIn 0.5s ease-out;
    width: 100%;
    height: auto;
    min-height: auto;
    max-height: none;
}

/* Status badge animation */
.status-badge {
    animation: fadeIn 0.4s ease-out;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-badge:hover {
    transform: scale(1.05);
}

/* Loading shimmer effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.loading-shimmer {
    background: linear-gradient(90deg,
            var(--bg-light) 0%,
            rgba(255, 255, 255, 0.8) 50%,
            var(--bg-light) 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Selection panel enhanced */
#selected-orders-panel,
#selected-point-panel,
#selected-courier-panel {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* Text Type Animation (Typewriter Effect) */
.welcome-text-container {
    font-size: 42px;
    font-family: 'Aptos Black', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 900;
    color: var(--primary-blue);
    line-height: 1.5;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

.text-type {
    display: inline-block;
    white-space: pre-wrap;
}

.text-type__cursor {
    margin-left: 0.25rem;
    display: inline-block;
    opacity: 1;
    animation: text-type-blink 0.5s infinite;
}

.text-type__cursor--hidden {
    display: none;
}

@keyframes text-type-blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .two-column {
        grid-template-columns: 1fr;
        min-height: auto;
        height: auto;
    }

    .two-column.show-add-form,
    .two-column.show-map {
        grid-template-columns: 1fr;
    }

    .map-container {
        min-height: 300px;
        height: auto;
    }

    .column:has(.table-container) {
        max-height: none;
        overflow-y: visible;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
    }

    /* Reduce animations on mobile for performance */
    * {
        animation-duration: 0.2s !important;
        transition-duration: 0.2s !important;
    }
}

/* ============================================
   DARK THEME
   ============================================ */

body.theme-dark {
    --primary-blue: #3b82f6;
    --dark-blue: #2563eb;
    --light-blue: #60a5fa;
    --bg-white: #1e293b;
    --bg-light: #0f172a;
    --text-dark: #f1f5f9;
    --text-gray: #cbd5e1;
    --border-color: #334155;
    --hover-blue: #2563eb;
    --success-green: #10b981;
    --error-red: #ef4444;

    position: relative;

    /* Оранжево-фиолетовый переливающийся фон - менее контрастный с затемнением */
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        linear-gradient(135deg,
            #6d28d9 0%,
            #742900 25%,
            #9333ea 50%,
            #8b420d 75%,
            #7c3aed 100%);
    background-size: 400% 400%;
    animation: darkGradientShift 15s ease infinite;
    color: var(--text-dark);
}

body.theme-dark::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(225deg,
            rgba(109, 40, 217, 0.4) 0%,
            rgba(234, 88, 12, 0.3) 20%,
            rgba(147, 51, 234, 0.4) 40%,
            rgba(109, 40, 217, 0.4) 60%,
            rgba(249, 115, 22, 0.3) 80%,
            rgba(109, 40, 217, 0.4) 100%);
    background-size: 400% 400%;
    animation: darkGradientShift 12s ease infinite reverse;
    z-index: -2;
    opacity: 0.6;
    /* Дополнительное затемнение */
    box-shadow: inset 0 0 300px rgba(0, 0, 0, 0.5);
}

body.theme-dark::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(109, 40, 217, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(234, 88, 12, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(147, 51, 234, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 60% 60%, rgba(249, 115, 22, 0.25) 0%, transparent 50%);
    background-size: 200% 200%;
    animation: darkRadialShift 18s ease infinite;
    z-index: -3;
    opacity: 0.4;
}

@keyframes darkGradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes darkRadialShift {

    0%,
    100% {
        background-position: 0% 0%, 100% 100%, 50% 50%, 50% 50%;
    }

    25% {
        background-position: 100% 0%, 0% 100%, 0% 0%, 100% 100%;
    }

    50% {
        background-position: 100% 100%, 0% 0%, 100% 0%, 0% 100%;
    }

    75% {
        background-position: 0% 100%, 100% 0%, 50% 100%, 50% 0%;
    }
}

/* Тёмная тема - Sidebar */
body.theme-dark .sidebar {
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(15px);
    border-right: 1px solid rgba(51, 65, 85, 0.8);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
}

body.theme-dark .logo {
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
}

body.theme-dark .menu-item {
    color: var(--text-gray);
}

body.theme-dark .menu-item:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--light-blue);
}

body.theme-dark .menu-item.active {
    background-color: rgba(59, 130, 246, 0.2);
    color: var(--primary-blue);
}

/* Тёмная тема - Формы и контейнеры */
body.theme-dark .form-container,
body.theme-dark .column,
body.theme-dark .table-container {
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(51, 65, 85, 0.8);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.4),
        0 4px 16px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

body.theme-dark .form-input,
body.theme-dark .form-select,
body.theme-dark .form-textarea {
    background-color: rgba(15, 23, 42, 0.8);
    border-color: var(--border-color);
    color: var(--text-dark);
}

body.theme-dark .form-input:focus,
body.theme-dark .form-select:focus,
body.theme-dark .form-textarea:focus {
    border-color: var(--primary-blue);
    background-color: rgba(15, 23, 42, 0.9);
}

body.theme-dark .form-label {
    color: var(--text-gray);
}

/* Тёмная тема - Таблицы */
body.theme-dark .table {
    color: var(--text-dark);
}

body.theme-dark .table thead {
    background-color: rgba(15, 23, 42, 0.8);
    border-bottom: 2px solid var(--border-color);
}

body.theme-dark .table th {
    color: var(--text-gray);
}

body.theme-dark .table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

body.theme-dark .table tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

/* Тёмная тема - Кнопки */
body.theme-dark .btn-primary {
    background-color: var(--primary-blue);
    color: white;
}

body.theme-dark .btn-primary:hover {
    background-color: var(--hover-blue);
}

body.theme-dark .btn-secondary {
    background-color: rgba(51, 65, 85, 0.8);
    color: var(--text-dark);
    border-color: var(--border-color);
}

body.theme-dark .btn-secondary:hover {
    background-color: rgba(51, 65, 85, 1);
}

/* Тёмная тема - Заголовки */
body.theme-dark .page-title {
    color: var(--text-dark);
}

body.theme-dark .section-title {
    color: var(--text-dark);
}

/* Тёмная тема - Анимированный текст */
body.theme-dark .welcome-text-container {
    color: #fbbf24;
    text-shadow: 0 2px 10px rgba(251, 191, 36, 0.5),
        0 4px 20px rgba(124, 58, 237, 0.5);
}

/* Тёмная тема - Статусы */
body.theme-dark .status-planned {
    background-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

body.theme-dark .status-completed {
    background-color: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

body.theme-dark .status-in-progress {
    background-color: rgba(251, 191, 36, 0.2);
    color: #fde68a;
}

/* Status badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
    transition: all 0.2s ease;
}

.status-badge:hover {
    transform: scale(1.05);
}

.status-planned {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.15);
}

.status-planned::before {
    content: '⏱';
    margin-right: 6px;
}

.status-completed {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.15);
}

.status-completed::before {
    content: '✓';
    margin-right: 6px;
    font-weight: bold;
}

.status-in-progress {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    box-shadow: 0 2px 6px rgba(251, 191, 36, 0.15);
}

.status-in-progress::before {
    content: '⟳';
    margin-right: 6px;
}

/* Table input styles */
.table input[type="radio"],
.table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

.table tr {
    cursor: pointer;
}

/* Search input wrapper */
.search-input-wrapper {
    position: relative;
    width: 350px;
}

.search-input-wrapper .form-input {
    padding-left: 45px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.search-icon svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   ADVANCED ANIMATIONS & EFFECTS
   ============================================ */

/* Floating animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Glow pulse */
@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(37, 99, 235, 0.6);
    }
}



/* Gradient border animation */
@keyframes borderGradient {
    0% {
        border-image-source: linear-gradient(45deg, var(--primary-blue), var(--light-blue));
    }

    50% {
        border-image-source: linear-gradient(225deg, var(--light-blue), var(--primary-blue));
    }

    100% {
        border-image-source: linear-gradient(45deg, var(--primary-blue), var(--light-blue));
    }
}

/* Icon styles */
.btn i,
.page-title i,
.status-badge i {
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.menu-icon {
    font-size: 20px !important;
    width: auto !important;
    height: auto !important;
    background: none !important;
    color: inherit !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.menu-item.active .menu-icon {
    color: white !important;
}

/* Selection Panel - Clean Modern Design */
.selection-panel {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);

    /* Clean solid background */
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;

    /* Soft elegant shadow */
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);

    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-width: 420px;
    max-width: 800px;
    width: auto;

    /* Smooth Animation */
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
}

.selection-panel.active {
    opacity: 1;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
}

/* Subtle hover lift effect */
.selection-panel.active:hover {
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateX(-50%) translateY(-2px);
}

/* Dark Theme */
body.theme-dark .selection-panel {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.2);
}

body.theme-dark .selection-panel.active:hover {
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 4px 12px rgba(59, 130, 246, 0.15);
}

.selection-panel-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.selection-panel-text {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

body.theme-dark .selection-panel-text {
    color: #f1f5f9;
}

.selection-panel-close {
    background: rgba(0, 0, 0, 0.04);
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    width: 28px;
    height: 28px;
}

.selection-panel-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-red);
}

body.theme-dark .selection-panel-close {
    background: rgba(255, 255, 255, 0.06);
}

body.theme-dark .selection-panel-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.selection-panel-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.selection-panel-actions .btn {
    font-size: 14px;
    padding: 8px 16px;
    transition: all 0.2s ease;
}

.selection-panel-actions .btn:hover {
    transform: translateY(-1px);
}

/* Footer Styles */
.site-footer {
    width: 100%;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    padding: 20px 40px;
    box-shadow:
        0 -4px 24px rgba(37, 99, 235, 0.08),
        0 -2px 8px rgba(0, 0, 0, 0.04);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-blue);
    white-space: nowrap;
}

.footer-description {
    font-size: 13px;
    color: var(--text-gray);
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 10px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.04);
    white-space: nowrap;
}

.footer-link:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow:
        0 6px 16px rgba(37, 99, 235, 0.12),
        0 2px 6px rgba(0, 0, 0, 0.04);
    background: rgba(240, 249, 255, 0.9);
}

.footer-link i {
    font-size: 14px;
}

.footer-copyright {
    font-size: 12px;
    color: var(--text-gray);
    white-space: nowrap;
}