/* ========== TRANS-LK: ПОЛНЫЙ НАБОР СТИЛЕЙ ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* font-family убрано из *: единый Inter задан в body (v38, UI#7) */
}
:root {
    --primary-color: #002366;
    --primary-dark: #001A4D;
    --accent-red: #E50000;
    --accent-red-light: #FF4500;
    --silver: #D3D3D3;
    --white: #FFFFFF;
    --text-dark: #202124;
    --text-light: #5f6368;
    --border-color: #D3D3D3;
    --card-shadow: 0 1px 3px rgba(0,35,102,0.1);
    --hover-shadow: 0 4px 12px rgba(0,35,102,0.15);
}
body {
    background-color: #f5f7fa;
    color: var(--text-dark);
    line-height: 1.6;
}

/* ========== LAYOUT ========== */
.container {
    display: flex;
    min-height: 100vh;
}

/* ========== SIDEBAR ========== */
.sidebar {
    width: 250px;
    background-color: var(--white);
    border-right: 1px solid var(--border-color);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    box-shadow: var(--card-shadow);
    position: fixed;
    height: 100vh;
    z-index: 100;
    overflow-y: auto;
}
.logo {
    padding: 0 20px 30px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}
.logo h1 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.5px;
}
.logo .trans { color: var(--primary-color); }
.logo .logix { color: var(--silver); font-weight: 400; }

.nav-menu {
    flex-grow: 1;
    padding: 0 20px;
}
.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.2s ease;
}
.nav-item:hover, .nav-item.active {
    background-color: rgba(0,35,102,0.08);
    color: var(--primary-color);
}
.nav-item.active {
    font-weight: 600;
    color: var(--primary-color);
}
.nav-icon {
    margin-right: 14px;
    font-size: 18px;
    width: 24px;
    text-align: center;
}
.user-info {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}
.user-details h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}
.user-details p {
    font-size: 12px;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}
.logout-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-light);
    text-decoration: none;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s;
    margin-left: auto;
    flex-shrink: 0;
}
.logout-link:hover { color: var(--accent-red); }

/* ========== MAIN CONTENT ========== */
.main-content {
    flex-grow: 1;
    margin-left: 250px;
    padding: 30px;
    min-height: 100vh;
}
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}
.page-title h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-dark);
}
.page-title p {
    color: var(--text-light);
    margin-top: 5px;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ========== FLASH MESSAGES ========== */
.flash-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.flash-msg {
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    min-width: 280px;
    max-width: 400px;
}
.flash-msg.notice, .flash-msg.success {
    background-color: #34a853;
    color: #fff;
}
.flash-msg.alert, .flash-msg.error {
    background-color: var(--accent-red);
    color: #fff;
}
.flash-msg .close-flash {
    margin-left: auto;
    cursor: pointer;
    background: none;
    border: none;
    color: inherit;
    font-size: 16px;
    padding: 0;
    opacity: 0.8;
}
.flash-msg .close-flash:hover { opacity: 1; }
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

/* ========== STAT CARDS ========== */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background-color: var(--white);
    border-radius: 10px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
}
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}
.stat-card i {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 15px;
}
.stat-card h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-dark);
}
.stat-card p {
    color: var(--text-light);
    font-size: 14px;
}

/* ========== CONTENT SECTION ========== */
.content-section {
    background-color: var(--white);
    border-radius: 10px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.section-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

/* ========== BUTTONS ========== */
.btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}
.btn:hover { background-color: var(--primary-dark); color: var(--white); }
.btn-outline {
    background-color: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}
.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}
.btn-danger {
    background-color: var(--white);
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-danger:hover {
    background-color: var(--accent-red);
    color: var(--white);
}
.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
}

/* ========== TABLES ========== */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter-btn {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: var(--text-dark);
    text-decoration: none;
    display: inline-block;
}
.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead { border-bottom: 1px solid var(--border-color); }
th {
    text-align: left;
    padding: 14px 10px;
    font-weight: 600;
    color: var(--text-light);
    font-size: 14px;
    white-space: nowrap;
}
td {
    padding: 16px 10px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
    font-size: 14px;
}
tbody tr:hover { background-color: rgba(0,35,102,0.02); }

/* ========== STATUS BADGES ========== */
.status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}
.status-new, .status.new { background-color: rgba(0,35,102,0.1); color: var(--primary-color); }
.status-processing, .status.processing { background-color: rgba(255,69,0,0.1); color: var(--accent-red-light); }
.status-in-transit, .status.in-transit { background-color: rgba(245,158,11,0.14); color: #b45309; }
.status-delivered, .status.delivered { background-color: #e6f4ea; color: #137333; }
.status-cancelled, .status.cancelled { background-color: #fce8e6; color: #c5221f; }

/* ========== ACTION ICONS ========== */
.action-icons { display: flex; gap: 12px; }
.action-icon {
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 5px;
    border-radius: 4px;
    color: var(--primary-color);
    text-decoration: none;
}
.action-icon:hover {
    background-color: rgba(0,35,102,0.08);
    transform: translateY(-2px);
}
.action-icon.view  { color: var(--primary-color); }
.action-icon.copy  { color: var(--accent-red); }
.action-icon.print { color: var(--accent-red-light); }

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 10px;
}
.pagination-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background-color: var(--white);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
}
.pagination-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.pagination-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* ========== FORMS ========== */
.form-row { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.form-group { flex: 1; min-width: 200px; }
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 13px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-dark);
    background: var(--white);
    transition: border-color 0.2s;
    font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0,35,102,0.1);
}
.form-group textarea { min-height: 80px; resize: vertical; }
.form-section {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}
.form-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-section-title i { color: var(--primary-color); }
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}
.field_with_errors input,
.field_with_errors select,
.field_with_errors textarea {
    border-color: var(--accent-red);
}
.error-msg {
    color: var(--accent-red);
    font-size: 12px;
    margin-top: 4px;
}
.errors-box {
    background: #fce8e6;
    border: 1px solid var(--accent-red);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}
.errors-box h4 { color: #c5221f; margin-bottom: 8px; font-size: 14px; }
.errors-box ul { margin-left: 16px; color: #c5221f; font-size: 13px; }

/* ========== COMPANY/CONTACT CELLS ========== */
.company-name { font-weight: 600; margin-bottom: 3px; color: var(--text-dark); }
.contact-name { color: var(--text-light); font-size: 12px; }

/* ========== ORDER DETAIL ========== */
.order-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}
.detail-card {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
}
.detail-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 6px;
}
.detail-row {
    display: flex;
    margin-bottom: 8px;
    font-size: 14px;
}
.detail-label { color: var(--text-light); width: 130px; flex-shrink: 0; }
.detail-value { color: var(--text-dark); font-weight: 500; }

/* ========== TIMELINE ========== */
.timeline {
    position: relative;
    padding-left: 30px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border-color);
}
.timeline-item {
    position: relative;
    margin-bottom: 20px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--white);
    border: 2px solid var(--primary-color);
    z-index: 1;
}
.timeline-item.completed::before { background-color: var(--primary-color); }
.timeline-item.current::before { background-color: var(--accent-red); border-color: var(--accent-red); }
.timeline-content {
    padding: 12px 16px;
    background-color: var(--white);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}
.timeline-date { font-size: 12px; color: var(--text-light); margin-bottom: 4px; }
.timeline-status { font-weight: 600; color: var(--text-dark); font-size: 14px; }

/* ========== CALCULATOR PAGE ========== */
.calculator-page-container {
    max-width: 1200px;
}
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
}
.calc-form-card {
    background: var(--white);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    padding: 24px;
}
.calc-results-card {
    background: var(--white);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    padding: 18px;
    /* Sticky обратно: блок всегда виден при прокрутке */
    position: sticky;
    top: 16px;
    align-self: start;
    font-size: 13px;
}
.calc-results-card .calc-section-title { font-size: 13px; }
.calc-results-card h3 { font-size: 14px; }
.calculator-page-container { overflow: visible; }
.calculator-grid { align-items: start; }
.calc-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}
.calc-section-title i { color: var(--primary-color); }
.method-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.method-card {
    flex: 1;
    min-width: 120px;
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    gap: 8px;
}
.method-card:hover { border-color: var(--primary-color); background: rgba(0,35,102,0.02); }
.method-card.active { border-color: var(--primary-color); background: rgba(0,35,102,0.06); }
.method-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(0,35,102,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 14px;
    flex-shrink: 0;
}
.method-card.active .method-icon { background: var(--primary-color); color: var(--white); }
.method-info { flex: 1; }
.method-name { font-weight: 600; font-size: 13px; color: var(--text-dark); }
.method-price { font-size: 11px; color: var(--text-light); }

/* Tariff cards */
.tariff-cards { display: flex; flex-direction: column; gap: 8px; }
.tariff-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.tariff-item:hover { border-color: var(--primary-color); background: rgba(0,35,102,0.02); }
.tariff-item.active { border-color: var(--primary-color); background: rgba(0,35,102,0.06); }
.tariff-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(0,35,102,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 14px;
    margin-right: 10px;
    flex-shrink: 0;
}
.tariff-item.active .tariff-icon { background: var(--primary-color); color: var(--white); }
.tariff-info { flex: 1; display: flex; justify-content: space-between; align-items: center; }
.tariff-name { font-weight: 600; font-size: 14px; color: var(--text-dark); }
.tariff-meta { font-size: 12px; color: var(--text-light); display: flex; align-items: center; gap: 4px; }
.tariff-meta i { color: var(--primary-color); }
.tariff-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    font-size: 10px;
    color: var(--white);
    flex-shrink: 0;
}
.tariff-item.active .tariff-check { background: var(--primary-color); border-color: var(--primary-color); }

/* Total section */
.total-section {
    background: linear-gradient(145deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 16px;
}
.total-label { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; opacity: 0.9; margin-bottom: 4px; }
.total-amount { font-size: 36px; font-weight: 700; line-height: 1; margin-bottom: 4px; }
.total-hint { font-size: 11px; opacity: 0.8; }

.route-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
}
.route-point { display: flex; flex-direction: column; }
.route-label { font-size: 10px; color: var(--text-light); margin-bottom: 2px; }
.route-city { font-weight: 700; font-size: 14px; color: var(--text-dark); }
.route-arrow { color: var(--primary-color); font-size: 18px; }

.weight-panel {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}
.weight-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    border: 1px solid var(--border-color);
}
.weight-card .wc-label { font-size: 10px; color: var(--text-light); margin-bottom: 2px; }
.weight-card .wc-value { font-weight: 700; font-size: 18px; color: var(--text-dark); }
.weight-card .wc-unit { font-size: 10px; color: var(--text-light); }
.weight-card.highlight { background: rgba(0,35,102,0.06); border-color: var(--primary-color); }
.weight-card.highlight .wc-value { color: var(--primary-color); font-size: 20px; }

.calc-details { background: #f8f9fa; border-radius: 8px; padding: 14px; margin-bottom: 16px; }
.calc-row {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px dashed rgba(0,0,0,0.05);
    font-size: 13px;
}
.calc-row:last-child { border-bottom: none; }
.calc-label { color: var(--text-light); display: flex; align-items: center; gap: 6px; }
.calc-label i { color: var(--primary-color); width: 14px; font-size: 12px; }
.calc-value { font-weight: 600; }

.calc-action-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-calc-primary {
    flex: 1;
    padding: 11px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-calc-primary:hover { background: var(--primary-dark); }
.btn-calc-secondary {
    flex: 1;
    padding: 11px;
    background: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-calc-secondary:hover { background: rgba(0,35,102,0.06); }

/* Place card */
.place-card {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 10px;
}
.place-card:hover { border-color: var(--primary-color); }
.place-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.place-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.place-number {
    background: var(--primary-color);
    color: var(--white);
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}
.place-dimensions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.place-dimensions--weights { grid-template-columns: repeat(2, 1fr); margin-bottom: 0; }

/* ТЗ v27: Размер + вес в одной строке (6 колонок) */
.place-dimensions--row { grid-template-columns: repeat(6, 1fr); margin-bottom: 0; }
.place-dimensions--row .dimension-field--vol {
  background: rgba(0,35,102,0.06);
  border-color: rgba(0,35,102,0.2);
}
.place-dimensions--row .dimension-field--vol label {
  background: linear-gradient(180deg, #eff6ff 50%, rgba(0,35,102,0.06) 50%);
  color: var(--primary-color);
}
.place-dimensions--row .dimension-field--vol .place-volumetric-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-color);
}
.dimension-field {
    background: var(--white);
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    align-items: center;
    height: 40px;
}
.dimension-field label {
    position: absolute;
    top: -8px;
    left: 6px;
    background: var(--white);
    padding: 0 4px;
    font-size: 10px;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
}
.dimension-field input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    font-weight: 600;
    color: var(--text-dark);
    padding: 0;
    font-size: 14px;
    background: transparent;
}
.dimension-unit { font-size: 11px; color: var(--text-light); margin-left: 4px; flex-shrink: 0; }
.place-weight { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dimension-field--readonly {
    background: rgba(0,35,102,0.06);
    border-color: rgba(0,35,102,0.2);
}
.dimension-field--readonly label { background: rgba(0,35,102,0.06); color: var(--primary-color); }
/* Превышение лимита зоны: краснеет вся ячейка места (рамка на обёртке, у input border:none) */
.dimension-field.dim-over { border-color: #dc2626 !important; background: #fef2f2; box-shadow: 0 0 0 1px #dc2626 inset; }
.dimension-field.dim-over label { background: #fef2f2; color: #dc2626; }
.dimension-field.dim-over input { color: #b91c1c; background: transparent; }
.place-volumetric-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 14px;
}
.place-weight-display {
    background: var(--white);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    height: 40px;
    font-weight: 700;
}
.add-place-btn {
    width: 100%;
    padding: 10px;
    background: var(--white);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}
.add-place-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
.remove-place-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--accent-red);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}
.remove-place-btn:hover { background: var(--accent-red); color: var(--white); border-color: var(--accent-red); }
.cargo-summary {
    background: var(--white);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cargo-summary-item { display: flex; align-items: center; gap: 8px; }
.cargo-summary-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: rgba(0,35,102,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 13px;
}
.cargo-summary-label { font-size: 10px; color: var(--text-light); }
.cargo-summary-value { font-weight: 700; font-size: 14px; color: var(--text-dark); }

/* Services grid */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.service-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.service-checkbox:hover { background: #f8f9fa; border-color: var(--primary-color); }
.service-checkbox input { width: 16px; height: 16px; cursor: pointer; }
.service-info { flex: 1; }
.service-info h4 { font-size: 13px; font-weight: 600; }
.service-info p { font-size: 11px; color: var(--text-light); }
.service-price { font-weight: 700; color: var(--primary-color); font-size: 12px; }

/* Insurance field */
.insurance-field-wrapper {
    display: flex;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s;
    height: 42px;
    padding: 0 12px;
    width: 100%;
}
.insurance-field-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0,35,102,0.1);
}
.insurance-field-wrapper.disabled { background: #f8f9fa; opacity: 0.7; }
.insurance-icon { color: var(--primary-color); font-size: 14px; margin-right: 8px; }
.insurance-field-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
}
.insurance-unit { font-size: 13px; color: var(--text-light); margin-left: 6px; }

/* ========== LOGIN PAGE ========== */
.login-page {
    min-height: 100vh;
    background: #f5f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-card {
    background: var(--white);
    border-radius: 12px;
    padding: 40px;
    width: 400px;
    max-width: 95vw;
    box-shadow: 0 4px 24px rgba(0,35,102,0.12);
    border: 1px solid var(--border-color);
}
.login-logo {
    text-align: center;
    margin-bottom: 32px;
}
.login-logo h1 { font-size: 28px; font-weight: 700; }
.login-logo p { color: var(--text-light); font-size: 14px; margin-top: 6px; }
.login-form .form-group { margin-bottom: 18px; }
.login-form .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-dark);
}
.login-form .form-group input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box; /* поля точно вмещаются в карточку регистрации */
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}
.login-form .form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0,35,102,0.1);
}
.login-submit {
    width: 100%;
    padding: 13px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}
.login-submit:hover { background: var(--primary-dark); }
.login-alert {
    background: #fce8e6;
    border: 1px solid var(--accent-red);
    color: #c5221f;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========== ADMIN ========== */
.admin-badge {
    background: var(--accent-red);
    color: var(--white);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    margin-left: 8px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .sidebar { width: 70px; }
    .logo h1 span, .nav-item span, .user-details { display: none; }
    .main-content { margin-left: 70px; }
    .calculator-grid { grid-template-columns: 1fr; }
    .calc-results-card { position: static; }
    .order-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .main-content { padding: 16px; }
    .stats-cards { grid-template-columns: 1fr 1fr; }
    .form-row { flex-direction: column; }
    .form-group { min-width: unset; }
    .place-dimensions { grid-template-columns: 1fr 1fr; }
    .services-grid { grid-template-columns: 1fr; }
}

/* ========== ФОРМА ЗАЯВКИ (НОВАЯ) ========== */
h1, h2, h3, .logo h1, .form-section-title, .page-title h2 {
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
}

.logo-img {
    max-height: 44px;
    width: auto;
    object-fit: contain;
}

.order-form { max-width: 860px; }

.form-section {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
}

.form-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-errors {
    background: #fff0f0;
    border: 1px solid #ffb3b3;
    border-left: 4px solid var(--accent-red);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 18px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: #c0392b;
}
.form-errors ul { margin: 0; padding-left: 16px; }

.sender-type-select {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.type-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f9f9f9;
}
.type-option:hover { border-color: var(--primary-color); background: #f0f4ff; }
.type-option--active { border-color: var(--primary-color) !important; background: #eef2ff !important; }
.type-radio { display: none; }
.type-label { font-size: 14px; font-weight: 600; color: var(--text-dark); }

.form-row { display: flex; gap: 16px; }
.form-row .form-group, .form-row-3 .form-group { flex: 1; }
.form-group { margin-bottom: 16px; }

.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-dark); margin-bottom: 6px; }
.field-label .req { color: var(--accent-red); }

.field-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-dark);
    background: #fff;
    transition: border-color 0.2s;
    outline: none;
}
.field-input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(0,35,102,0.08); }
.field-input.field-error { border-color: var(--accent-red); }
.field-textarea { resize: vertical; min-height: 80px; }
.legal-fields { margin-top: 12px; }

.form-actions { display: flex; gap: 12px; align-items: center; padding-top: 8px; }
.btn-large { padding: 13px 32px; font-size: 15px; }

@media (max-width: 768px) {
    .sender-type-select { flex-direction: column; }
    .form-row, .form-row-3 { flex-direction: column; }
}

.sticky-sidebar {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 24px;
}
.step-dot {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(0,35,102,0.1);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary-color); flex-shrink: 0;
    font-size: 11px;
}

/* ============================================================
   orders/index — ТЗ-правки: направление, поповер веса, аккордеон
   ============================================================ */
.table-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; flex-wrap: wrap; }
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-btn { padding: 8px 14px; border: 1px solid var(--border-color); background: #fff; border-radius: 8px; font-size: 13px; color: var(--text-dark); cursor: pointer; text-decoration: none; transition: all 0.15s; }
.filter-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
.filter-btn.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.filter-btn.primary { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.filter-btn.primary:hover { filter: brightness(1.1); }
.filter-btn.ghost { background: transparent; border-style: dashed; color: var(--text-light); }

.date-filter { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border: 1px dashed var(--border-color); border-radius: 8px; background: rgba(0,0,0,0.02); }
.date-filter input[type="date"], .date-filter .search-input { padding: 6px 10px; border: 1px solid var(--border-color); border-radius: 6px; font-size: 13px; background: #fff; color: var(--text-dark); }
.date-filter .search-input { min-width: 200px; }
.date-filter span { color: var(--text-light); }

.orders-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.orders-table th { text-align: left; padding: 12px 10px; background: #fafafa; color: var(--text-light); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; border-bottom: 1px solid var(--border-color); white-space: nowrap; }
.orders-table td { padding: 12px 10px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.orders-table tr.order-row { cursor: pointer; transition: background 0.1s; }
.orders-table tr.order-row:hover { background: rgba(0,35,102,0.03); }
.tracking-link { font-weight: 700; color: var(--primary-color); text-decoration: none; }
.tracking-link:hover { text-decoration: underline; }
.direction { display: inline-block; padding: 4px 10px; background: rgba(0,35,102,0.06); border-radius: 6px; color: var(--primary-color); font-weight: 600; font-size: 12px; white-space: normal; line-height: 1.3; }
.company-name { font-weight: 600; color: var(--text-dark); font-size: 13px; }
.contact-name { color: var(--text-light); font-size: 12px; }

.weight-cell { position: relative; display: inline-block; padding: 3px 8px; border-bottom: 1px dotted var(--text-light); cursor: help; }
.weight-cell:hover .weight-tooltip, .weight-cell:focus-within .weight-tooltip { opacity: 1; visibility: visible; transform: translateY(0); }
.weight-tooltip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translate(-50%, 6px); background: #1c1c1c; color: #fff; padding: 8px 12px; border-radius: 6px; font-size: 12px; line-height: 1.5; white-space: nowrap; opacity: 0; visibility: hidden; transition: all 0.15s; z-index: 100; box-shadow: 0 4px 16px rgba(0,0,0,0.2); pointer-events: none; }
.weight-tooltip::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #1c1c1c; }

.action-icons { display: flex; gap: 6px; align-items: center; }
.action-icon { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; background: rgba(0,0,0,0.04); color: var(--text-light); border: none; cursor: pointer; text-decoration: none; transition: all 0.15s; font-size: 12px; }
.action-icon:hover { background: var(--primary-color); color: #fff; }
.action-icon.toggle-details.open i { transform: rotate(180deg); }
.action-icon.toggle-details i { transition: transform 0.15s; }

.order-details-row { background: #fafbff; }
.order-details-row td { padding: 14px 18px !important; }
.order-details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 24px; }
.order-details-grid .info-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-light); margin-bottom: 4px; }
.order-details-grid .full-row { grid-column: 1 / -1; }

.empty-state { text-align: center; padding: 60px 40px; color: var(--text-light); }
.empty-state i { font-size: 64px; margin-bottom: 20px; opacity: 0.3; display: block; }
.empty-state h3 { font-size: 18px; margin-bottom: 8px; color: var(--text-dark); }
.empty-state p { margin-bottom: 20px; }

@media (max-width: 980px) {
    .orders-table th:nth-child(6), .orders-table td:nth-child(6) { display: none; } /* объёмный вес */
    .orders-table th:nth-child(8), .orders-table td:nth-child(8) { display: none; } /* дата выполнения */
}
@media (max-width: 720px) {
    .table-controls { padding: 12px; }
    .date-filter { width: 100%; flex-wrap: wrap; }
    .date-filter .search-input { min-width: 0; flex: 1; }
    .orders-table { font-size: 12px; }
    .orders-table th, .orders-table td { padding: 8px 6px; }
    .orders-table th:nth-child(7), .orders-table td:nth-child(7) { display: none; } /* дата заказа на узких экранах */
}

/* swap-button для калькулятора (ТЗ: "сделать отправление и получение через кнопку туда сюда") */
/* Grid 3 колонки: Откуда / swap-кнопка / Куда — выровнены по низу = центр инпутов */
.route-row { display: grid; grid-template-columns: 1fr 42px 1fr; gap: 10px; align-items: end; }
.route-row .form-group { display: flex; flex-direction: column; min-width: 0; }
.swap-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--primary-color);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s, box-shadow .15s;
}
.swap-btn:hover { background: var(--primary-color); color: #fff; box-shadow: 0 4px 10px rgba(0,35,102,0.18); }
.swap-btn:active { background: var(--primary-dark); color: #fff; transform: scale(0.92); }

/* ============================================================
   Резиновый layout — финальный проход (ТЗ #1: "сайт весь резиновый")
   ============================================================ */
@media (max-width: 1180px) {
  .container { display: flex; flex-direction: row; }
  .sidebar { width: 200px; flex-shrink: 0; }
  .main { flex: 1; min-width: 0; }
  .stats-cards { grid-template-columns: repeat(2, 1fr); }
  .calculator-grid { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 860px) {
  .container { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; padding: 10px; }
  .sidebar .logo { display: none; }
  .nav-menu { display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .nav-item { font-size: 12px; padding: 6px 10px; }
  .nav-item span { display: none; }
  .nav-icon { margin: 0; }
  .main { padding: 14px; }
  .header { flex-direction: column; align-items: stretch; gap: 12px; }
  .header-actions { width: 100%; justify-content: stretch; }
  .header-actions .btn { flex: 1; justify-content: center; }
  .stats-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card h3 { font-size: 20px; }
  .calc-form-card, .calc-results-card { padding: 14px; }
  .form-row, .form-row-3, .route-row { flex-direction: column; gap: 12px; }
  .swap-btn { transform: rotate(90deg); margin: 4px auto; }
  .swap-btn:hover { transform: rotate(270deg); }
  .tariff-cards { grid-template-columns: 1fr; }
  .method-cards { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .weight-panel { grid-template-columns: 1fr 1fr; }
  .table-controls { flex-direction: column; align-items: stretch; }
  .filters { width: 100%; }
}
@media (max-width: 560px) {
  .stats-cards { grid-template-columns: 1fr; }
  .orders-table th, .orders-table td { padding: 6px 4px; font-size: 11px; }
  .orders-table th:nth-child(4), .orders-table td:nth-child(4) { display: none; } /* Получатель — скрыть на узких */
  .direction { font-size: 11px; padding: 2px 6px; }
  .filter-btn { padding: 6px 10px; font-size: 12px; }
  .invoice { padding: 18px 14px !important; }
}

/* Админка: горизонтальный скролл таблиц на узких экранах */
@media (max-width: 980px) {
  .adm-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .adm-table { min-width: 700px; }
  .adm-form-grid--3 { grid-template-columns: 1fr !important; }
  .adm-page-header { flex-direction: column; align-items: stretch; gap: 10px; }
}

/* ============ QV4: Быстрый просмотр заявки в 4 блока ============ */
.qv4-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-top: 0;
  border-radius: 0 0 14px 14px;
  margin: 0 8px 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}
.qv4-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px;
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
  border-bottom: 1px solid #e5e7eb;
}
.qv4-card-title {
  font-weight: 600;
  font-size: 14px;
  color: #2563eb;
  display: flex;
  align-items: center;
  gap: 10px;
}
.qv4-card-title i { font-size: 16px; }
.qv4-close {
  background: none;
  border: 0;
  font-size: 24px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  transition: background .15s;
}
.qv4-close:hover { background: #e2e8f0; color: #0f172a; }

.qv4-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 20px;
}
.qv4-block {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 18px;
  position: relative;
  transition: border-color .15s, box-shadow .15s;
}
.qv4-block:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.qv4-block-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #2563eb;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 2px solid #eff6ff;
}
.qv4-block-title i { font-size: 14px; opacity: 0.9; }
.qv4-block-subtitle {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin: 16px 0 8px;
  padding-top: 12px;
  border-top: 1px dashed #e2e8f0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.qv4-block-subtitle i { font-size: 11px; }

/* Цветные акценты по блокам */
.qv4-block--main     { border-left: 4px solid #2563eb; }
.qv4-block--main .qv4-block-title { color: #2563eb; }
.qv4-block--parties  { border-left: 4px solid #8b5cf6; }
.qv4-block--parties .qv4-block-title { color: #8b5cf6; }
.qv4-block--cargo    { border-left: 4px solid #f59e0b; }
.qv4-block--cargo .qv4-block-title { color: #f59e0b; }
.qv4-block--history  { border-left: 4px solid #10b981; }
.qv4-block--history .qv4-block-title { color: #10b981; }

.qv4-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
  line-height: 1.45;
}
.qv4-label {
  color: #64748b;
  flex-shrink: 0;
  min-width: 110px;
  font-size: 12px;
}
.qv4-value {
  color: #0f172a;
  word-break: break-word;
  flex: 1;
}
.qv4-value strong { font-weight: 600; }
.qv4-muted { color: #94a3b8; font-size: 12px; }
.qv4-cost { color: #2563eb; font-size: 15px; }

.qv4-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.qv4-party + .qv4-party-divider + .qv4-party { margin-top: 0; }
.qv4-party-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #cbd5e1 50%, transparent);
  margin: 12px 0;
}

/* Timeline (история) */
.qv4-timeline { display: flex; flex-direction: column; gap: 0; }
.qv4-timeline-item {
  position: relative;
  padding: 8px 0 10px 22px;
  border-left: 2px solid #e2e8f0;
  margin-left: 6px;
}
.qv4-timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.qv4-timeline-dot {
  position: absolute;
  left: -7px;
  top: 10px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #e2e8f0;
}
.qv4-timeline-item--current .qv4-timeline-dot {
  width: 14px; height: 14px;
  left: -8px;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  animation: qv4-pulse 2s infinite;
}
@keyframes qv4-pulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18); }
  50%     { box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.08); }
}
.qv4-timeline-when {
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.02em;
}
.qv4-timeline-label {
  font-size: 13px;
  font-weight: 600;
  margin: 2px 0;
}
.qv4-timeline-meta {
  font-size: 12px;
  color: #64748b;
}
.qv4-empty {
  text-align: center;
  padding: 24px 12px;
  color: #94a3b8;
  font-size: 13px;
  font-style: italic;
}

.qv4-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
}

/* Адаптив */
@media (max-width: 900px) {
  .qv4-grid { grid-template-columns: 1fr; }
  .qv4-label { min-width: 90px; }
}

/* ============ ТЗ: Тип отправления в МОДАЛКЕ — одна колонка друг под другом ============ */
.modal .form-shipment-types,
.modal .tariff-cards {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  grid-template-columns: none !important;
}
.modal .form-shipment-types .tariff-item,
.modal .tariff-cards .tariff-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s, background .15s;
}
.modal .form-shipment-types .tariff-item:hover,
.modal .tariff-cards .tariff-item:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.modal .form-shipment-types .tariff-item.active,
.modal .tariff-cards .tariff-item.active {
  border-color: #2563eb;
  background: #eff6ff;
}
.modal .form-shipment-types .tariff-icon,
.modal .tariff-cards .tariff-icon {
  font-size: 20px;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: #eff6ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.modal .form-shipment-types .tariff-name,
.modal .tariff-cards .tariff-name {
  font-weight: 600;
  font-size: 14px;
  flex: 1;
}
.modal .form-shipment-types .tariff-time,
.modal .tariff-cards .tariff-time {
  font-size: 12px;
  color: #64748b;
  margin-left: auto;
}
.modal .form-shipment-types .tariff-price,
.modal .tariff-cards .tariff-price {
  font-size: 12px;
  font-weight: 600;
  color: #f59e0b;
}

/* ============ ТЗ v28: Форма /orders/new по дизайну калькулятора ============ */

/* Контейнер: 2 колонки (форма + sticky цена) как в калькуляторе */
.order-form-page-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

/* Блоки формы заявки — стиль calc-form-card */
.order-form-page-grid .order-form .form-section {
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  padding: 22px 24px;
  margin-bottom: 18px;
}
.order-form-page-grid .order-form .form-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}
.order-form-page-grid .order-form .form-section-title i {
  color: var(--primary-color, #002366);
  font-size: 16px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  border-radius: 7px;
}

/* Правый sticky-блок цены — плавающий без scroll */
.order-form-page-grid .sticky-sidebar {
  position: sticky;
  top: 16px;
  align-self: start;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  padding: 20px;
  font-size: 13px;
}

/* Узкие экраны */
@media (max-width: 1100px) {
  .order-form-page-grid { grid-template-columns: 1fr; }
  .order-form-page-grid .sticky-sidebar { position: static; max-height: none; }
}


/* ============ ТЗ v31: Sticky sidebar формы заявки — как калькулятор ============ */

.order-form-page-grid .sticky-sidebar {
  position: sticky;
  top: 16px;
  align-self: start;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ИТОГО — большая синяя плашка (как в калькуляторе) */
.sidebar-total {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: #fff;
  border-radius: 12px;
  padding: 18px 22px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 35, 102, 0.18);
}
.sidebar-total-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  opacity: 0.85;
  font-weight: 600;
}
.sidebar-total-value {
  font-size: 32px;
  font-weight: 800;
  margin: 4px 0 2px;
  line-height: 1.1;
}
.sidebar-total-unit {
  font-size: 11px;
  opacity: 0.7;
}
.sidebar-total-route {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 12px;
  opacity: 0.9;
}

/* Сводка по статистике */
.sidebar-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: #fff;
  border-radius: 10px;
  padding: 14px 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
}
.sidebar-stat {
  text-align: center;
}
.sidebar-stat-label {
  font-size: 10px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.sidebar-stat-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-color);
}

/* Этапы */
.sidebar-steps {
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
}
.sidebar-steps-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sidebar-steps-title i { color: var(--primary-color); }
.sidebar-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 12px;
  color: var(--text-dark);
}
.sidebar-step .step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eff6ff;
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

/* Хинт менеджера */
.sidebar-hint {
  background: #fffbea;
  border-left: 3px solid #f59e0b;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 11px;
  color: #92400e;
  line-height: 1.5;
}
.sidebar-hint i {
  color: #f59e0b;
  margin-right: 6px;
}

