/**
 * User Panel — Tailwind Custom Styles
 * Only styles that cannot be expressed with Tailwind utility classes
 */

/* Enforce single source of truth font family & prevent horizontal scroll */
html, body, .font-sans {
    font-family: var(--theme-font-family) !important;
}
html, body {
    overflow-x: hidden;
}

/* Prevent transition flash on page navigation */
body.no-transition,
body.no-transition *,
body.no-transition *::before,
body.no-transition *::after {
    transition: none !important;
}

/* ══════════════════════════════════════════════════════════════════════
   Canonical Brand Utility Bridge (Centralization Remediation)
   Binds static Tailwind brand utility classes directly to canonical
   theme tokens defined in theme-tokens.css so that color changes
   cascade across all client pages without modifying individual views.
   ══════════════════════════════════════════════════════════════════════ */
.btn-primary {
    background-color: var(--theme-primary) !important;
    color: var(--theme-primary-text, #ffffff) !important;
}
.btn-primary:hover {
    background-color: var(--theme-primary-hover) !important;
    color: var(--theme-primary-text, #ffffff) !important;
}
.btn-primary:focus-visible {
    outline: 2px solid var(--theme-primary) !important;
    outline-offset: 2px !important;
}
.btn-primary:disabled,
.btn-primary[disabled] {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Secondary Button (Neutral / Surface Action) */
.btn-secondary {
    background-color: var(--theme-card-bg) !important;
    border: 1px solid var(--theme-border) !important;
    color: var(--theme-text) !important;
    transition: all 150ms ease;
}
.btn-secondary:hover {
    background-color: var(--theme-card-hover) !important;
    border-color: var(--theme-border-strong) !important;
    color: var(--theme-text) !important;
}
.btn-secondary:focus-visible {
    outline: 2px solid var(--theme-primary) !important;
    outline-offset: 2px !important;
}
.btn-secondary:disabled,
.btn-secondary[disabled] {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Danger Button (Destructive / Caution Action) */
.btn-danger {
    background-color: var(--theme-danger) !important;
    border: 1px solid transparent !important;
    color: #ffffff !important;
    transition: all 150ms ease;
}
.btn-danger:hover {
    background-color: #B91C1C !important;
    color: #ffffff !important;
}
.dark .btn-danger:hover {
    background-color: #EF4444 !important;
    color: #ffffff !important;
}
.btn-danger:focus-visible {
    outline: 2px solid var(--theme-danger) !important;
    outline-offset: 2px !important;
}

.bg-brand-600 {
    background-color: var(--theme-primary) !important;
}
.hover\:bg-brand-700:hover {
    background-color: var(--theme-primary-hover) !important;
}
.text-brand-600 {
    color: var(--theme-primary) !important;
}
.dark .dark\:text-brand-400,
.dark .text-brand-400 {
    color: var(--theme-primary) !important;
}
.border-brand-500,
.border-brand-600 {
    border-color: var(--theme-primary) !important;
}
.bg-brand-50,
.bg-brand-100 {
    background-color: var(--theme-primary-badge-bg) !important;
}
.border-brand-100,
.border-brand-200 {
    border-color: var(--theme-primary-badge-border) !important;
}

/* Sidebar transitions & surface (Single Source of Truth) */
.user-sidebar {
    background-color: var(--theme-card-bg, #FFFFFF) !important;
    border-right: 1px solid var(--theme-border, #E2E8F0) !important;
    transition: width 250ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.dark .user-sidebar {
    background-color: var(--theme-card-bg, #111827) !important;
    border-right-color: var(--theme-border, #1E293B) !important;
}
[dir="rtl"] .user-sidebar {
    border-right: none !important;
    border-left: 1px solid var(--theme-border, #E2E8F0) !important;
}
[dir="rtl"].dark .user-sidebar,
[dir="rtl"] .dark .user-sidebar {
    border-left-color: var(--theme-border, #1E293B) !important;
}

/* Sidebar Header & Brand */
.sidebar-header {
    border-bottom: 1px solid var(--theme-border-subtle, #F1F5F9) !important;
}
.dark .sidebar-header {
    border-bottom-color: var(--theme-border-subtle, #1E293B) !important;
}
.sidebar-brand {
    color: var(--theme-text, #0F172A) !important;
}
.dark .sidebar-brand {
    color: var(--theme-text, #F8FAFC) !important;
}
.sidebar-brand-icon {
    background-color: rgba(var(--theme-primary-rgb, 79, 70, 229), 0.1) !important;
    color: var(--theme-primary, #4F46E5) !important;
}
.dark .sidebar-brand-icon {
    background-color: var(--theme-primary-badge-bg) !important;
    color: var(--theme-primary) !important;
}

/* Sidebar Controls */
.sidebar-collapse-btn,
#sidebarClose {
    color: var(--theme-text-muted, #64748B) !important;
    transition: background-color 150ms ease, color 150ms ease;
}
.sidebar-collapse-btn:hover,
#sidebarClose:hover {
    background-color: var(--theme-card-hover, #F1F5F9) !important;
    color: var(--theme-text, #0F172A) !important;
}
.dark .sidebar-collapse-btn,
.dark #sidebarClose {
    color: var(--theme-text-muted, #94A3B8) !important;
}
.dark .sidebar-collapse-btn:hover,
.dark #sidebarClose:hover {
    background-color: var(--theme-card-hover, #1E293B) !important;
    color: var(--theme-text, #F8FAFC) !important;
}

/* Sidebar Footer */
.sidebar-footer {
    border-top: 1px solid var(--theme-border-subtle, #F1F5F9) !important;
}
.dark .sidebar-footer {
    border-top-color: var(--theme-border-subtle, #1E293B) !important;
}
.sidebar-login-btn {
    background-color: var(--theme-primary, #4F46E5) !important;
    color: #FFFFFF !important;
    box-shadow: 0 1px 2px 0 rgba(79, 70, 229, 0.3) !important;
}
.sidebar-login-btn:hover {
    background-color: var(--theme-primary-hover, #4338CA) !important;
}

/* Sidebar Section Labels */
.sidebar-section > p.sidebar-label {
    color: var(--theme-text-muted, #64748B) !important;
    opacity: 0.85;
    letter-spacing: 0.05em;
    font-weight: 700;
}
.dark .sidebar-section > p.sidebar-label {
    color: var(--theme-text-muted, #94A3B8) !important;
    opacity: 0.75;
}

/* Sidebar Nav Links & Icons */
.sidebar-nav .nav-link {
    position: relative;
    color: var(--theme-text-muted, #64748B) !important;
    transition: background-color 150ms ease, color 150ms ease;
}
.sidebar-nav .nav-link i {
    color: var(--theme-text-muted, #64748B) !important;
    transition: color 150ms ease, transform 150ms ease;
}
.sidebar-nav .nav-link:hover {
    background-color: var(--theme-card-hover, #F1F5F9) !important;
    color: var(--theme-text, #0F172A) !important;
}
.sidebar-nav .nav-link:hover i {
    color: var(--theme-primary, #4F46E5) !important;
}
.dark .sidebar-nav .nav-link {
    color: var(--theme-text-muted, #94A3B8) !important;
}
.dark .sidebar-nav .nav-link i {
    color: var(--theme-text-muted, #94A3B8) !important;
}
.dark .sidebar-nav .nav-link:hover {
    background-color: var(--theme-card-hover, #1E293B) !important;
    color: var(--theme-text, #F8FAFC) !important;
}
.dark .sidebar-nav .nav-link:hover i {
    color: var(--theme-primary) !important;
}

/* Active Nav Link */
.sidebar-nav .nav-link.active {
    background-color: rgba(var(--theme-primary-rgb, 79, 70, 229), 0.09) !important;
    color: var(--theme-primary, #4F46E5) !important;
    font-weight: 600 !important;
}
.sidebar-nav .nav-link.active i {
    color: var(--theme-primary, #4F46E5) !important;
}
.dark .sidebar-nav .nav-link.active {
    background-color: var(--theme-primary-badge-bg) !important;
    color: var(--theme-primary) !important;
}
.dark .sidebar-nav .nav-link.active i {
    color: var(--theme-primary) !important;
}

/* Active indicator pip */
.sidebar-nav .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3.5px;
    height: 20px;
    border-radius: 0 4px 4px 0;
    background-color: var(--theme-primary, #4F46E5);
}
[dir="rtl"] .sidebar-nav .nav-link.active::before {
    left: auto;
    right: 0;
    border-radius: 4px 0 0 4px;
}
.dark .sidebar-nav .nav-link.active::before {
    background-color: var(--theme-primary);
}

/* Level 3: Service Categories inside Place Order */
.sidebar-category-item .nav-link {
    position: relative;
    color: var(--theme-text-muted, #64748B) !important;
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
    border-inline-start: 3px solid transparent;
}
.sidebar-category-item .nav-link:hover {
    background-color: var(--theme-card-hover, #F1F5F9) !important;
    color: var(--theme-text, #0F172A) !important;
}
.sidebar-category-item .nav-link:hover i {
    color: var(--theme-primary, #4F46E5) !important;
}
.dark .sidebar-category-item .nav-link {
    color: var(--theme-text-muted, #94A3B8) !important;
}
.dark .sidebar-category-item .nav-link:hover {
    background-color: var(--theme-card-hover, #1E293B) !important;
    color: var(--theme-text, #F8FAFC) !important;
}
.dark .sidebar-category-item .nav-link:hover i {
    color: var(--theme-primary) !important;
}

/* Level 3: Active Category Item */
.sidebar-category-item .nav-link.active {
    border-inline-start: 3px solid var(--theme-primary, #4F46E5) !important;
    background-color: var(--theme-card-hover, #F1F5F9) !important;
    color: var(--theme-primary, #4F46E5) !important;
    font-weight: 600 !important;
    border-radius: 0 var(--theme-radius-md, 8px) var(--theme-radius-md, 8px) 0;
}
[dir="rtl"] .sidebar-category-item .nav-link.active {
    border-radius: var(--theme-radius-md, 8px) 0 0 var(--theme-radius-md, 8px);
}
.sidebar-category-item .nav-link.active i {
    color: var(--theme-primary, #4F46E5) !important;
}
.dark .sidebar-category-item .nav-link.active {
    border-inline-start-color: var(--theme-primary) !important;
    background-color: var(--theme-card-hover, #1E293B) !important;
    color: var(--theme-primary) !important;
}
.dark .sidebar-category-item .nav-link.active i {
    color: var(--theme-primary) !important;
}
.sidebar-category-item .nav-link.active::before {
    display: none !important;
}

/* Sidebar Accordion (Place Order) */
.sidebar-accordion-trigger {
    background: transparent;
    border: none;
    outline: none;
    text-decoration: none;
    cursor: pointer;
}
.sidebar-accordion-trigger.nav-link.active::before {
    display: none !important;
}
.sidebar-accordion-chevron {
    transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-accordion-trigger[aria-expanded="true"] .sidebar-accordion-chevron {
    transform: rotate(180deg);
}
.sidebar-accordion-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 220ms cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-accordion-panel.open {
    grid-template-rows: 1fr;
}
.sidebar-accordion-inner {
    overflow: hidden;
    min-height: 0;
}

/* Sidebar collapsed: hide labels & show rail */
body.sidebar-collapsed .sidebar-label {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    pointer-events: none;
}
body.sidebar-collapsed .sidebar-accordion-chevron {
    display: none !important;
}
body.sidebar-collapsed .user-sidebar {
    width: 72px;
}
body.sidebar-collapsed .sidebar-brand {
    justify-content: center;
}
body.sidebar-collapsed .sidebar-brand img,
body.sidebar-collapsed .sidebar-brand > div {
    margin: 0;
}
body.sidebar-collapsed .sidebar-header {
    justify-content: center;
    padding-inline: 0.5rem;
}
body.sidebar-collapsed .sidebar-collapse-btn {
    display: none !important;
}
body.sidebar-collapsed .sidebar-nav .nav-link {
    justify-content: center;
    padding: 0.625rem;
}
body.sidebar-collapsed .sidebar-nav .nav-link i {
    margin: 0;
    font-size: 1.25rem;
}
body.sidebar-collapsed:not(:hover) .sidebar-accordion-panel {
    display: none !important;
}
body.sidebar-collapsed:not(:hover) .sidebar-accordion-trigger {
    justify-content: center !important;
}
body.sidebar-collapsed .sidebar-footer {
    padding-inline: 0.5rem;
}
body.sidebar-collapsed .sidebar-login-btn {
    padding: 0.5rem;
    justify-content: center;
}

/* Sidebar section labels: show as thin line when collapsed */
body.sidebar-collapsed .sidebar-section {
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
}
body.sidebar-collapsed .sidebar-section > p {
    height: 1px;
    margin: 0.5rem 0.75rem;
    padding: 0;
    background: var(--theme-border-subtle, rgba(0,0,0,0.06));
    font-size: 0;
    overflow: hidden;
}
.dark body.sidebar-collapsed .sidebar-section > p,
body.sidebar-collapsed .dark .sidebar-section > p {
    background: var(--theme-border-subtle, rgba(255,255,255,0.06));
}

/* Expand on hover when collapsed (desktop) */
body.sidebar-collapsed .user-sidebar:hover {
    width: 260px;
    background-color: var(--theme-card-bg, #FFFFFF) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 1045;
}
.dark body.sidebar-collapsed .user-sidebar:hover {
    background-color: var(--theme-card-bg, #111827) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}
body.sidebar-collapsed .user-sidebar:hover .sidebar-label {
    opacity: 1;
    width: auto;
    pointer-events: auto;
}
body.sidebar-collapsed .user-sidebar:hover .sidebar-brand {
    justify-content: flex-start;
}
body.sidebar-collapsed .user-sidebar:hover .sidebar-header {
    justify-content: space-between;
    padding-inline: 0.875rem;
}
body.sidebar-collapsed .user-sidebar:hover .sidebar-collapse-btn {
    display: flex !important;
}
body.sidebar-collapsed .user-sidebar:hover .sidebar-nav .nav-link {
    justify-content: flex-start;
    padding: 0.5rem 0.75rem;
}
body.sidebar-collapsed .user-sidebar:hover .sidebar-nav .nav-link i {
    font-size: 1.05rem;
}
body.sidebar-collapsed .user-sidebar:hover .sidebar-accordion-trigger {
    justify-content: space-between !important;
}
body.sidebar-collapsed .user-sidebar:hover .sidebar-accordion-panel {
    display: grid !important;
}
body.sidebar-collapsed .user-sidebar:hover .sidebar-accordion-chevron {
    display: inline-flex !important;
}
body.sidebar-collapsed .user-sidebar:hover .sidebar-footer {
    padding-inline: 0.75rem;
}
body.sidebar-collapsed .user-sidebar:hover .sidebar-login-btn {
    padding: 0.5rem 0.75rem;
    justify-content: center;
}
body.sidebar-collapsed .user-sidebar:hover .sidebar-section > p {
    height: auto;
    margin: 0;
    padding: 0 0.75rem;
    margin-bottom: 0.375rem;
    background: transparent;
    font-size: 10px;
    overflow: visible;
}

/* Main content margin adjusts to sidebar */
.user-main {
    margin-left: 260px;
    margin-inline-start: 260px;
    transition: margin 250ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
[dir="rtl"] .user-main {
    margin-left: 0;
    margin-right: 260px;
}
body.sidebar-collapsed .user-main {
    margin-left: 72px;
    margin-inline-start: 72px;
}
[dir="rtl"] body.sidebar-collapsed .user-main {
    margin-left: 0;
    margin-right: 72px;
}

/* Center wide page content without allowing a child grid to force overflow. */
.user-content-shell {
    width: 100%;
    max-width: 1500px;
    min-width: 0;
    margin-inline: auto;
}

/* Service detail layout; kept here because the generated Tailwind bundle does not include 10-column utilities. */
.service-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "identity"
        "order"
        "description";
}
.service-detail-order {
    min-width: 0;
}
.service-detail-identity {
    grid-area: identity;
}
.service-detail-order { grid-area: order; }
.service-detail-description { grid-area: description; }
@media (min-width: 1024px) {
    .service-detail-grid {
        grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
        grid-template-areas:
            "identity order"
            "description order";
    }
    .service-detail-identity {
        grid-area: identity;
    }
    .service-detail-order {
        align-self: start;
        grid-area: order;
    }
    .service-detail-description {
        grid-area: description;
    }
}

/* Order detail layout; kept here because the generated Tailwind bundle does not include
   md:grid-cols-2, lg:grid-cols-12 or lg:col-span-5/7 utilities (single column below 1024px). */
.order-detail-container {
    width: 100%;
    margin-inline: auto;
}
@media (min-width: 1024px) {
    .order-detail-container {
        max-width: 1000px;
    }
}
.order-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}
.order-detail-summary-col,
.order-detail-result-col {
    min-width: 0;
}
.order-detail-result-col {
    border-top: 1px solid var(--theme-border-subtle, #f1f5f9);
}
.dark .order-detail-result-col {
    border-top-color: var(--theme-border, #1f2937);
}
@media (min-width: 1024px) {
    .order-detail-grid {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    }
    .order-detail-result-col {
        border-top: 0;
        border-inline-start: 1px solid var(--theme-border-subtle, #f1f5f9);
    }
    .dark .order-detail-result-col {
        border-inline-start-color: var(--theme-border, #1f2937);
    }
}

/* Order progress horizontal stepper; logical properties keep marker/connector alignment correct in LTR and RTL. */
.order-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    width: 100%;
}
.order-timeline-step {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 0.5rem;
}
.order-timeline-step + .order-timeline-step {
    margin-top: 0;
}
.order-timeline-step:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 9px; /* marker centre (18px / 2) */
    inset-inline-start: 50%;
    width: 100%;
    height: 2px;
    background-color: var(--theme-border, #e5e7eb);
    z-index: 1;
    transform: translateY(-50%);
}
.dark .order-timeline-step:not(:last-child)::before {
    background-color: var(--theme-border, #374151);
}
.order-timeline-step[data-state="completed"]:not(:last-child)::before,
.order-timeline-step[data-state="submitted"]:not(:last-child)::before {
    background-color: var(--theme-info, #0284c7);
    opacity: 0.45;
}
.dark .order-timeline-step[data-state="completed"]:not(:last-child)::before,
.dark .order-timeline-step[data-state="submitted"]:not(:last-child)::before {
    background-color: var(--theme-info, #0284c7);
    opacity: 0.5;
}
.order-timeline-step[data-state="success"]:not(:last-child)::before {
    background-color: var(--theme-success, #059669);
    opacity: 0.45;
}
.dark .order-timeline-step[data-state="success"]:not(:last-child)::before {
    background-color: var(--theme-success, #059669);
    opacity: 0.5;
}
.order-timeline-step[data-state="rejected"]:not(:last-child)::before,
.order-timeline-step[data-state="failed"]:not(:last-child)::before {
    background-color: var(--theme-danger, #dc2626);
    opacity: 0.45;
}
.dark .order-timeline-step[data-state="rejected"]:not(:last-child)::before,
.dark .order-timeline-step[data-state="failed"]:not(:last-child)::before {
    background-color: var(--theme-danger, #dc2626);
    opacity: 0.5;
}
.order-timeline-marker {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 9999px;
    font-size: 9px;
    line-height: 1;
    margin: 0 auto;
    flex-shrink: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.order-timeline-marker > .bi::before {
    vertical-align: 0; /* override Bootstrap Icons' -.125em baseline offset so the glyph is optically centred */
}
.order-timeline-marker--submitted,
.order-timeline-marker--info {
    background-color: var(--theme-info, #0284c7);
    color: #fff;
    box-shadow: 0 0 0 2px var(--theme-info-bg, rgba(2, 132, 199, 0.15));
}
.order-timeline-marker--processing,
.order-timeline-marker--active,
.order-timeline-marker--warning,
.order-timeline-marker--in-process,
.order-timeline-marker--in_process {
    background-color: var(--theme-warning, #d97706);
    color: #fff;
    box-shadow: 0 0 0 2px var(--theme-warning-bg, rgba(217, 119, 6, 0.15));
}
.order-timeline-marker--success,
.order-timeline-marker--completed {
    background-color: var(--theme-success, #059669);
    color: #fff;
    box-shadow: 0 0 0 2px var(--theme-success-bg, rgba(5, 150, 105, 0.15));
}
.order-timeline-marker--rejected,
.order-timeline-marker--failed,
.order-timeline-marker--danger {
    background-color: var(--theme-danger, #dc2626);
    color: #fff;
    box-shadow: 0 0 0 2px var(--theme-danger-bg, rgba(220, 38, 38, 0.15));
}
.order-timeline-marker--cancelled,
.order-timeline-marker--secondary {
    background-color: var(--theme-text-muted, #64748b);
    color: #fff;
    box-shadow: 0 0 0 2px rgba(100, 116, 139, 0.15);
}
.order-timeline-marker--pending {
    background-color: var(--theme-card-bg, #ffffff);
    color: var(--theme-text-muted, #9ca3af);
    border: 1.5px solid var(--theme-border, #d1d5db);
}
.dark .order-timeline-marker--pending {
    background-color: var(--theme-card-bg, #111827);
    color: var(--theme-text-muted, #64748b);
    border-color: var(--theme-border, #374151);
}

/* Timeline title text colors mapped strictly to semantic theme tokens */
.order-timeline-title--submitted,
.order-timeline-title--info {
    color: var(--theme-info, #0284c7);
}
.order-timeline-title--processing,
.order-timeline-title--active,
.order-timeline-title--warning,
.order-timeline-title--in-process,
.order-timeline-title--in_process {
    color: var(--theme-warning, #d97706);
}
.order-timeline-title--success,
.order-timeline-title--completed {
    color: var(--theme-success, #059669);
}
.order-timeline-title--rejected,
.order-timeline-title--failed,
.order-timeline-title--danger {
    color: var(--theme-danger, #dc2626);
}
.order-timeline-title--cancelled,
.order-timeline-title--secondary {
    color: var(--theme-text-muted, #64748b);
}
.order-timeline-title--pending {
    color: var(--theme-text-muted, #9ca3af);
}

/* Order awaiting / processing result icons mapped to theme tokens */
.order-waiting-icon--pending {
    background-color: var(--theme-info-bg, rgba(2, 132, 199, 0.15));
    color: var(--theme-info, #0284c7);
}
.order-waiting-icon--processing {
    background-color: var(--theme-warning-bg, rgba(217, 119, 6, 0.15));
    color: var(--theme-warning, #d97706);
}
.order-timeline-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    margin-top: 0.375rem;
    min-height: auto;
    text-align: center;
}
.order-timeline-head > span:first-child {
    display: block;
    width: 100%;
    text-align: center;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.25;
}
.order-timeline-head > span.font-mono {
    display: block;
    margin-top: 0.125rem;
    text-align: center;
    line-height: 1.2;
}
.order-timeline-step > p {
    text-align: center;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.25;
    margin-top: 0.25rem;
    margin-bottom: 0;
}
@media (max-width: 480px) {
    .order-timeline-step {
        padding: 0 0.125rem;
    }
    .order-timeline-head {
        margin-top: 0.25rem;
    }
    .order-timeline-head > span:first-child {
        font-size: 0.75rem;
    }
    .order-timeline-head > span.font-mono {
        font-size: 0.625rem;
    }
    .order-timeline-step > p {
        font-size: 0.6875rem;
        margin-top: 0.125rem;
    }
}

/* ── Semantic Alert & Feedback Tokens (Single Source of Truth) ── */
.alert-feedback {
    border-radius: var(--theme-radius-lg, 12px);
}
.alert-feedback--success {
    background-color: var(--theme-success-bg, rgba(5, 150, 105, 0.10));
    border-color: var(--theme-success-border, rgba(5, 150, 105, 0.20));
}
.alert-feedback--success .alert-feedback-icon,
.alert-feedback--success .alert-feedback-title {
    color: var(--theme-success, #059669);
}
.alert-feedback--warning {
    background-color: var(--theme-warning-bg, rgba(217, 119, 6, 0.10));
    border-color: var(--theme-warning-border, rgba(217, 119, 6, 0.20));
}
.alert-feedback--warning .alert-feedback-icon,
.alert-feedback--warning .alert-feedback-title {
    color: var(--theme-warning, #d97706);
}
.alert-feedback--error,
.alert-feedback--danger {
    background-color: var(--theme-danger-bg, rgba(220, 38, 38, 0.10));
    border-color: var(--theme-danger-border, rgba(220, 38, 38, 0.20));
}
.alert-feedback--error .alert-feedback-icon,
.alert-feedback--error .alert-feedback-title,
.alert-feedback--danger .alert-feedback-icon,
.alert-feedback--danger .alert-feedback-title {
    color: var(--theme-danger, #dc2626);
}
.alert-feedback--info {
    background-color: var(--theme-info-bg, rgba(2, 132, 199, 0.10));
    border-color: var(--theme-info-border, rgba(2, 132, 199, 0.20));
}
.alert-feedback--info .alert-feedback-icon,
.alert-feedback--info .alert-feedback-title {
    color: var(--theme-info, #0284c7);
}
.alert-feedback-desc {
    color: var(--theme-text-muted, #64748b);
}
.dark .alert-feedback-desc {
    color: var(--theme-text-muted, #94a3b8);
}


/* Topbar frosted glass & tokens */
.user-topbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--theme-border, #E2E8F0) !important;
}
.dark .user-topbar {
    background: rgba(17, 24, 39, 0.85);
    border-bottom-color: var(--theme-border, #1E293B) !important;
}

/* User topbar balance badge, avatar, and dropdown active tokens */
.user-balance-badge {
    background-color: rgba(var(--theme-primary-rgb, 79, 70, 229), 0.08) !important;
    color: var(--theme-primary, #4F46E5) !important;
}
.dark .user-balance-badge {
    background-color: var(--theme-primary-badge-bg) !important;
    color: var(--theme-primary) !important;
}
.user-avatar-badge {
    background: linear-gradient(135deg, var(--theme-primary, #4F46E5), var(--theme-accent, #6366F1)) !important;
}
.user-dropdown-active {
    background-color: rgba(var(--theme-primary-rgb, 79, 70, 229), 0.08) !important;
    color: var(--theme-primary, #4F46E5) !important;
}
.dark .user-dropdown-active {
    background-color: var(--theme-primary-badge-bg) !important;
    color: var(--theme-primary) !important;
}

/* Sidebar Scrollbar & Touch Scrolling */
.sidebar-nav {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.12); border-radius: 2px; }
.dark .sidebar-nav::-webkit-scrollbar-thumb { background: rgba(241, 245, 249, 0.15); }

/* Mobile sidebar */
@media (max-width: 1023px) {
    .user-sidebar {
        width: 280px !important;
        max-width: calc(100vw - 3rem) !important;
        height: 100% !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        background-color: var(--theme-card-bg, #FFFFFF) !important;
        border-right: 1px solid var(--theme-border, #E2E8F0) !important;
        transform: translateX(-100%) !important;
        transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1), visibility 280ms ease !important;
        box-shadow: none;
        visibility: hidden;
        pointer-events: none;
    }
    .dark .user-sidebar {
        background-color: var(--theme-card-bg, #111827) !important;
        border-right-color: var(--theme-border, #1E293B) !important;
    }
    [dir="rtl"] .user-sidebar {
        border-right: none !important;
        border-left: 1px solid var(--theme-border, #E2E8F0) !important;
        transform: translateX(100%) !important;
    }
    [dir="rtl"].dark .user-sidebar,
    [dir="rtl"] .dark .user-sidebar {
        border-left-color: var(--theme-border, #1E293B) !important;
    }
    .user-sidebar.show {
        transform: translateX(0) !important;
        visibility: visible !important;
        pointer-events: auto !important;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.25) !important;
    }
    [dir="rtl"] .user-sidebar.show {
        transform: translateX(0) !important;
    }
    .sidebar-overlay.show {
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    .user-main,
    [dir="rtl"] .user-main,
    body.sidebar-collapsed .user-main,
    [dir="rtl"] body.sidebar-collapsed .user-main {
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-inline-start: 0 !important;
    }
    .sidebar-collapse-btn {
        display: none !important;
    }
    .sidebar-footer {
        padding-bottom: max(0.625rem, env(safe-area-inset-bottom));
    }
    body.sidebar-collapsed .sidebar-label {
        opacity: 1 !important;
        width: auto !important;
        pointer-events: auto !important;
    }
    body.sidebar-collapsed .sidebar-brand {
        justify-content: flex-start !important;
    }
    body.sidebar-collapsed .sidebar-header {
        justify-content: space-between !important;
        padding-inline: 0.875rem !important;
    }
    body.sidebar-collapsed .sidebar-nav .nav-link {
        justify-content: flex-start !important;
        padding: 0.5rem 0.75rem !important;
    }
    body.sidebar-collapsed .sidebar-nav .nav-link i {
        font-size: 1.05rem !important;
    }
    body.sidebar-collapsed .sidebar-section > p {
        height: auto !important;
        margin: 0 !important;
        padding: 0 0.75rem !important;
        margin-bottom: 0.375rem !important;
        background: transparent !important;
        font-size: 10px !important;
        overflow: visible !important;
    }
    body.sidebar-collapsed .sidebar-section {
        margin-top: 0.875rem !important;
    }
    body.sidebar-collapsed .sidebar-nested {
        display: block !important;
    }
    body.sidebar-collapsed .sidebar-footer {
        padding-inline: 0.625rem !important;
    }
    body.sidebar-collapsed .sidebar-login-btn {
        justify-content: center !important;
    }
}

/* IMEI check digit input */
.imei-cd-input {
    width: 44px !important;
    flex-shrink: 0;
    text-align: center;
    font-weight: 700;
    cursor: default;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fadeIn { animation: fadeIn 0.3s ease; }

@keyframes pulse-slow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.animate-pulse-slow { animation: pulse-slow 2s infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

/* Live polling dot */
.live-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse-slow 2s ease-in-out infinite;
}
.live-dot.error { background: #f59e0b; animation: none; }

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background-color: rgba(156,163,175,0.2); border-radius: 10px; }
.custom-scrollbar:hover::-webkit-scrollbar-thumb { background-color: rgba(156,163,175,0.4); }
.dark .custom-scrollbar::-webkit-scrollbar-thumb { background-color: rgba(75,85,99,0.3); }
.dark .custom-scrollbar:hover::-webkit-scrollbar-thumb { background-color: rgba(75,85,99,0.5); }

/* Print styles for PDF exports */
@media print {
    .no-print { display: none !important; }
}

/* ══════ Centralized SaaS Design Tokens ══════ */
:root {
    --saas-navy-950: var(--theme-bg);
    --saas-navy-900: var(--theme-card-bg);
    --saas-navy-800: var(--theme-border);
    --saas-blue-600: var(--theme-primary);
    --saas-blue-500: var(--theme-accent);
    --saas-slate-100: var(--theme-border-subtle);
    --saas-slate-200: var(--theme-border);
    --saas-slate-900: var(--theme-text);
}

/* ── Standard Form Input Controls (Single Source of Truth) ── */
.input,
input.form-control,
select.form-select,
textarea.form-control {
    background-color: var(--theme-card-bg) !important;
    border: 1px solid var(--theme-border) !important;
    color: var(--theme-text) !important;
    height: var(--theme-input-height, 40px);
    border-radius: var(--theme-radius-md, 8px);
    font-size: 0.875rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
textarea.form-control {
    height: auto;
    min-height: 80px;
}
.input:hover:not(:focus):not(:disabled),
input.form-control:hover:not(:focus):not(:disabled),
select.form-select:hover:not(:focus):not(:disabled),
textarea.form-control:hover:not(:focus):not(:disabled) {
    border-color: var(--theme-border-strong) !important;
}
.input:focus,
input.form-control:focus,
select.form-select:focus,
textarea.form-control:focus {
    outline: none !important;
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 0 3px var(--theme-input-focus-ring) !important;
}
.input:disabled,
input.form-control:disabled,
select.form-select:disabled,
textarea.form-control:disabled {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    background-color: var(--theme-bg) !important;
}

/* ── Auth & Floating Input Groups ── */
.auth-input-group {
    height: 2.75rem;
    min-height: 2.75rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.auth-input-group:hover:not(:focus-within) {
    border-color: var(--theme-border-strong) !important;
}
.auth-input-group:focus-within {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 0 3px var(--theme-input-focus-ring) !important;
}
.auth-input-group:focus-within i {
    color: var(--theme-primary) !important;
}

/* ── Card Base Enforcement (Single Source of Truth) ── */
.card {
    background-color: var(--theme-card-bg);
    border: 1px solid var(--theme-border);
    color: var(--theme-text);
    border-radius: var(--theme-radius-xl, 16px);
}
.dark .card {
    background-color: var(--theme-card-bg);
    border-color: var(--theme-border);
    color: var(--theme-text);
}

/* ── Modal & Dialog Standards ── */
.modal-card {
    background-color: var(--theme-card-bg) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: var(--theme-radius-xl, 16px) !important;
    color: var(--theme-text) !important;
}
.modal-header,
.modal-footer {
    border-color: var(--theme-border-subtle) !important;
    background-color: var(--theme-bg) !important;
}

/* ── Dropdowns & Floating Menus ── */
.profile-dropdown-menu,
.dropdown-menu {
    background-color: var(--theme-card-bg) !important;
    border: 1px solid var(--theme-border) !important;
    box-shadow: var(--theme-shadow-lg) !important;
}
.profile-dropdown-menu a:hover,
.dropdown-item:hover {
    background-color: var(--theme-card-hover) !important;
    color: var(--theme-primary) !important;
}

/* ── Tab Links ── */
.tab-link {
    color: var(--theme-text-muted);
    transition: color 150ms ease, background-color 150ms ease;
}
.tab-link:hover {
    color: var(--theme-text);
    background-color: var(--theme-card-hover);
}
.tab-link.active {
    background-color: var(--theme-primary-badge-bg) !important;
    color: var(--theme-primary) !important;
    font-weight: 600;
}

/* ── RTL Icon Mirroring ── */
[dir="rtl"] .rtl-flip {
    transform: scaleX(-1);
    display: inline-block;
}

/* ══════════════════════════════════════════════════════════════════════════
   UNIFIED STATUS BADGES (Single Source of Truth)
   ══════════════════════════════════════════════════════════════════════════ */
.badge-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.1875rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    line-height: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    white-space: nowrap;
    border: 1px solid transparent;
    box-sizing: border-box;
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.badge-status i {
    font-size: 0.6875rem;
    line-height: 1;
    color: currentColor;
    flex-shrink: 0;
}

/* Success (Emerald) */
.badge-status-success {
    background-color: var(--theme-success-bg) !important;
    color: var(--theme-success) !important;
    border-color: var(--theme-success-border) !important;
}

/* Warning & In Process (Yellow / Amber) */
.badge-status-warning,
.badge-status-processing,
.badge-status-in-process {
    background-color: var(--theme-warning-bg) !important;
    color: var(--theme-warning) !important;
    border-color: var(--theme-warning-border) !important;
}

/* Danger, Failed, & Rejected (Red) */
.badge-status-danger,
.badge-status-failed,
.badge-status-rejected {
    background-color: var(--theme-danger-bg) !important;
    color: var(--theme-danger) !important;
    border-color: var(--theme-danger-border) !important;
}

/* Info & Pending (Blue / Sky) */
.badge-status-info,
.badge-status-pending,
.badge-status-waiting,
.badge-status-customer-reply {
    background-color: var(--theme-info-bg) !important;
    color: var(--theme-info) !important;
    border-color: var(--theme-info-border) !important;
}

/* Primary (Indigo) */
.badge-status-primary {
    background-color: var(--theme-primary-badge-bg) !important;
    color: var(--theme-primary) !important;
    border-color: var(--theme-primary-badge-border) !important;
}

/* Secondary & Cancelled (Slate) */
.badge-status-secondary,
.badge-status-cancelled,
.badge-status-closed {
    background-color: var(--theme-secondary-badge-bg) !important;
    color: var(--theme-text-muted) !important;
    border-color: var(--theme-secondary-badge-border) !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   UNIFIED DATATABLES & TABLE CARDS
   ══════════════════════════════════════════════════════════════════════════ */
.app-table-card,
.card:has(> .overflow-x-auto > table),
.card:has(> table) {
    background-color: var(--theme-card-bg) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: var(--theme-radius-lg, 12px) !important;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.04) !important;
}

.dark .app-table-card,
.dark .card:has(> .overflow-x-auto > table),
.dark .card:has(> table) {
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.3) !important;
}

/* Table Layout & Headers */
.app-table,
.card table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.app-table thead,
.card table thead {
    background-color: var(--theme-bg) !important;
}

.app-table thead th,
.card table thead th,
.th {
    background-color: var(--theme-bg) !important;
    color: var(--theme-text-muted) !important;
    font-size: 0.6875rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    padding: 0.75rem 1rem !important;
    border-bottom: 1px solid var(--theme-border) !important;
    white-space: nowrap;
    text-align: start;
}

/* Table Rows & Hover States */
.app-table tbody tr,
.card table tbody tr,
.tr-hover {
    border-bottom: 1px solid var(--theme-border-subtle) !important;
    transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.app-table tbody tr:last-child,
.card table tbody tr:last-child {
    border-bottom: none !important;
}

.app-table tbody tr:hover,
.card table tbody tr:hover,
.tr-hover:hover {
    background-color: var(--theme-card-hover) !important;
}

/* Table Cells */
.app-table tbody td,
.card table tbody td {
    padding: 0.8125rem 1rem;
    vertical-align: middle;
    color: var(--theme-text);
}

/* Table Action Link / Button */
.table-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3125rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--theme-border);
    color: var(--theme-text-muted);
    text-decoration: none;
    transition: all 150ms ease;
    background: transparent;
}

.table-action-btn:hover {
    background-color: var(--theme-card-hover);
    color: var(--theme-primary);
    border-color: var(--theme-primary);
}

/* Service View: Guaranteed display suppression for hidden hints and errors */
#imeiHint.hidden,
#imeiError.hidden {
    display: none !important;
}

/* Service View: Form Input Ergonomics & Alignment */
.h-\[42px\] {
    height: 42px !important;
}

/* Hide number input spinners for clean stepper UI */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

/* Service View: Direction-Agnostic Logical & Spacing Utilities */
.text-start {
    text-align: start !important;
}
.text-end {
    text-align: end !important;
}
.ms-1 {
    margin-inline-start: 0.25rem !important;
}
.me-1 {
    margin-inline-end: 0.25rem !important;
}
.ms-1\.5 {
    margin-inline-start: 0.375rem !important;
}
.me-1\.5 {
    margin-inline-end: 0.375rem !important;
}
.ms-2 {
    margin-inline-start: 0.5rem !important;
}
.me-2 {
    margin-inline-end: 0.5rem !important;
}
.ms-auto {
    margin-inline-start: auto !important;
}
.me-auto {
    margin-inline-end: auto !important;
}
.ps-3 {
    padding-inline-start: 0.75rem !important;
}
.ps-3\.5 {
    padding-inline-start: 0.875rem !important;
}
.ps-4 {
    padding-inline-start: 1rem !important;
}
.ps-10 {
    padding-inline-start: 2.5rem !important;
}
.pe-2\.5 {
    padding-inline-end: 0.625rem !important;
}
.pe-3 {
    padding-inline-end: 0.75rem !important;
}
.pe-3\.5 {
    padding-inline-end: 0.875rem !important;
}
.pe-4 {
    padding-inline-end: 1rem !important;
}
.pe-9 {
    padding-inline-end: 2.25rem !important;
}
.pe-10 {
    padding-inline-end: 2.5rem !important;
}
.pe-16 {
    padding-inline-end: 4rem !important;
}
.start-3 {
    inset-inline-start: 0.75rem !important;
}
.start-3\.5 {
    inset-inline-start: 0.875rem !important;
}
.start-4 {
    inset-inline-start: 1rem !important;
}
.end-3 {
    inset-inline-end: 0.75rem !important;
}
.end-3\.5 {
    inset-inline-end: 0.875rem !important;
}
.end-4 {
    inset-inline-end: 1rem !important;
}
.end-10 {
    inset-inline-end: 2.5rem !important;
}
.pr-10 {
    padding-right: 2.5rem !important;
}
.px-3\.5 {
    padding-left: 0.875rem !important;
    padding-right: 0.875rem !important;
}
.px-4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

/* Responsive Grid Extensions for Ultra-Wide / High-Res Viewports */
@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}
@media (min-width: 1280px) {
    .xl\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}
@media (min-width: 1536px) {
    .\32 xl\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

/* Service Card Focus & Micro-interactions */
.service-card-link {
    outline: none;
    border-radius: 1rem;
    display: block;
    height: 100%;
    text-decoration: none !important;
}
.service-card-link:focus-visible {
    outline: 2px solid var(--theme-primary, #4f46e5) !important;
    outline-offset: 3px !important;
}

/* Service Card Hover Arrow Translation */
.service-card-arrow {
    transition: transform 180ms ease, color 180ms ease;
}
[dir="rtl"] .service-card-arrow i {
    transform: scaleX(-1);
    display: inline-block;
}

/* Service Card Compact Premium Standards */
.service-card {
    height: 148px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.75rem;
    border-radius: var(--theme-radius-xl, 1rem);
    background-color: var(--theme-card-bg, #FFFFFF);
    border: 1px solid var(--theme-border, #E2E8F0);
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04);
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
    box-sizing: border-box;
}
.dark .service-card {
    background-color: var(--theme-card-bg, #111827);
    border-color: var(--theme-border, #1E293B);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2);
}
.service-card-link:hover .service-card {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px 0 rgba(15, 23, 42, 0.06);
    border-color: rgba(var(--theme-primary-rgb, 79, 70, 229), 0.4);
}
.dark .service-card-link:hover .service-card {
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.4);
    border-color: rgba(129, 140, 248, 0.4);
}
.service-card-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}
.service-card-portrait {
    width: 60px;
    height: 78px;
    flex-shrink: 0;
    border-radius: var(--theme-radius-md, 0.5rem);
    background-color: var(--theme-bg, #F8FAFC);
    border: 1px solid var(--theme-border-subtle, #F1F5F9);
    padding: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
}
.dark .service-card-portrait {
    background-color: rgba(30, 41, 59, 0.6);
    border-color: var(--theme-border, #1E293B);
}
.service-card-portrait img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: calc(var(--theme-radius-md, 0.5rem) - 2px);
    transition: transform 200ms ease;
}
.service-card-link:hover .service-card-portrait img {
    transform: scale(1.05);
}
.service-card-portrait i {
    font-size: 1.5rem;
    color: var(--theme-text-muted, #94A3B8);
}
.dark .service-card-portrait i {
    color: var(--theme-text-muted, #64748B);
}
.service-card-body {
    min-width: 0;
    flex: 1;
    height: 78px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: start;
    box-sizing: border-box;
}
.service-card-title {
    max-height: 38px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--theme-text, #0F172A);
    margin: 0;
    transition: color 150ms ease;
}
.dark .service-card-title {
    color: var(--theme-text, #F8FAFC);
}
.service-card-link:hover .service-card-title {
    color: var(--theme-primary, #4F46E5);
}
.dark .service-card-link:hover .service-card-title {
    color: var(--theme-primary);
}
.service-card-time {
    height: 16px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--theme-text-muted, #64748B);
    margin-top: 0.25rem;
}
.dark .service-card-time {
    color: var(--theme-text-muted, #94A3B8);
}
.service-card-footer {
    padding-top: 0.625rem;
    border-top: 1px solid var(--theme-border-subtle, #F1F5F9);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.dark .service-card-footer {
    border-top-color: var(--theme-border, #1E293B);
}
.service-card-price {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--theme-primary, #4F46E5);
    line-height: 1.25;
}
.dark .service-card-price {
    color: var(--theme-primary);
}
.service-card-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-color: rgba(var(--theme-primary-rgb, 79, 70, 229), 0.08);
    color: var(--theme-primary, #4F46E5);
    border: 1px solid rgba(var(--theme-primary-rgb, 79, 70, 229), 0.2);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
.dark .service-card-btn {
    background-color: var(--theme-primary-badge-bg);
    color: var(--theme-primary);
    border-color: var(--theme-primary-badge-border);
}
.service-card-link:hover .service-card-btn {
    background-color: var(--theme-primary, #4F46E5);
    color: #FFFFFF;
    border-color: var(--theme-primary, #4F46E5);
    box-shadow: 0 2px 6px 0 rgba(var(--theme-primary-rgb, 79, 70, 229), 0.35);
}
.dark .service-card-link:hover .service-card-btn {
    background-color: #6366F1;
    color: #FFFFFF;
    border-color: #6366F1;
    box-shadow: 0 2px 8px 0 rgba(99, 102, 241, 0.45);
}
.service-card-link:hover .service-card-btn .service-card-arrow {
    transform: translateX(3px);
    color: #FFFFFF;
}
[dir="rtl"] .service-card-link:hover .service-card-btn .service-card-arrow {
    transform: translateX(-3px);
}
.service-card-lock {
    transition: color 180ms ease;
}
.service-card-link:hover .service-card-btn .service-card-lock {
    color: #FFFFFF;
}

/* Service View: RTL Overrides */
[dir="rtl"] #imeiCheckInput {
    border-left-width: 0 !important;
    border-right-width: 1px !important;
    border-right-style: solid !important;
}
[dir="rtl"] #qntMinusBtn {
    border-right-width: 0 !important;
    border-left-width: 1px !important;
}
[dir="rtl"] #qntPlusBtn {
    border-left-width: 0 !important;
    border-right-width: 1px !important;
}
[dir="rtl"] select.pr-10,
[dir="rtl"] .select.pr-10 {
    padding-right: 1rem !important;
    padding-left: 2.5rem !important;
}
[dir="rtl"] .border-l-4 {
    border-left-width: 0 !important;
    border-right-width: 4px !important;
}
[dir="rtl"] .border-l-brand-500 {
    border-left-color: transparent !important;
    border-right-color: rgb(99, 102, 241) !important;
}

/* ==========================================================================
   Order Details Page — Result / Reply Typography Styles
   ========================================================================== */

/* Result / Reply Text Content */
.reply-content {
    line-height: 1.6;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

/* Supplier Reply Semantic Text Colors (CSP Compliant — Single Source of Truth from theme-tokens.css) */
.reply-text-success,
.reply-text-green {
    color: var(--theme-success, #059669) !important;
    font-weight: 600;
}

.reply-text-danger,
.reply-text-red {
    color: var(--theme-danger, #DC2626) !important;
    font-weight: 600;
}

.reply-text-warning {
    color: var(--theme-warning, #D97706) !important;
    font-weight: 600;
}

.reply-text-info,
.reply-text-blue {
    color: var(--theme-info, #0284C7) !important;
    font-weight: 600;
}
.reply-text-purple {
    color: #9333ea !important;
    font-weight: 600;
}
.reply-text-muted {
    color: #64748b !important;
}
html.dark .reply-text-muted {
    color: #94a3b8 !important;
}

/* Rich Text & Service Information Highlights / Backgrounds (CSP Compliant) */
.reply-bg-warning {
    background-color: #fef3c7 !important;
    color: #92400e;
    padding: 2px 6px;
    border-radius: 4px;
}
.reply-bg-success {
    background-color: #d1fae5 !important;
    color: #065f46;
    padding: 2px 6px;
    border-radius: 4px;
}
.reply-bg-danger {
    background-color: #fee2e2 !important;
    color: #991b1b;
    padding: 2px 6px;
    border-radius: 4px;
}
.reply-bg-info {
    background-color: #e0f2fe !important;
    color: #075985;
    padding: 2px 6px;
    border-radius: 4px;
}
.reply-bg-purple {
    background-color: #f3e8ff !important;
    color: #6b21a8;
    padding: 2px 6px;
    border-radius: 4px;
}
.reply-bg-muted {
    background-color: #f1f5f9 !important;
    color: #334155;
    padding: 2px 6px;
    border-radius: 4px;
}

html.dark .reply-bg-warning { background-color: rgba(245, 158, 11, 0.2) !important; color: #fde68a; }
html.dark .reply-bg-success { background-color: rgba(16, 185, 129, 0.2) !important; color: #a7f3d0; }
html.dark .reply-bg-danger  { background-color: rgba(239, 68, 68, 0.2) !important; color: #fecaca; }
html.dark .reply-bg-info    { background-color: rgba(14, 165, 233, 0.2) !important; color: #bae6fd; }
html.dark .reply-bg-purple  { background-color: rgba(147, 51, 234, 0.2) !important; color: #e9d5ff; }
html.dark .reply-bg-muted   { background-color: rgba(100, 116, 139, 0.2) !important; color: #cbd5e1; }

/* Typography & Formatting Utilities for Rich Content (CSP Compliant) */
.italic { font-style: italic !important; }
.line-through { text-decoration: line-through !important; }
.text-justify { text-align: justify !important; }
.text-center { text-align: center !important; }
.service-description-content .text-xs, .prose .text-xs { font-size: 0.75rem !important; line-height: 1rem !important; }
.service-description-content .text-sm, .prose .text-sm { font-size: 0.875rem !important; line-height: 1.25rem !important; }
.service-description-content .text-base, .prose .text-base { font-size: 1rem !important; line-height: 1.5rem !important; }
.service-description-content .text-lg, .prose .text-lg { font-size: 1.125rem !important; line-height: 1.75rem !important; }
.service-description-content .text-xl, .prose .text-xl { font-size: 1.25rem !important; line-height: 1.75rem !important; }
.service-description-content .text-2xl, .prose .text-2xl { font-size: 1.5rem !important; line-height: 2rem !important; }
.service-description-content .text-3xl, .prose .text-3xl { font-size: 1.875rem !important; line-height: 2.25rem !important; }
.service-description-content .font-mono, .prose .font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important; }
.service-description-content .font-serif, .prose .font-serif { font-family: Georgia, Cambria, "Times New Roman", Times, serif !important; }
.service-description-content .font-sans, .prose .font-sans { font-family: Inter, system-ui, sans-serif !important; }

/* Service Description Tables */
.service-description-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}
.service-description-content th,
.service-description-content td {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--theme-border, #e2e8f0);
}
.service-description-content th {
    background-color: var(--theme-card-header-bg, #f8fafc);
    font-weight: 600;
}
html.dark .service-description-content th,
html.dark .service-description-content td {
    border-color: #334155;
}
html.dark .service-description-content th {
    background-color: #1e293b;
}

/* Utility polyfills missing from static pre-compiled tailwind.css */
.min-h-0 { min-height: 0px !important; }
.break-words { overflow-wrap: break-word; word-break: break-word; }
.h-11 { height: 2.75rem; min-height: 2.75rem; }

/* CSP Compliance: Background color utility from theme tokens */
.bg-theme-primary {
    background-color: var(--theme-primary, #4F46E5) !important;
}
.bg-theme-primary:hover {
    background-color: var(--theme-primary-hover, #4338CA) !important;
}

/* Nav container max-width utility */
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ═════════════════════════════════════════════════════════════════════════
 * Service Description & Email Component Parity (Storefront Parity with Admin CCP)
 * Mirrors admin.css rules for 100% visual parity between Admin TinyMCE & Storefront
 * ═════════════════════════════════════════════════════════════════════════ */
.service-description-content .order-card,
.order-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 20px;
}
.service-description-content .order-card .info-row,
.order-card .info-row {
    padding: 8px 0;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.service-description-content .order-card .info-row:last-child,
.order-card .info-row:last-child {
    border-bottom: none;
}
.service-description-content .order-card .label,
.order-card .label {
    font-weight: 600;
    color: #64748b;
}
.service-description-content .order-card .value,
.order-card .value {
    color: #0f172a;
    font-weight: 500;
}
.service-description-content .reply-section,
.reply-section {
    background-color: #f1f5f9;
    border-left: 4px solid #0284c7 !important;
    padding: 12px 16px !important;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9rem;
    color: #0f172a;
    margin-bottom: 20px;
    word-break: break-all;
}
.service-description-content .whatsapp-btn,
.service-description-content a.whatsapp-btn,
.whatsapp-btn,
a.whatsapp-btn {
    background-color: #25d366 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    font-weight: bold !important;
    font-size: 0.95rem !important;
    display: inline-block !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
    margin: 8px 0 !important;
    transition: background-color 150ms ease;
}
.service-description-content .whatsapp-btn:hover,
.service-description-content a.whatsapp-btn:hover,
.whatsapp-btn:hover,
a.whatsapp-btn:hover {
    background-color: #20ba5a !important;
    color: #ffffff !important;
}

/* Modern Order Response & Email Template Parity */
.service-description-content .email-card,
.email-card {
    background-color: #f1f5f9;
    padding: 24px;
    font-family: Arial, Helvetica, sans-serif;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    margin-bottom: 20px;
}
.service-description-content .email-title,
.email-title {
    color: #2563eb !important;
    font-size: 24px;
    margin: 0 0 18px 0;
    border-bottom: 2px solid #bfdbfe !important;
    padding-bottom: 10px !important;
}
.service-description-content .order-table,
.order-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    margin-bottom: 20px;
}
.service-description-content .order-table tr:first-child,
.service-description-content .order-table-head,
.order-table tr:first-child,
.order-table-head {
    background-color: #e2e8f0;
}
.service-description-content .order-table td,
.order-table td {
    padding: 10px;
    border: 1px solid #cbd5e1;
}
.service-description-content .order-label,
.order-label {
    width: 32%;
    color: #475569;
    font-weight: bold;
}
.service-description-content .order-id-val,
.order-id-val {
    font-weight: bold;
    color: #1d4ed8;
}
.service-description-content .alt-row,
.alt-row {
    background-color: #f8fafc;
}
.service-description-content .status-badge-success,
.status-badge-success {
    display: inline-block;
    background-color: #dcfce7;
    color: #166534 !important;
    padding: 4px 10px;
    border-radius: 5px;
    font-weight: bold;
}
.service-description-content .details-title,
.details-title {
    font-size: 17px;
    color: #1d4ed8 !important;
    margin: 24px 0 10px 0;
}
.service-description-content .details-box,
.details-box {
    background-color: #eff6ff;
    border-left: 4px solid #3b82f6 !important;
    padding: 14px;
    color: #1e293b;
    line-height: 1.7;
    margin-bottom: 20px;
}
.service-description-content .email-footer-note,
.email-footer-note {
    border-top: 1px solid #cbd5e1;
    padding-top: 14px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.7;
}
.service-description-content .email-btn,
.email-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0d6efd;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    margin: 8px 0;
}
.service-description-content .email-btn:hover,
.email-btn:hover {
    background-color: #0b5ed7;
    color: #ffffff !important;
}

/* Dedicated Semantic Decorative Dividers & Border Utilities (Zero Collision with Tailwind) */
.service-section-divider {
    border-bottom: 2px solid #bfdbfe;
    padding-bottom: 8px;
    margin-bottom: 16px;
}
.border-b-subtle {
    border-bottom: 1px solid #e2e8f0;
}
.callout-border-blue {
    border-left: 4px solid #0284c7;
}
.border-t-subtle {
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

/* Dark mode overrides for dedicated decorative components */
html.dark .service-section-divider { border-bottom-color: #3b82f6; }
html.dark .border-b-subtle { border-bottom-color: #334155; }
html.dark .callout-border-blue { border-left-color: #38bdf8; }
html.dark .border-t-subtle { border-top-color: #334155; }

/* ==========================================================================
   Order Placement Transition Overlay (Centralized Animation)
   ========================================================================== */
.order-transition-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.order-transition-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.order-transition-card {
    position: relative;
    width: 100%;
    max-width: 380px;
    background: var(--theme-card-bg, #ffffff);
    border: 1px solid var(--theme-border, #e5e7eb);
    border-radius: 1.5rem;
    padding: 2.25rem 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.order-transition-overlay.active .order-transition-card {
    transform: scale(1);
}

.order-transition-spinner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 4px solid rgba(37, 99, 235, 0.12);
    border-top-color: var(--theme-primary, #2563eb);
    animation: orderSpin 0.8s linear infinite;
    margin-bottom: 1.25rem;
}

.dark .order-transition-spinner {
    border-color: rgba(96, 165, 250, 0.2);
    border-top-color: var(--theme-primary, #3b82f6);
}

@keyframes orderSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.order-card-newly-placed {
    animation: orderCardPulse 2.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes orderCardPulse {
    0% {
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.35);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}



