/* Design system */
:root {
    --nav-height: 68px;
    --nav-bg: #18202b;
    --accent-color: #c56555;

    --app-primary: #c56555;
    --app-primary-hover: #b45749;
    --app-primary-active: #a44d40;
    --app-primary-soft: #fff4f1;
    --app-primary-ring: rgba(197, 101, 85, 0.18);

    --app-bg: #f5f7fa;
    --app-surface: #ffffff;
    --app-surface-muted: #f8fafc;
    --app-surface-hover: #f9fafb;
    --app-text: #172033;
    --app-text-secondary: #64748b;
    --app-text-subtle: #94a3b8;
    --app-border: #e2e8f0;
    --app-border-strong: #cbd5e1;

    --app-success: #3f765f;
    --app-success-soft: #eef6f2;
    --app-warning: #8a672b;
    --app-warning-soft: #fbf6e9;
    --app-danger: #a94747;
    --app-danger-soft: #faeeee;
    --app-info: #476f9a;
    --app-info-soft: #eef3f8;
    --app-violet: #75639a;
    --app-violet-soft: #f2eff7;

    --app-radius-sm: 8px;
    --app-radius-md: 12px;
    --app-radius-lg: 16px;
    --app-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
    --app-shadow-card: 0 4px 16px rgba(15, 23, 42, 0.06);
    --app-shadow-overlay: 0 18px 45px rgba(15, 23, 42, 0.16);

    /* Compatibility with existing custom controls. */
    --f2-primary: var(--app-primary);
    --bs-primary: var(--app-primary);
    --bs-primary-rgb: 197, 101, 85;
    --bs-body-color: var(--app-text);
    --bs-body-bg: var(--app-bg);
    --bs-border-color: var(--app-border);
}

/* Base */
html,
body {
    height: 100%;
    margin: 0;
}

body.bg-light {
    background-color: var(--app-bg) !important;
}

body {
    color: var(--app-text);
    background-color: var(--app-bg);
    font-family: 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--app-info);
}

a:hover {
    color: #1d4ed8;
}

:focus-visible {
    outline: 3px solid var(--app-primary-ring);
    outline-offset: 2px;
}

/* Auth */
.bg-image {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.auth-card h1 {
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
}

/* Shared */
.card {
    margin-bottom: 2rem;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    box-shadow: var(--app-shadow-sm);
}

.card-header,
.modal-header,
.modal-footer {
    border-color: var(--app-border);
}

.modal-content {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    box-shadow: var(--app-shadow-overlay);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-height: 38px;
    padding: 0.45rem 0.9rem;
    font-weight: 650;
    line-height: 1.2;
    border-radius: 10px;
    box-shadow: none;
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

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

.btn:active {
    transform: translateY(0);
}

.btn-sm {
    min-height: 34px;
    padding: 0.35rem 0.7rem;
    font-size: 0.82rem;
    border-radius: var(--app-radius-sm);
}

.btn-lg {
    min-height: 44px;
    border-radius: var(--app-radius-md);
}

.btn > i {
    line-height: 1;
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--app-primary);
    --bs-btn-border-color: var(--app-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--app-primary-hover);
    --bs-btn-hover-border-color: var(--app-primary-hover);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--app-primary-active);
    --bs-btn-active-border-color: var(--app-primary-active);
    --bs-btn-focus-shadow-rgb: 197, 101, 85;
    color: #fff;
    background-color: var(--app-primary);
    border-color: var(--app-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    color: #fff;
    background-color: var(--app-primary-hover);
    border-color: var(--app-primary-hover);
}

.btn-primary:active,
.btn-primary.active {
    color: #fff;
    background-color: var(--app-primary-active);
    border-color: var(--app-primary-active);
}

.btn-outline-primary {
    --bs-btn-color: var(--app-primary);
    --bs-btn-border-color: #efaaa5;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--app-primary);
    --bs-btn-hover-border-color: var(--app-primary);
    --bs-btn-active-bg: var(--app-primary-active);
    --bs-btn-active-border-color: var(--app-primary-active);
    --bs-btn-focus-shadow-rgb: 197, 101, 85;
    color: var(--app-primary);
    border-color: #efaaa5;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: #fff;
    background-color: var(--app-primary);
    border-color: var(--app-primary);
}

.btn-dark {
    --bs-btn-bg: #263241;
    --bs-btn-border-color: #263241;
    --bs-btn-hover-bg: #172033;
    --bs-btn-hover-border-color: #172033;
    color: #fff;
    background-color: #263241;
    border-color: #263241;
}

.btn-dark:hover,
.btn-dark:focus {
    color: #fff;
    background-color: #172033;
    border-color: #172033;
}

.btn-outline-success {
    color: var(--app-success);
    border-color: #a9c9ba;
}

.btn-outline-success:hover,
.btn-outline-success:focus {
    color: #fff;
    background-color: var(--app-success);
    border-color: var(--app-success);
}

.btn-outline-warning {
    color: var(--app-warning);
    border-color: #d8c394;
}

.btn-outline-warning:hover,
.btn-outline-warning:focus {
    color: #fff;
    background-color: var(--app-warning);
    border-color: var(--app-warning);
}

.btn-outline-danger {
    color: var(--app-danger);
    border-color: #d9aaaa;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
    color: #fff;
    background-color: var(--app-danger);
    border-color: var(--app-danger);
}

/* Forms */
.form-control,
.form-select {
    min-height: 42px;
    color: var(--app-text);
    background-color: var(--app-surface);
    border-color: var(--app-border-strong);
    border-radius: 10px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.form-control-sm,
.form-select-sm {
    min-height: 38px;
    padding-top: 0.42rem;
    padding-bottom: 0.42rem;
    border-radius: var(--app-radius-sm);
}

.form-control:hover,
.form-select:hover {
    border-color: #aebccc;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 0.2rem var(--app-primary-ring);
}

.form-check-input:checked {
    background-color: var(--app-primary);
    border-color: var(--app-primary);
}

.form-label,
.filter-label,
.orders-form-label-sm {
    color: var(--app-text-secondary);
    font-size: 0.78rem;
    font-weight: 650;
}

/* Statuses */
.badge,
.app-status {
    font-weight: 700;
    letter-spacing: 0.01em;
}

.badge {
    border: 1px solid transparent;
}

.badge.bg-success {
    color: var(--app-success) !important;
    background-color: var(--app-success-soft) !important;
    border-color: #bfe8d8;
}

.badge.bg-warning {
    color: var(--app-warning) !important;
    background-color: var(--app-warning-soft) !important;
    border-color: #f3d695;
}

.badge.bg-danger {
    color: var(--app-danger) !important;
    background-color: var(--app-danger-soft) !important;
    border-color: #f3c2c2;
}

.badge.bg-info,
.badge.bg-primary {
    color: var(--app-info) !important;
    background-color: var(--app-info-soft) !important;
    border-color: #bfdbfe;
}

.badge.bg-secondary {
    color: #475569 !important;
    background-color: #f1f5f9 !important;
    border-color: var(--app-border);
}

.app-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 28px;
    padding: 0.35rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.75rem;
    line-height: 1;
}

.app-status-success {
    color: var(--app-success);
    background: var(--app-success-soft);
    border-color: #bfe8d8;
}

.app-status-warning {
    color: var(--app-warning);
    background: var(--app-warning-soft);
    border-color: #f3d695;
}

.app-status-danger {
    color: var(--app-danger);
    background: var(--app-danger-soft);
    border-color: #f3c2c2;
}

.app-status-info {
    color: var(--app-info);
    background: var(--app-info-soft);
    border-color: #bfdbfe;
}

.app-status-neutral {
    color: #475569;
    background: #f1f5f9;
    border-color: var(--app-border);
}

.app-status-violet {
    color: var(--app-violet);
    background: var(--app-violet-soft);
    border-color: #d8ceff;
}

.bg-primary {
    background-color: var(--app-primary) !important;
}

.text-primary {
    color: var(--app-primary) !important;
}

.order-row:hover {
    cursor: pointer;
    background-color: #f8f9fa;
}

.app-page {
    padding: 1.5rem 1.5rem 2rem;
}

.app-page.container-fluid,
.app-page.container {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header-main {
    min-width: 0;
}

.page-title {
    margin: 0;
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.page-subtitle {
    margin-top: 0.35rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.page-actions {
    display: flex;
    align-items: end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-card {
    padding: 1rem;
    margin-bottom: 1.5rem;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    box-shadow: var(--app-shadow-sm);
}

.filter-label,
.orders-form-label-sm,
.prices-page .prices-filter-panel label.small {
    display: block;
    margin-bottom: 0.25rem;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
}

.data-table-card {
    overflow: hidden;
    margin-bottom: 1rem;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    box-shadow: var(--app-shadow-card);
}

.data-table-card .table-responsive {
    border-radius: inherit;
}

.data-table {
    margin-bottom: 0;
}

.data-table thead {
    background: #f8fafc;
}

.data-table thead th {
    padding: 0.95rem 1rem;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom-color: #e5e7eb;
}

.data-table tbody td {
    padding: 0.95rem 1rem;
    vertical-align: middle;
    color: #334155;
    font-size: 0.875rem;
    border-bottom-color: #eef2f7;
}

.data-table tbody tr:hover {
    background: #fbfdff;
}

.data-table tbody td .small {
    font-size: 0.78rem;
}

.data-table .btn-group .btn,
.data-table td .btn.btn-sm {
    border-radius: 999px;
}

.table-action-group {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    flex-wrap: nowrap;
}

.table-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border-radius: 999px;
}

.table-primary-text {
    color: #0f4c81;
}

.table-muted-line {
    color: #64748b;
    font-size: 0.78rem;
}

.table-status-text {
    font-size: 0.8rem;
    font-weight: 700;
}

.data-table-status-select {
    max-width: 180px;
}

.status-badge-sm {
    font-size: 0.7rem;
}

.text-truncate-150 {
    max-width: 150px;
}

.help-text-xs {
    display: none;
    font-size: 0.7rem;
}

.brand-accent {
    color: var(--accent-color);
}

.is-hidden-initial {
    display: none;
}

.sticky-offset-20 {
    top: 20px;
}

.comment-textarea-clean {
    resize: none;
    box-shadow: none;
}

.section-title-no-margin {
    margin-top: 0;
}

.thumb-placeholder-sm {
    height: 50px;
}

.option-caption-xs {
    font-size: 0.65rem;
    font-weight: 700;
}

.form-text-xs {
    font-size: 0.65rem;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.75rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.table-v-align td {
    vertical-align: middle;
}

.status-dot-xs {
    font-size: 0.5rem;
}

/* Menu */
#top-navigation {
    top: 0;
    left: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: var(--nav-height);
    background: var(--nav-bg);
}

.nav-container {
    width: 100%;
    padding: 0 20px;
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    width: 100%;
    min-height: var(--nav-height);
}

.nav-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
}

.nav-mobile-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.brand-cluster {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.brand-logo-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.brand-logo-link:hover,
.brand-logo-link:focus {
    color: inherit;
    text-decoration: none;
}

.top-nav-collapse {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.top-nav-collapse.collapse {
    display: flex;
}

.nav-menu {
    align-items: center;
    flex-wrap: nowrap;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.top-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    transition: 0.2s ease;
}

.top-nav-toggle:hover,
.top-nav-toggle:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
}

.top-nav-toggle i {
    font-size: 1.5rem;
    line-height: 1;
}

#top-navigation .nav-link {
    display: flex;
    align-items: center;
    height: var(--nav-height);
    padding: 0 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

#top-navigation .nav-link span {
    font-size: 1rem;
}

#top-navigation .nav-link i {
    font-size: 1.02rem;
}

#top-navigation .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

#top-navigation .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-bottom-color: var(--accent-color);
}

.brand-logo {
    margin-right: 30px;
    white-space: nowrap;
}

.brand-logo h4 {
    font-size: 1.28rem;
}

.brand-logo-link .brand-logo {
    margin-right: 0;
}

.brand-orders-shortcut {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    text-decoration: none;
    transition: 0.2s ease;
}

.brand-orders-shortcut:hover,
.brand-orders-shortcut:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
    text-decoration: none;
}

.brand-orders-shortcut.active {
    color: #fff;
    background: rgba(220, 42, 28, 0.18);
    border-color: rgba(220, 42, 28, 0.6);
    box-shadow: 0 0 0 2px rgba(220, 42, 28, 0.16);
}

.brand-orders-shortcut i {
    font-size: 1rem;
    line-height: 1;
}

.nav-logout-btn {
    white-space: nowrap;
    font-size: 0.92rem;
    font-weight: 600;
}

/* Dashboard */
.status-select {
    padding: 2px 5px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    color: #334155;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.status-select:focus {
    box-shadow: 0 0 0 0.18rem rgba(148, 163, 184, 0.18);
}

.status-select option {
    color: #1f2937;
    background-color: #ffffff;
}

/* New Order */
.form-label-bold {
    display: block;
    margin-bottom: 10px;
    color: #666;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-custom {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.btn-option {
    padding: 12px 18px;
    color: #444;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    border: 2px solid #eee;
    border-radius: 10px;
}

.btn-check:checked + .btn-option {
    color: var(--f2-primary);
    background-color: rgba(13, 110, 253, 0.05);
    border-color: var(--f2-primary);
}

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

#photo-preview-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 220px;
    overflow: hidden;
    background: #fff;
    border: 2px dashed #cbd5e0;
    border-radius: 15px;
}

#photo-preview-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.price-box {
    padding: 25px;
    border-radius: 15px;
}

/* All Orders Legacy */
.table-card {
    overflow: hidden;
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Prices */
.price-input {
    max-width: 100px;
    font-weight: 700;
    text-align: right;
    border-color: #e0e0e0;
}

.nav-pills .nav-link {
    color: #6c757d;
    font-weight: 600;
}

.nav-pills .nav-link.active {
    background: #212529;
}

.prices-page .hidden,
.prices-page .product-section.hidden {
    display: none !important;
}

.prices-page .product-section {
    margin-bottom: 30px;
}

.prices-page .prices-filter-panel {
    padding: 1rem;
    margin-bottom: 1.5rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.prices-page .prices-section-hdr {
    padding: 12px;
    color: #495057;
    font-weight: 700;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.prices-page .prices-surcharge-header {
    padding: 12px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.prices-page .prices-table-wrap {
    overflow: hidden;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0 0 8px 8px;
}

.prices-page .prices-card {
    overflow: hidden;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.prices-page .prices-table thead th {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #f8fafc;
    border-bottom-width: 1px;
}

.prices-page .prices-table tbody td {
    vertical-align: middle;
}

/* Dealers */
.thumb-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Orders */
.orders-filter-card {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
}

.orders-filter-heading {
    display: none;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    padding: 0;
    color: var(--app-text);
    background: transparent;
    border: 0;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: left;
}

.orders-filter-heading i:last-child {
    color: var(--app-text-secondary);
    transition: transform 0.2s ease;
}

.orders-filter-card.is-open .orders-filter-heading i:last-child {
    transform: rotate(180deg);
}

.orders-retoucher-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0.28rem 0.55rem;
    margin-bottom: 0.35rem;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
}

.orders-retoucher-badge.is-assigned {
    color: var(--app-info);
    background: var(--app-info-soft);
    border-color: #bfdbfe;
}

.orders-dealer-combobox {
    position: relative;
}

.orders-dealer-search-input {
    padding-right: 38px;
}

.orders-dealer-search-icon {
    position: absolute;
    top: 50%;
    right: 12px;
    color: var(--app-text-subtle);
    pointer-events: none;
    transform: translateY(-50%);
}

.orders-dealer-search-list {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 50;
    display: none;
    max-height: 280px;
    padding: 8px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    box-shadow: var(--app-shadow-overlay);
}

.orders-dealer-search-list.is-open {
    display: block;
}

.orders-dealer-search-option {
    width: 100%;
    padding: 8px 10px;
    color: var(--app-text);
    background: var(--app-surface);
    border: 0;
    border-radius: var(--app-radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    text-align: left;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.orders-dealer-search-option:hover,
.orders-dealer-search-option.is-active {
    color: var(--app-primary);
    background: var(--app-primary-soft);
}

.orders-dealer-search-empty {
    padding: 8px 10px;
    color: var(--app-text-secondary);
    font-size: 0.82rem;
}

.orders-table-img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
}

.orders-file-badge {
    width: 45px;
    height: 45px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    background: linear-gradient(180deg, var(--app-surface-muted) 0%, #eef2f7 100%);
    color: #475569;
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.orders-file-badge i {
    font-size: 0.9rem;
}

.orders-form-label-sm {
    margin-bottom: 3px;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
}

.orders-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.orders-registry-row {
    transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.orders-registry-row > td {
    transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.orders-registry-row:hover {
    background: var(--app-surface-hover);
}

@media (min-width: 768px) {
    .orders-table tbody tr.orders-registry-row:hover > td {
        --bs-table-accent-bg: transparent;
        background-color: var(--app-surface-hover);
        box-shadow: none;
    }

    .orders-table tbody tr.orders-registry-row:hover > td:first-child {
        box-shadow: inset 3px 0 0 var(--app-primary);
    }
}

.orders-registry-row td:first-child {
    box-shadow: inset 3px 0 0 transparent;
}

.orders-registry-row:hover td:first-child {
    box-shadow: inset 3px 0 0 var(--app-primary);
}

.orders-registry-row[data-order-url] {
    cursor: pointer;
}

.orders-pagination .page-link {
    min-width: 34px;
    margin: 0 2px;
    color: var(--app-text);
    border: 1px solid transparent;
    border-radius: var(--app-radius-sm);
    text-align: center;
}

.orders-pagination .page-item.active .page-link {
    color: #fff;
    background-color: var(--app-primary);
    border-color: var(--app-primary);
}

.orders-shipped-date {
    color: var(--app-success);
    font-size: 0.75rem;
    font-weight: 700;
}

.orders-page option[value="8"] {
    color: #5b3cc4;
    font-weight: bold;
    background-color: var(--app-violet-soft);
}

.orders-status-select {
    width: 170px;
    color: #475569;
    background-color: var(--app-surface-muted);
    border-color: var(--app-border-strong);
}

.orders-filter-form .form-control,
.orders-filter-form .form-select {
    min-height: 38px;
}

.orders-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1px;
    margin-top: 1rem;
    overflow: hidden;
    background: var(--app-border);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    box-shadow: var(--app-shadow-sm);
}

.orders-summary-item {
    min-width: 0;
    padding: 1rem 1.1rem;
    background: var(--app-surface);
}

.orders-summary-label {
    margin-bottom: 0.25rem;
    color: var(--app-text-secondary);
    font-size: 0.75rem;
}

.orders-summary-value {
    overflow: hidden;
    color: var(--app-text);
    font-size: 1.05rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-view-page {
    background-color: #f8fafc;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.order-view-card {
    padding: 20px;
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.order-view-chat-card {
    background: #fcfcfd;
}

.order-view-section-header {
    display: block;
    padding-bottom: 5px;
    margin-bottom: 15px;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #f1f5f9;
}

.order-view-spec-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #f8fafc;
    gap: 0.75rem;
}

.order-view-spec-item-stack {
    flex-direction: column;
    align-items: flex-start;
}

.order-view-personal-row {
    padding: 8px 20px;
    margin: 2px -20px;
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
}

.order-view-chat {
    height: 320px;
    padding: 12px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
}

.order-view-bubble {
    max-width: 82%;
    padding: 8px 10px;
    margin-bottom: 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.88rem;
    line-height: 1.4;
}

.order-view-bubble-me {
    margin-left: auto;
    background: #dcfce7;
    border-color: #bbf7d0;
}

.order-view-bubble-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.2;
}

.order-view-img-preview {
    width: 100%;
    height: 130px;
    cursor: pointer;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.order-view-history-item {
    position: relative;
    padding-left: 20px;
    margin-bottom: 15px;
    font-size: 0.8rem;
    border-left: 2px solid #cbd5e1;
}

.order-view-history-item::before {
    content: '';
    position: absolute;
    top: 4px;
    left: -6px;
    width: 10px;
    height: 10px;
    background: #3b82f6;
    border-radius: 50%;
}

.order-view-inline-edit-row {
    padding: 6px 0;
    border-bottom: 1px solid #eef2f7;
}

.order-view-inline-edit-trigger {
    padding: 6px 8px;
    margin: 0 -8px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.order-view-inline-edit-trigger:hover {
    background-color: #eef6ff;
}

.order-view-inline-edit-hint {
    color: #64748b;
    font-size: 0.7rem;
}

.order-view-inline-edit-panel {
    display: none;
    padding-top: 8px;
}

.order-view-inline-edit-panel.is-open {
    display: block;
}

/* Responsive */
@media (max-width: 992px) {
    #top-navigation .nav-container {
        padding: 0 12px !important;
    }

    #top-navigation .nav-shell {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        padding: 8px 0;
    }

    #top-navigation .nav-brand-row {
        min-height: 52px;
        height: 52px;
        width: 100%;
    }

    #top-navigation .brand-logo {
        margin-right: 0;
    }

    #top-navigation .brand-logo h4 {
        font-size: 1.6rem !important;
        line-height: 1 !important;
        margin: 0 !important;
    }

    #top-navigation .brand-cluster {
        max-width: calc(100% - 56px);
        min-height: 52px;
        align-items: center;
    }

    #top-navigation .nav-mobile-actions {
        display: flex;
        align-items: center;
        gap: 0.65rem;
    }

    #top-navigation .top-nav-toggle {
        display: inline-flex;
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
    }

    #top-navigation .top-nav-collapse {
        display: block;
        width: 100%;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    #top-navigation .top-nav-collapse:not(.show) {
        display: none;
    }

    #top-navigation .brand-orders-shortcut {
        display: inline-flex;
    }

    #top-navigation .nav-menu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        width: 100%;
        margin-bottom: 12px;
    }

    #top-navigation .nav-menu .nav-item {
        width: 100%;
    }

    #top-navigation .nav-link {
        height: auto;
        min-height: 48px;
        width: 100%;
        padding: 10px 12px;
        border-bottom: none;
        border-radius: 12px;
    }

    #top-navigation .nav-link.active {
        border-bottom-color: transparent;
    }

    #top-navigation .nav-actions {
        display: block;
        width: 100%;
    }

    #top-navigation .nav-logout-btn {
        display: inline-flex;
        width: 100%;
        justify-content: center;
        min-height: 48px;
        padding-top: 10px;
        padding-bottom: 10px;
        border-radius: 12px;
    }

    .app-page,
    .container-fluid.py-4.px-4 {
        padding: 0.75rem 0.75rem 2rem !important;
    }

    .app-page.container-fluid,
    .app-page.container,
    .order-view-page .container-fluid.py-4.px-4,
    .orders-page .container-fluid.app-page,
    .prices-page .container-fluid.app-page,
    .container-fluid.app-page {
        padding-top: 0.75rem !important;
        padding-right: 0.75rem !important;
        padding-left: 0.75rem !important;
        padding-bottom: 2rem !important;
    }

    .page-header {
        margin-bottom: 1rem;
    }

    .orders-filter-form {
        row-gap: 0.75rem !important;
    }

    .orders-filter-col {
        flex: 0 0 50%;
        width: 50%;
    }

    .orders-filter-actions {
        flex: 0 0 100%;
        width: 100%;
        margin-top: 0.25rem;
    }

    .orders-filter-actions .btn {
        min-height: 42px;
    }

    .orders-page .orders-pagination {
        flex-wrap: wrap;
        row-gap: 0.35rem;
    }
}

@media (max-width: 767.98px) {
    .page-header {
        align-items: flex-start;
    }

    .page-actions .btn {
        min-height: 44px;
    }

    .orders-filter-card {
        padding: 0.35rem 0.9rem;
    }

    .orders-filter-heading {
        display: flex;
    }

    .orders-filter-card:not(.is-open) .orders-filter-form {
        display: none;
    }

    .orders-filter-card.is-open {
        padding-bottom: 0.9rem;
    }

    .orders-filter-form {
        padding-top: 0.4rem;
        border-top: 1px solid var(--app-border);
    }

    .orders-filter-col {
        flex: 0 0 50%;
        width: 50%;
    }

    .orders-filter-actions .btn {
        flex: 1 1 auto;
        min-height: 44px;
    }

    .orders-table-card {
        overflow: visible;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .orders-table-card .table-responsive {
        overflow: visible;
    }

    .orders-table {
        display: block;
    }

    .orders-table thead {
        display: none;
    }

    .orders-table tbody {
        display: grid;
        gap: 0.75rem;
    }

    .orders-table tbody tr.orders-empty-row {
        display: block;
        overflow: hidden;
        background: var(--app-surface);
        border: 1px solid var(--app-border);
        border-radius: var(--app-radius-md);
    }

    .orders-table tbody tr.orders-empty-row td {
        display: block;
        border: 0;
    }

    .orders-table tbody tr.orders-row-mobile-card {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
        overflow: hidden;
        background: var(--app-surface);
        border: 1px solid var(--app-border);
        border-radius: var(--app-radius-md);
        box-shadow: var(--app-shadow-sm);
    }

    .orders-table tbody tr.orders-row-mobile-card:hover {
        background: var(--app-surface);
        border-color: var(--app-border-strong);
        box-shadow: var(--app-shadow-card);
    }

    .orders-table tbody tr.orders-row-mobile-card td {
        display: block;
        min-width: 0;
        padding: 0.7rem 0.85rem;
        white-space: normal;
        border: 0;
        border-bottom: 1px solid #f1f5f9;
    }

    .orders-table tbody tr.orders-row-mobile-card td::before {
        display: block;
        margin-bottom: 0.25rem;
        color: var(--app-text-subtle);
        content: attr(data-label);
        font-size: 0.66rem;
        font-weight: 750;
        letter-spacing: 0.04em;
        line-height: 1.2;
        text-transform: uppercase;
    }

    .orders-table tbody tr.orders-row-mobile-card td:nth-child(3),
    .orders-table tbody tr.orders-row-mobile-card td:nth-child(4) {
        grid-column: 1 / -1;
    }

    .orders-table tbody tr.orders-row-mobile-card td:last-child {
        grid-column: 1 / -1;
        padding: 0.65rem 0.85rem 0.85rem;
        text-align: left !important;
        border-bottom: 0;
    }

    .orders-table tbody tr.orders-row-mobile-card td:first-child,
    .orders-table tbody tr.orders-row-mobile-card:hover td:first-child {
        box-shadow: inset 3px 0 0 var(--app-primary);
    }

    .orders-table .orders-status-select {
        width: 100%;
        max-width: none;
        min-height: 42px;
    }

    .orders-table tbody tr.orders-row-mobile-card td:last-child .btn {
        width: 100%;
        min-height: 42px;
    }

    .orders-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .orders-summary-value {
        white-space: normal;
    }
}

@media (max-width: 576px) {
    .orders-filter-col {
        flex: 0 0 100%;
        width: 100%;
    }

    .orders-summary {
        grid-template-columns: 1fr;
    }

    #top-navigation .brand-logo h4 {
        font-size: 1.45rem !important;
    }

    #top-navigation .brand-orders-shortcut {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        border-radius: 12px !important;
    }

    #top-navigation .nav-link span {
        display: inline;
    }

    #top-navigation .nav-link i {
        margin-right: 0.5rem !important;
        font-size: 1.02rem;
    }

    #top-navigation .top-nav-toggle {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
    }
}
