:root {
    --primary: #0f4c5c;
    --primary-dark: #0d4351;
    --primary-darker: #0a3844;
    --primary-light: #c5dde2;
    --primary-lighter: #e8f2f4;
    --accent: #5c1f0f;
    --accent-hover: #521b0d;
    --bs-primary: #0f4c5c;
    --bs-primary-rgb: 15, 76, 92;
    --bs-body-bg: #f8fafc;
    --bs-body-color: #1e293b;
    --bs-border-radius: 0.5rem;
    --bs-border-radius-lg: 0.75rem;
}

body {
    font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.container-custom{
    max-width: 1600px;
}
.text-primary-light {
    color: var(--primary-light) !important;
}

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

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

.text-accent:hover {
    color: var(--accent-hover) !important;
}

.textile-pattern {
    background-size: 20px 20px;
    background-position: 0 0, 10px 0, 10px -10px, 0 10px;
}

.brand-panel {
    background: linear-gradient(135deg, rgba(13, 67, 81, 0.9) 0%, var(--primary) 50%, var(--primary-darker) 100%);
    position: relative;
    overflow: hidden;
}

.brand-panel__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(64px);
    pointer-events: none;
}

.brand-panel__orb--accent {
    width: 24rem;
    height: 24rem;
    bottom: -6rem;
    right: -6rem;
    background-color: rgba(92, 31, 15, 0.2);
}

.brand-panel__orb--primary {
    width: 16rem;
    height: 16rem;
    top: -3rem;
    left: -3rem;
    background-color: rgba(79, 146, 159, 0.1);
}

.brand-panel__logo {
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--bs-border-radius-lg);
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
}

.brand-panel__logo img{
    width: 2rem;
    height: 2rem;
}

.brand-panel__stat-card {
    border-radius: var(--bs-border-radius-lg);
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    padding: 1rem;
}

.form-control-icon {
    padding-left: 2.75rem;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 0.875rem;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    z-index: 5;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(15, 76, 92, 0.2);
}

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

.form-check-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(15, 76, 92, 0.2);
}

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

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

.btn-primary:active {
    background-color: var(--primary-darker) !important;
    border-color: var(--primary-darker) !important;
}

.status-dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    display: inline-block;
}

.status-dot--success {
    background-color: #10b981;
}

.status-dot--primary {
    background-color: #4d929f;
}

.mobile-logo {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--bs-border-radius);
    background-color: var(--primary);
}

.app-header {
    background-color: #fff;
    border-bottom: 1px solid #eef2f6;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.app-navbar {
    min-height: 42px;
    padding: 0 10px;
}

.app-navbar__container {
    min-height: 42px;
    max-width: 1180px;
    padding-left: 1rem;
    padding-right: 1rem;
}

.app-navbar__brand {
    align-items: center;
    color: #334155;
    display: inline-flex;
    font-size: 1rem;
    font-weight: 500;
    gap: 0.45rem;
    margin-right: 1rem;
    padding: 0;
    white-space: nowrap;
}

.app-navbar__brand:hover {
    color: var(--primary);
}

.app-navbar__logo {
    align-items: center;
    background-color: #22c55e;
    border-radius: 0.125rem;
    color: #fff;
    display: inline-flex;
    height: 1.4rem;
    justify-content: center;
    width: 1.4rem;
}

.app-navbar__title {
    line-height: 1;
}

.app-navbar__nav {
    align-items: center;
    gap: 0.35rem;
}

.app-navbar__link {
    align-items: center;
    border-radius: 0.5rem;
    color: #64748b;
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 500;
    gap: 0.35rem;
    line-height: 1;
    padding: 0.45rem 0.75rem !important;
    transition: color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.app-navbar__link:hover {
    background-color: rgba(15, 76, 92, 0.06);
    color: var(--primary);
}

.app-navbar__link.active {
    background-color: var(--primary-lighter);
    box-shadow: inset 0 0 0 1px rgba(15, 76, 92, 0.14);
    color: var(--primary);
    font-weight: 600;
}

.app-navbar__icon {
    align-items: center;
    color: currentColor;
    display: inline-flex;
    flex-shrink: 0;
    justify-content: center;
}

.app-navbar__toggler {
    border: 0;
    padding: 0.25rem 0;
}

.app-navbar__toggler:focus {
    box-shadow: none;
}

.container-custom {
    width: 100%;
    padding-right: 0 !important;
    padding-left: 0 !important;
    margin-right: auto;
    margin-left: auto;
}

@media (max-width: 991.98px) {
    .app-navbar {
        min-height: 50px;
    }

    .app-navbar__container {
        min-height: 50px;
    }

    .app-navbar__collapse {
        border-top: 1px solid #eef2f6;
        margin-top: 0.45rem;
        padding: 0.5rem 0 0.75rem;
    }

    .app-navbar__nav {
        align-items: stretch;
        gap: 0.1rem;
    }

    .app-navbar__link {
        border-radius: 0.5rem;
        font-size: 0.875rem;
        padding: 0.7rem 0.85rem !important;
        width: 100%;
    }

    .app-navbar__link:hover {
        background-color: rgba(15, 76, 92, 0.06);
        color: var(--primary);
    }

    .app-navbar__link.active {
        background-color: var(--primary-lighter);
        box-shadow: inset 3px 0 0 var(--primary);
        color: var(--primary);
        font-weight: 600;
    }
}

@media (min-width: 1024px) and (max-width: 1159px) {
    .container-custom {
        max-width: 1150px !important;
    }
}

@media (min-width: 1024px) and (max-width: 1439px) {
    .container-custom {
        max-width: 1280px !important;
    }
}

@media (min-width: 1440px) and (max-width: 1659px) {
    .container-custom {
        max-width: 1400px !important;
    }
}

@media (min-width: 1651px) {
    .container-custom {
        max-width: 1600px !important;
    }
}

/* ── Order List Page ── */

.order-page {
    font-size: 0.875rem;
}

.order-filters .card-body {
    background: #fff;
}

.order-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.order-filter-label {
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    margin: 0;
    text-transform: uppercase;
}

.order-filter-select {
    border-color: #e2e8f0;
    border-radius: 0.375rem;
    color: #334155;
    font-size: 0.8rem;
    min-width: 7.5rem;
    padding: 0.25rem 1.75rem 0.25rem 0.5rem;
}

.order-filter-check-label {
    color: #475569;
    font-size: 0.8rem;
}

.order-btn-new {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    white-space: nowrap;
}

.order-btn-new__icon {
    font-size: 1rem;
    font-weight: 700;
    margin-right: 0.15rem;
}

.order-card {
    border-radius: 0.625rem !important;
    overflow: hidden;
}

.order-card__id {
    font-size: 0.85rem;
    margin-bottom: 0.1rem;
}

.order-card__title {
    color: #0f172a;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}

.order-workflow__arrow {
    color: #666666;
    display: inline-flex;
}

.order-workflow__step {
    align-items: center;
    background: #f1f5f9;
    border-radius: 999px;
    color: #777777;
    display: inline-flex;
    font-size: 0.88rem;
    font-weight: 500;
    gap: 0.2rem;
    padding: 0.2rem 0.55rem;
    white-space: nowrap;
}

.order-workflow__step--completed {
    background: #e8f5f0;
    color: #0f766e;
}

.order-workflow__step--active {
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 600;
}

.order-workflow__check {
    flex-shrink: 0;
}

.order-card__info,
.order-card__portions,
.order-card__costs {
    background: #fff;
}

.order-card__info {
    border-color: #f1f5f9 !important;
}

.order-card__portions {
    border-color: #f1f5f9 !important;
}

.order-stat {
    margin-bottom: 0.85rem;
}

.order-stat__label {
    color: #888888;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 0.1rem;
}

.order-stat__value {
    color: #1e293b;
    font-size: 0.85rem;
    font-weight: 600;
}

.order-portions-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.order-alert {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 0.5rem;
    color: #92400e;
    font-size: 0.8rem;
    margin-bottom: 0.75rem !important;
}

.order-portion__stage {
    color: #0f172a;
    font-size: 0.85rem;
}

.order-portion__sub {
    font-size: 0.75rem;
}

.order-fabric-table {
    font-size: 0.78rem;
}

.order-fabric-table__head {
    font-size: 0.78rem;
    margin-bottom: 0.15rem;
}

.order-fabric-table__row {
    font-weight: 500;
}

.order-badge {
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.15rem 0.55rem;
    white-space: nowrap;
}

.order-badge--info {
    background: #e0f2fe;
    color: #0369a1;
}

.order-badge--success {
    background: #dcfce7;
    color: #15803d;
}

.order-cost-item {
    margin-bottom: 0.75rem;
}

.order-cost-item__label {
    color: #888888;
    font-size: 0.78rem;
    font-weight: 500;
    margin-bottom: 0.1rem;
}

.order-cost-item__value {
    color: #1e293b;
    font-size: 0.85rem;
    font-weight: 600;
}

.order-cost-warning {
    font-size: 0.75rem !important;
}

.order-card__footer {
    background: #fafbfc;
    border-color: #f1f5f9 !important;
}

.order-btn-outline {
    border-color: var(--primary);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.3rem 0.65rem;
}

.order-btn-outline:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.order-btn-primary {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
}

.order-btn-primary svg {
    vertical-align: -2px;
}

.order-stat-card {
    border-radius: 0.625rem !important;
}

.order-stat-card__value {
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
}

.order-stat-card__value--warning {
    color: #d97706;
}

.order-stat-card__value--danger {
    color: #dc2626;
}

.order-stat-card__label {
    color: #444444;
    font-size: 0.82rem;
    margin-top: 0.15rem;
}

.order-widget {
    border-radius: 0.625rem !important;
}

.order-widget__title {
    color: #0f172a;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.order-progress {
    background: #e2e8f0;
    border-radius: 999px;
    height: 6px;
    overflow: hidden;
}

.order-progress__bar {
    background: var(--primary);
    border-radius: 999px;
    height: 100%;
    transition: width 0.3s ease;
}

.order-widget-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.order-widget-item {
    padding-bottom: 0.75rem;
}

.order-widget-item:not(:last-child) {
    border-bottom: 1px solid #f1f5f9;
}

.order-widget-item__id {
    color: #0f172a;
    font-size: 0.8rem;
}

.order-widget-item__meta {
    line-height: 1.4;
}

.order-delay-badge {
    background: #fef2f2;
    border-radius: 999px;
    color: #dc2626;
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    white-space: nowrap;
}

.order-link-btn {
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
}

.order-link-btn:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.previous-orders-title {
    color: #111827;
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
}

.previous-order-filters .order-filter-select {
    min-width: 9rem;
}

.previous-search {
    min-width: 15rem;
}

.previous-search__wrap {
    position: relative;
}

.previous-search__icon {
    color: #64748b;
    left: 0.65rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.previous-search__input {
    border-color: #e2e8f0;
    border-radius: 0.375rem;
    color: #334155;
    font-size: 0.8rem;
    padding-left: 2rem;
}

.previous-order-card .order-card__title {
    color: var(--primary);
}

.previous-complete-badge {
    align-items: center;
    background: #edf7e8;
    border-radius: 999px;
    color: #4d7c0f;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 600;
    gap: 0.25rem;
    padding: 0.18rem 0.55rem;
}

.previous-completed-portion {
    background: #edf7e8;
    border: 1px solid #95c37c;
    border-radius: 0.45rem;
    padding: 0.75rem;
}

.previous-completed-portion__label {
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
}

.previous-summary-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.previous-summary-list div {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.previous-summary-list span {
    color: #64748b;
    font-size: 0.78rem;
}

.previous-summary-list strong {
    color: #0f172a;
    font-size: 0.82rem;
}

.previous-design-list {
    display: flex;
    flex-direction: column;
    gap: 0.72rem;
}

.previous-design-item {
    display: grid;
    gap: 0.35rem;
}

.previous-design-item strong {
    color: #0f172a;
    font-size: 0.82rem;
}

.previous-design-item span {
    color: #64748b;
    font-size: 0.72rem;
}

.previous-design-progress {
    background: #e5e7eb;
    border-radius: 999px;
    height: 4px;
    overflow: hidden;
}

.previous-design-progress div {
    background: #3b82c4;
    border-radius: inherit;
    height: 100%;
}

@media (max-width: 767.98px) {
    .order-card__info,
    .order-card__portions {
        border-right: 0 !important;
        border-bottom: 1px solid #f1f5f9 !important;
    }

    .order-workflow {
        width: 100%;
    }

    .order-card__actions {
        width: 100%;
        justify-content: flex-end;
    }
}
