/**
 * Saroukh UI enhancement layer.
 * Loads after the legacy CSS and brand shells, so selectors stay scoped and intentional.
 */

body.wm-layout {
    --main-color: #f4f6fa;
    --second-main-color: var(--wm-secondary);
    --main-color-1: var(--wm-primary);
    --main-color-2: rgba(26, 47, 80, 0.45);
    --main-color-3: #c92749;
    --main-to-dark-color: var(--wm-secondary);
}

body.wm-layout a,
body.du-app a {
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

body.wm-layout .main-content,
body.du-app .main-content {
    background: transparent;
}

body.wm-layout .btn,
body.du-app .btn {
    border-radius: 999px;
    font-weight: 900;
}

body.wm-layout .btn-primary,
body.du-app .btn-primary {
    border-color: transparent;
    background: linear-gradient(135deg, #c92749 0%, var(--wm-primary, #a31030) 100%);
    box-shadow: 0 16px 34px rgba(163, 16, 48, 0.28);
}

body.du-app .btn-primary {
    background: linear-gradient(135deg, #c92749 0%, var(--du-primary, #a31030) 100%);
}

body.wm-layout .btn-primary:hover,
body.wm-layout .btn-primary:focus,
body.du-app .btn-primary:hover,
body.du-app .btn-primary:focus {
    border-color: transparent;
    filter: brightness(1.05);
    transform: translateY(-1px);
}

body.wm-layout .btn-outline-primary,
body.du-app .btn-outline-primary {
    color: var(--wm-primary, #a31030);
    border-color: rgba(163, 16, 48, 0.42);
    background: rgba(255, 255, 255, 0.78);
}

body.du-app .btn-outline-primary {
    color: var(--du-primary, #a31030);
}

body.wm-layout .btn-outline-primary:hover,
body.du-app .btn-outline-primary:hover {
    color: #fff;
    border-color: transparent;
    background: var(--wm-primary, #a31030);
}

body.wm-layout .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.52);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

body.wm-layout .btn-outline-light:hover {
    color: var(--wm-secondary);
    background: #fff;
}

body.wm-layout .text-gradient {
    background: linear-gradient(120deg, #ffffff 0%, #ffd6de 34%, #ff738d 66%, #ffffff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.wm-layout .section-header {
    margin-bottom: 2.6rem;
}

body.wm-layout .section-title {
    color: var(--wm-secondary);
    font-size: clamp(2rem, 3vw, 3.15rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.08;
}

body.wm-layout .section-subtitle {
    max-width: 46rem;
    margin: 0.9rem auto 0;
    color: var(--wm-muted);
    font-size: 1.04rem;
    line-height: 1.8;
}

/* Public home hero */
body.wm-layout .modern-hero.image-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: stretch;
    min-height: calc(100vh - 86px);
    overflow: hidden;
    color: #fff;
    background: #0d1728 !important;
}

body.wm-layout .modern-hero.image-hero .hero-background {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
}

body.wm-layout .modern-hero.image-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(10, 18, 31, 0.92) 0%, rgba(13, 23, 40, 0.72) 48%, rgba(13, 23, 40, 0.2) 100%),
        radial-gradient(circle at 18% 30%, rgba(163, 16, 48, 0.42), transparent 26rem);
}

[dir="rtl"] body.wm-layout .modern-hero.image-hero::before,
body.wm-layout[dir="rtl"] .modern-hero.image-hero::before {
    background:
        linear-gradient(270deg, rgba(10, 18, 31, 0.92) 0%, rgba(13, 23, 40, 0.72) 48%, rgba(13, 23, 40, 0.2) 100%),
        radial-gradient(circle at 82% 30%, rgba(163, 16, 48, 0.42), transparent 26rem);
}

body.wm-layout .modern-hero.image-hero .container {
    position: relative;
    z-index: 1;
}

body.wm-layout .modern-hero.image-hero .hero-content {
    max-width: 48rem;
    padding: 7rem 0 5rem;
}

body.wm-layout .hero-badge,
body.wm-layout .coverage-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.25rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.84rem;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

body.wm-layout .hero-badge i,
body.wm-layout .coverage-badge i {
    color: #ffbeca;
}

body.wm-layout .modern-hero .hero-title,
body.wm-layout .track-hero .hero-title {
    margin-bottom: 1.2rem;
    color: #fff;
    font-size: clamp(2.5rem, 6vw, 5.25rem);
    font-weight: 900;
    letter-spacing: -0.07em;
    line-height: 0.98;
}

body.wm-layout .modern-hero .hero-subtitle,
body.wm-layout .track-hero .hero-subtitle {
    max-width: 42rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(1rem, 1.6vw, 1.22rem);
    line-height: 1.9;
}

body.wm-layout .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    max-width: 36rem;
    margin-bottom: 2rem;
}

body.wm-layout .stat-item {
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.11);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(14px);
}

body.wm-layout .stat-number {
    color: #fff;
    font-size: 1.7rem;
    font-weight: 900;
    line-height: 1;
}

body.wm-layout .stat-label {
    margin-top: 0.4rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.84rem;
    font-weight: 800;
}

body.wm-layout .hero-actions,
body.wm-layout .hero-buttons,
body.wm-layout .coverage-actions,
body.wm-layout .cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

body.wm-layout .modern-btn-hero,
body.wm-layout .modern-btn-coverage,
body.wm-layout .cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 52px;
    padding-inline: 1.35rem;
}

body.wm-layout .hero-service-card {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-width: 18rem;
    margin-inline-start: auto;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.11);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(18px);
}

body.wm-layout .hero-service-card span {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #fff;
    font-weight: 900;
}

body.wm-layout .hero-service-card span::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--wm-primary);
    box-shadow: 0 0 0 6px rgba(163, 16, 48, 0.18);
}

/* Home page sections */
body.wm-layout .home-prices-section,
body.wm-layout .modern-features,
body.wm-layout .modern-coverage {
    position: relative;
    overflow: hidden;
    padding: 6rem 0;
    background: transparent !important;
}

body.wm-layout .home-prices-section::before,
body.wm-layout .modern-features::before,
body.wm-layout .modern-coverage::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

body.wm-layout .home-prices-section::before {
    background:
        radial-gradient(circle at 18% 18%, rgba(163, 16, 48, 0.09), transparent 24rem),
        linear-gradient(180deg, #ffffff 0%, #f4f6fa 100%);
}

body.wm-layout .modern-features::before {
    background:
        radial-gradient(circle at 84% 22%, rgba(26, 47, 80, 0.1), transparent 24rem),
        linear-gradient(180deg, #f4f6fa 0%, #ffffff 100%);
}

body.wm-layout .modern-coverage::before {
    background:
        radial-gradient(circle at 14% 30%, rgba(163, 16, 48, 0.08), transparent 22rem),
        linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
}

body.wm-layout .price-table-container,
body.wm-layout .cta-content,
body.wm-layout .trust-stats,
body.wm-layout .coverage-visual,
body.wm-layout .tracking-card,
body.wm-layout .results-card {
    overflow: hidden;
    border: 1px solid var(--wm-line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--wm-shadow);
    backdrop-filter: blur(12px);
}

body.wm-layout .price-table-container {
    height: 100%;
}

body.wm-layout .table-header,
body.wm-layout .tracking-card .card-header,
body.wm-layout .results-card .card-header {
    padding: 1.25rem 1.4rem;
    border-bottom: 1px solid var(--wm-line);
    background: linear-gradient(135deg, rgba(26, 47, 80, 0.07) 0%, rgba(163, 16, 48, 0.06) 100%);
}

body.wm-layout .table-title,
body.wm-layout .card-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    color: var(--wm-secondary);
    font-size: 1.1rem;
    font-weight: 900;
}

body.wm-layout .table-title i,
body.wm-layout .card-title i {
    color: var(--wm-primary);
}

body.wm-layout .modern-prices-table {
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
}

body.wm-layout .modern-prices-table thead th {
    padding: 0.95rem 1rem;
    border: 0;
    background: var(--wm-secondary);
    color: #fff;
    font-size: 0.83rem;
    font-weight: 900;
    text-transform: uppercase;
}

body.wm-layout .modern-prices-table tbody td {
    padding: 0.9rem 1rem;
    border-color: rgba(26, 47, 80, 0.08);
    color: var(--wm-ink);
    vertical-align: middle;
}

body.wm-layout .modern-prices-table tbody tr:nth-child(even) {
    background: rgba(26, 47, 80, 0.035);
}

body.wm-layout .price-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.8rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: rgba(163, 16, 48, 0.09);
    color: var(--wm-primary);
    font-weight: 900;
}

body.wm-layout .price-table-note {
    padding: 0 1rem 1.1rem;
}

body.wm-layout .why-choose-cta {
    margin-top: 1rem;
}

body.wm-layout .cta-content {
    padding: 2rem;
    background:
        radial-gradient(circle at 90% 0%, rgba(163, 16, 48, 0.13), transparent 18rem),
        #ffffff;
}

body.wm-layout .cta-title,
body.wm-layout .coverage-title {
    color: var(--wm-secondary);
    font-size: clamp(1.8rem, 3vw, 3rem);
    font-weight: 900;
    letter-spacing: -0.04em;
}

body.wm-layout .cta-description,
body.wm-layout .coverage-description {
    color: var(--wm-muted);
    line-height: 1.85;
}

body.wm-layout .cta-features,
body.wm-layout .coverage-features {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.2rem;
}

body.wm-layout .cta-feature,
body.wm-layout .coverage-feature {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--wm-secondary);
    font-weight: 900;
}

body.wm-layout .cta-feature i,
body.wm-layout .coverage-feature i {
    color: var(--wm-primary);
}

body.wm-layout .trust-indicators {
    margin-top: 2.5rem;
}

body.wm-layout .trust-stats {
    padding: 1.5rem;
}

body.wm-layout .trust-stat {
    padding: 1rem;
    border-radius: 20px;
    background: rgba(26, 47, 80, 0.04);
}

body.wm-layout .trust-number {
    color: var(--wm-primary);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 900;
}

body.wm-layout .trust-label {
    color: var(--wm-muted);
    font-weight: 800;
}

body.wm-layout .coverage-badge {
    border-color: rgba(163, 16, 48, 0.14);
    background: rgba(163, 16, 48, 0.09);
    color: var(--wm-primary);
}

body.wm-layout .coverage-badge i {
    color: var(--wm-primary);
}

body.wm-layout .coverage-content {
    padding-block: 1rem;
}

body.wm-layout .coverage-visual {
    padding: 2rem;
    background:
        radial-gradient(circle at center, rgba(163, 16, 48, 0.08), transparent 20rem),
        #fff;
}

body.wm-layout .map-container {
    position: relative;
    max-width: 28rem;
    margin: 0 auto;
}

body.wm-layout .coverage-map {
    display: block;
    width: 100%;
    filter: drop-shadow(0 24px 36px rgba(26, 47, 80, 0.18));
}

body.wm-layout .map-pin {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--wm-primary);
    color: #fff;
    box-shadow: 0 0 0 8px rgba(163, 16, 48, 0.14);
}

/* Shipment page */
body.wm-layout .track-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 6.5rem 0 5rem;
    color: #fff;
    background:
        radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.15), transparent 18rem),
        radial-gradient(circle at 20% 80%, rgba(163, 16, 48, 0.42), transparent 23rem),
        linear-gradient(135deg, #0d1728 0%, var(--wm-secondary) 54%, #5b1023 100%) !important;
}

body.wm-layout .track-hero::after {
    content: '';
    position: absolute;
    inset: auto -8% -36% -8%;
    z-index: -1;
    height: 58%;
    border-radius: 50% 50% 0 0;
    background: rgba(255, 255, 255, 0.07);
}

body.wm-layout .track-hero .row {
    min-height: 420px;
}

body.wm-layout .tracking-illustration {
    position: relative;
    min-height: 360px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 34px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)),
        radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.2), transparent 13rem);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(14px);
}

body.wm-layout .package-tracking {
    position: absolute;
    inset: 50% 12% auto 12%;
    display: flex;
    align-items: center;
    transform: translateY(-50%);
}

body.wm-layout .package-box,
body.wm-layout .delivery-truck {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    border-radius: 28px;
    background: #fff;
    color: var(--wm-primary);
    font-size: 2.5rem;
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.2);
}

body.wm-layout .delivery-truck {
    color: var(--wm-secondary);
}

body.wm-layout .tracking-line {
    flex: 1;
    height: 8px;
    margin-inline: 1rem;
    border-radius: 999px;
    background:
        repeating-linear-gradient(90deg, #fff 0 18px, rgba(255, 255, 255, 0.24) 18px 32px);
}

body.wm-layout .track-hero .floating-elements {
    position: absolute;
    inset: 1.2rem;
    pointer-events: none;
}

body.wm-layout .track-hero .floating-card {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    color: #fff;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

body.wm-layout .track-hero .floating-card i {
    color: #ffbeca;
}

body.wm-layout .track-hero .card-1 {
    inset-block-start: 1.2rem;
    inset-inline-start: 1.2rem;
}

body.wm-layout .track-hero .card-2 {
    inset-block-end: 1.2rem;
    inset-inline-start: 18%;
}

body.wm-layout .track-hero .card-3 {
    inset-block-start: 26%;
    inset-inline-end: 1.2rem;
}

body.wm-layout .tracking-form-section,
body.wm-layout .tracking-results-section {
    padding: 5rem 0;
    background: #f5f7fb !important;
}

body.wm-layout .tracking-results-section {
    padding-top: 0;
}

body.wm-layout .tracking-card .card-body,
body.wm-layout .results-card .card-body {
    padding: 1.5rem;
}

body.wm-layout .tracking-card {
    margin-top: -7rem;
    position: relative;
    z-index: 2;
}

body.wm-layout .tracking-form .form-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    color: var(--wm-secondary);
    font-weight: 900;
}

body.wm-layout .tracking-form .input-group {
    overflow: hidden;
    border: 1px solid rgba(26, 47, 80, 0.12);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(26, 47, 80, 0.08);
}

body.wm-layout .shipment-input {
    height: 58px;
    border: 0;
    border-radius: 999px 0 0 999px;
    padding-inline: 1.25rem;
    box-shadow: none !important;
}

body.wm-layout[dir="rtl"] .shipment-input {
    border-radius: 0 999px 999px 0;
}

body.wm-layout .track-btn {
    min-width: 8.5rem;
    border-radius: 999px !important;
}

body.wm-layout .modern-tabs {
    gap: 0.5rem;
    border: 0;
    padding: 0.5rem;
    border-radius: 999px;
    background: rgba(26, 47, 80, 0.05);
}

body.wm-layout .modern-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 0 !important;
    border-radius: 999px !important;
    color: var(--wm-secondary);
    font-weight: 900;
}

body.wm-layout .modern-tabs .nav-link.active {
    color: #fff !important;
    background: var(--wm-primary) !important;
    box-shadow: 0 12px 24px rgba(163, 16, 48, 0.22);
}

body.wm-layout .tab-content {
    padding-top: 1.5rem;
}

body.wm-layout .timeline {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.wm-layout .timeline-item {
    position: relative;
    margin-bottom: 1.1rem;
    padding-inline-start: 3.4rem;
}

body.wm-layout .timeline-item::before {
    content: '';
    position: absolute;
    inset-block: 2.25rem -1.25rem;
    inset-inline-start: 1rem;
    width: 2px;
    background: rgba(163, 16, 48, 0.18);
}

body.wm-layout .timeline-item:last-child::before {
    display: none;
}

body.wm-layout .timeline-marker {
    position: absolute;
    inset-block-start: 0.35rem;
    inset-inline-start: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: var(--wm-primary);
    color: #fff;
    box-shadow: 0 0 0 8px rgba(163, 16, 48, 0.11);
}

body.wm-layout .timeline-content {
    padding: 1.15rem 1.25rem;
    border: 1px solid rgba(26, 47, 80, 0.1);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(26, 47, 80, 0.08);
}

body.wm-layout .timeline-title {
    margin-bottom: 0.5rem;
    color: var(--wm-secondary);
    font-size: 1rem;
    font-weight: 900;
}

body.wm-layout .timeline-date {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    color: var(--wm-muted);
    font-size: 0.9rem;
}

body.wm-layout .no-data {
    padding: 3rem 1rem;
    text-align: center;
}

body.wm-layout .no-data-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin-bottom: 1rem;
    border-radius: 24px;
    background: rgba(163, 16, 48, 0.09);
    color: var(--wm-primary);
    font-size: 2rem;
}

body.wm-layout .order-details {
    display: grid;
    gap: 0.85rem;
}

body.wm-layout .detail-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(26, 47, 80, 0.1);
    border-radius: 18px;
    background: #fff;
}

body.wm-layout .detail-item label {
    margin: 0;
    color: var(--wm-muted);
    font-weight: 900;
}

body.wm-layout .detail-item span {
    color: var(--wm-secondary);
    font-weight: 900;
}

body.wm-layout .status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: rgba(163, 16, 48, 0.09);
    color: var(--wm-primary) !important;
}

/* Dashboard shared controls */
body.du-app {
    --second-main-color: var(--du-secondary);
    --bg-form-light: rgba(26, 47, 80, 0.06);
    --brdr-form-light: rgba(26, 47, 80, 0.14);
}

body.du-app .d-card,
body.du-app .card,
body.du-app .box.not-overflow {
    overflow: hidden;
    border: 1px solid rgba(26, 47, 80, 0.1);
    border-radius: 20px;
    background: var(--du-elev);
    box-shadow: 0 18px 46px rgba(26, 47, 80, 0.09);
}

body.du-app .d-card .d-card-heading,
body.du-app .frm-light-header.d-card-heading,
body.du-app .card-header {
    min-height: 54px;
    padding: 1rem 1.15rem !important;
    border-bottom: 1px solid rgba(26, 47, 80, 0.1);
    background: linear-gradient(135deg, rgba(26, 47, 80, 0.06) 0%, rgba(163, 16, 48, 0.055) 100%) !important;
}

body.du-app .d-card .d-card-heading p,
body.du-app .d-card .d-card-heading .d-content,
body.du-app .frm-header .content b {
    color: var(--du-secondary) !important;
    font-weight: 900;
}

body.du-app .d-card .d-card-body {
    padding: 1.2rem !important;
}

body.du-app .frm-header .content .step {
    border-radius: 12px;
    background: linear-gradient(135deg, var(--du-primary) 0%, #c92749 100%) !important;
    color: #fff !important;
    font-weight: 900;
}

body.wm-layout .form-control,
body.wm-layout .custom-select,
body.wm-layout select.form-control,
body.du-app .form-control,
body.du-app .custom-select,
body.du-app select.form-control {
    border: 1px solid rgba(26, 47, 80, 0.16);
    border-radius: 14px;
    color: #172238;
    box-shadow: none;
}

body.wm-layout .form-control:focus,
body.du-app .form-control:focus {
    border-color: rgba(163, 16, 48, 0.55);
    box-shadow: 0 0 0 0.2rem rgba(163, 16, 48, 0.14);
}

body.wm-layout .table,
body.du-app .table {
    overflow: hidden;
    border-radius: 16px;
}

body.wm-layout .table thead th,
body.du-app .table thead th {
    border-bottom: 0;
    background: rgba(26, 47, 80, 0.08);
    color: var(--wm-secondary, #1a2f50);
    font-weight: 900;
}

body.du-app .table thead th {
    color: var(--du-secondary, #1a2f50);
}

body.wm-layout .table-bordered th,
body.wm-layout .table-bordered td,
body.du-app .table-bordered th,
body.du-app .table-bordered td {
    border-color: rgba(26, 47, 80, 0.1);
}

body.du-app .table-hover tbody tr:hover,
body.wm-layout .table-hover tbody tr:hover {
    background: rgba(163, 16, 48, 0.045);
}

body.wm-layout .pagination .page-link,
body.du-app .pagination .page-link {
    margin-inline: 2px;
    border: 1px solid rgba(26, 47, 80, 0.12);
    border-radius: 10px;
    color: var(--wm-secondary, #1a2f50);
    font-weight: 800;
}

body.du-app .pagination .page-link {
    color: var(--du-secondary, #1a2f50);
}

body.wm-layout .pagination .page-item.active .page-link,
body.du-app .pagination .page-item.active .page-link {
    border-color: transparent;
    background: #a31030;
}

body.wm-layout .modal-content,
body.du-app .modal-content {
    overflow: hidden;
    border: 1px solid rgba(26, 47, 80, 0.08);
    border-radius: 22px;
    box-shadow: 0 26px 74px rgba(26, 47, 80, 0.2);
}

body.wm-layout .modal-header,
body.du-app .modal-header {
    border-bottom: 1px solid rgba(26, 47, 80, 0.1);
    background: linear-gradient(135deg, rgba(26, 47, 80, 0.055) 0%, rgba(163, 16, 48, 0.055) 100%);
}

body.du-app .dataTables_wrapper .dataTables_filter input,
body.du-app .dataTables_wrapper .dataTables_length select {
    border: 1px solid rgba(26, 47, 80, 0.16);
    border-radius: 12px;
    padding: 0.4rem 0.7rem;
}

body.du-app table.dataTable thead th,
body.du-app table.dataTable thead td {
    border-bottom: 2px solid rgba(163, 16, 48, 0.18);
}

/* Smart professional form system */
body.wm-layout .form-group,
body.du-app .form-group {
    position: relative;
}

body.wm-layout label,
body.du-app label {
    color: var(--wm-ink, #142033);
    font-weight: 800;
}

body.du-app label {
    color: var(--du-ink, #162236);
}

body.wm-layout .form-control,
body.wm-layout .custom-select,
body.wm-layout select.form-control,
body.du-app .form-control,
body.du-app .custom-select,
body.du-app select.form-control,
body.wm-layout textarea.form-control,
body.du-app textarea.form-control {
    min-height: 46px;
    border: 1px solid rgba(26, 47, 80, 0.14);
    border-radius: 14px;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(135deg, rgba(26, 47, 80, 0.14), rgba(163, 16, 48, 0.1)) border-box;
    color: #162236;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(26, 47, 80, 0.035);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

body.wm-layout textarea.form-control,
body.du-app textarea.form-control {
    min-height: 110px;
}

body.wm-layout .form-control:hover,
body.wm-layout .custom-select:hover,
body.du-app .form-control:hover,
body.du-app .custom-select:hover {
    border-color: rgba(26, 47, 80, 0.24);
}

body.wm-layout .form-control:focus,
body.wm-layout .custom-select:focus,
body.du-app .form-control:focus,
body.du-app .custom-select:focus {
    border-color: rgba(163, 16, 48, 0.58);
    box-shadow: 0 0 0 4px rgba(163, 16, 48, 0.12), 0 14px 28px rgba(26, 47, 80, 0.07);
    transform: translateY(-1px);
}

body.wm-layout .form-control::placeholder,
body.du-app .form-control::placeholder {
    color: rgba(102, 116, 135, 0.78);
    font-weight: 600;
}

body.wm-layout .input-group,
body.du-app .input-group {
    border-radius: 15px;
}

body.wm-layout .input-group-text,
body.du-app .input-group-text {
    border-color: rgba(26, 47, 80, 0.12);
    border-radius: 14px;
    background: rgba(26, 47, 80, 0.06);
    color: #a31030;
    font-weight: 900;
}

body.wm-layout .is-invalid,
body.du-app .is-invalid,
body.wm-layout .form-control.is-invalid,
body.du-app .form-control.is-invalid {
    border-color: rgba(220, 53, 69, 0.7) !important;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
}

body.wm-layout .invalid-feedback,
body.du-app .invalid-feedback {
    color: #b42335;
    font-size: 0.82rem;
    font-weight: 800;
}

body.wm-layout .bootstrap-select.form-control,
body.du-app .bootstrap-select.form-control {
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

body.wm-layout .bootstrap-select > .dropdown-toggle,
body.du-app .bootstrap-select > .dropdown-toggle {
    min-height: 46px;
    border: 1px solid rgba(26, 47, 80, 0.14);
    border-radius: 14px;
    background: #fff;
    color: #162236;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(26, 47, 80, 0.035);
}

body.wm-layout .bootstrap-select > .dropdown-toggle:focus,
body.wm-layout .bootstrap-select.show > .dropdown-toggle,
body.du-app .bootstrap-select > .dropdown-toggle:focus,
body.du-app .bootstrap-select.show > .dropdown-toggle {
    outline: 0 !important;
    border-color: rgba(163, 16, 48, 0.58);
    box-shadow: 0 0 0 4px rgba(163, 16, 48, 0.12);
}

body.wm-layout .bootstrap-select .dropdown-menu,
body.du-app .bootstrap-select .dropdown-menu {
    overflow: hidden;
    border: 1px solid rgba(26, 47, 80, 0.1);
    border-radius: 18px;
    box-shadow: 0 22px 58px rgba(26, 47, 80, 0.16);
}

body.wm-layout .bootstrap-select .bs-searchbox,
body.du-app .bootstrap-select .bs-searchbox {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(26, 47, 80, 0.08);
}

body.wm-layout .bootstrap-select .dropdown-menu li a,
body.du-app .bootstrap-select .dropdown-menu li a {
    padding: 0.7rem 1rem;
    color: #162236;
    font-weight: 800;
}

body.wm-layout .bootstrap-select .dropdown-menu li a:hover,
body.wm-layout .bootstrap-select .dropdown-menu li.active a,
body.wm-layout .bootstrap-select .dropdown-menu li.selected a,
body.du-app .bootstrap-select .dropdown-menu li a:hover,
body.du-app .bootstrap-select .dropdown-menu li.active a,
body.du-app .bootstrap-select .dropdown-menu li.selected a {
    background: rgba(163, 16, 48, 0.09);
    color: #a31030;
}

/* Smart tables and DataTables */
body.wm-layout .table-responsive,
body.du-app .table-responsive,
body.du-app ._datatable_table_parent {
    border-radius: 20px;
    scrollbar-color: rgba(163, 16, 48, 0.45) rgba(26, 47, 80, 0.08);
}

body.wm-layout table.table,
body.du-app table.table,
body.du-app ._datatable_table_parent table,
body.du-app table.dataTable {
    overflow: hidden;
    margin-bottom: 0;
    border-collapse: separate !important;
    border-spacing: 0;
    border-radius: 18px;
    background: #fff;
}

body.wm-layout table.table thead th,
body.du-app table.table thead th,
body.du-app ._datatable_table_parent table thead td,
body.du-app table.dataTable thead th {
    padding: 0.95rem 1rem;
    border: 0 !important;
    background: linear-gradient(135deg, #172842 0%, #243d63 100%) !important;
    color: #fff !important;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    vertical-align: middle;
}

body.wm-layout table.table tbody td,
body.du-app table.table tbody td,
body.du-app ._datatable_table_parent table tbody td,
body.du-app table.dataTable tbody td {
    padding: 0.85rem 1rem;
    border-top: 1px solid rgba(26, 47, 80, 0.075) !important;
    border-right: 0 !important;
    border-left: 0 !important;
    color: #1d2a3d;
    font-weight: 700;
    vertical-align: middle;
}

body.wm-layout table.table tbody tr,
body.du-app table.table tbody tr,
body.du-app ._datatable_table_parent table tbody tr,
body.du-app table.dataTable tbody tr {
    transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

body.wm-layout table.table tbody tr:nth-child(even),
body.du-app table.table tbody tr:nth-child(even),
body.du-app ._datatable_table_parent table tbody tr:nth-child(even),
body.du-app table.dataTable tbody tr:nth-child(even) {
    background: rgba(26, 47, 80, 0.025);
}

body.wm-layout table.table-hover tbody tr:hover,
body.du-app table.table-hover tbody tr:hover,
body.du-app ._datatable_table_parent table tbody tr:hover,
body.du-app table.dataTable.hover tbody tr:hover,
body.du-app table.dataTable.display tbody tr:hover {
    background: rgba(163, 16, 48, 0.055) !important;
    box-shadow: inset 4px 0 0 #a31030;
}

body.du-app[dir="rtl"] table.table-hover tbody tr:hover,
body.du-app[dir="rtl"] ._datatable_table_parent table tbody tr:hover,
body.wm-layout[dir="rtl"] table.table-hover tbody tr:hover {
    box-shadow: inset -4px 0 0 #a31030;
}

body.du-app ._datatable_wrapper {
    width: 100%;
}

body.du-app ._datatable_table_parent {
    overflow: hidden;
    border: 1px solid rgba(26, 47, 80, 0.09);
    background: #fff !important;
    box-shadow: 0 18px 46px rgba(26, 47, 80, 0.08);
}

body.du-app ._datatable_table_search {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    padding: 0.9rem !important;
    border-bottom: 1px solid rgba(26, 47, 80, 0.09);
    background:
        radial-gradient(circle at 100% 0%, rgba(163, 16, 48, 0.08), transparent 18rem),
        #fff !important;
}

body.du-app ._datatable_table_search .btn,
body.du-app .dt-buttons .dt-button,
body.du-app button.dt-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px solid rgba(163, 16, 48, 0.18) !important;
    border-radius: 13px !important;
    background: rgba(163, 16, 48, 0.08) !important;
    color: #a31030 !important;
    font-weight: 900;
    box-shadow: none !important;
}

body.du-app ._datatable_table_search .btn:hover,
body.du-app .dt-buttons .dt-button:hover,
body.du-app button.dt-button:hover {
    border-color: #a31030 !important;
    background: #a31030 !important;
    color: #fff !important;
}

body.du-app ._datatable_table_search input,
body.du-app ._datatable_table_search select,
body.du-app .dataTables_wrapper .dataTables_filter input,
body.du-app .dataTables_wrapper .dataTables_length select {
    min-height: 40px;
    border: 1px solid rgba(26, 47, 80, 0.14) !important;
    border-radius: 13px !important;
    background: #fff !important;
    color: #162236 !important;
    font-weight: 800;
}

body.du-app ._datatable_table_search input,
body.du-app .dataTables_wrapper .dataTables_filter input {
    min-width: min(100%, 260px);
    padding-inline: 0.85rem;
}

body.du-app ._datatable_table_search select,
body.du-app .dataTables_wrapper .dataTables_length select {
    padding-inline: 0.6rem;
}

body.du-app .dataTables_wrapper {
    overflow: hidden;
    padding: 1rem;
    border: 1px solid rgba(26, 47, 80, 0.09);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(26, 47, 80, 0.08);
}

body.du-app .dataTables_wrapper .dataTables_length,
body.du-app .dataTables_wrapper .dataTables_filter,
body.du-app .dataTables_wrapper .dataTables_info,
body.du-app .dataTables_wrapper .dataTables_paginate {
    color: #667487 !important;
    font-weight: 800;
}

body.du-app .dataTables_wrapper .dataTables_paginate .paginate_button {
    min-width: 36px;
    min-height: 36px;
    margin-inline: 2px;
    border: 1px solid rgba(26, 47, 80, 0.12) !important;
    border-radius: 12px !important;
    color: #1a2f50 !important;
    font-weight: 900;
}

body.du-app .dataTables_wrapper .dataTables_paginate .paginate_button.current,
body.du-app .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    border-color: #a31030 !important;
    background: #a31030 !important;
    color: #fff !important;
}

body.du-app .paginationNav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.85rem;
}

body.du-app .paginationNav a,
body.du-app .paginationNav .prev,
body.du-app .paginationNav .next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    border: 1px solid rgba(26, 47, 80, 0.12) !important;
    border-radius: 12px;
    background: #fff !important;
    color: #1a2f50 !important;
    font-weight: 900;
}

body.du-app .paginationNav a:hover,
body.du-app .paginationNav a.current,
body.du-app .paginationNav .prev.active,
body.du-app .paginationNav .next.active {
    border-color: #a31030 !important;
    background: #a31030 !important;
    color: #fff !important;
}

body.du-app ._sort-dropdown {
    color: rgba(255, 255, 255, 0.72) !important;
}

body.du-app ._sort-dropdown-menu {
    overflow: hidden;
    border: 1px solid rgba(26, 47, 80, 0.1);
    border-radius: 14px;
    box-shadow: 0 18px 42px rgba(26, 47, 80, 0.14);
}

body.du-app ._sort-dropdown-menu .dropdown-item {
    font-weight: 800;
}

body.du-app ._sort-dropdown-menu .dropdown-item:hover {
    background: rgba(163, 16, 48, 0.08);
    color: #a31030;
}

/* Smart reusable UI components */
body.wm-layout .card,
body.du-app .card,
body.wm-layout .d-card,
body.du-app .d-card,
body.wm-layout .panel,
body.du-app .panel,
body.wm-layout .box,
body.du-app .box {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(26, 47, 80, 0.09);
    border-radius: 22px;
    background:
        radial-gradient(circle at 100% 0%, rgba(163, 16, 48, 0.045), transparent 16rem),
        rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 48px rgba(26, 47, 80, 0.09);
}

body.wm-layout .card::before,
body.du-app .card::before,
body.wm-layout .d-card::before,
body.du-app .d-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, rgba(163, 16, 48, 0.9), rgba(26, 47, 80, 0.9));
    opacity: 0.85;
}

body.wm-layout .card-body,
body.du-app .card-body {
    position: relative;
    z-index: 1;
}

body.wm-layout .card-header,
body.du-app .card-header,
body.wm-layout .card-footer,
body.du-app .card-footer {
    position: relative;
    z-index: 1;
    border-color: rgba(26, 47, 80, 0.09);
    background: rgba(248, 250, 252, 0.82);
}

body.wm-layout .btn,
body.du-app .btn,
body.wm-layout button,
body.du-app button {
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

body.wm-layout .btn:hover,
body.du-app .btn:hover {
    transform: translateY(-1px);
}

body.wm-layout .btn-light,
body.du-app .btn-light,
body.wm-layout .btn-default,
body.du-app .btn-default {
    border-color: rgba(26, 47, 80, 0.1);
    background: #fff;
    color: #1a2f50;
    box-shadow: 0 10px 22px rgba(26, 47, 80, 0.07);
}

body.wm-layout .btn-danger,
body.du-app .btn-danger,
body.wm-layout .r-btn-danger,
body.du-app .r-btn-danger,
body.wm-layout .background-red-color,
body.du-app .background-red-color {
    border-color: transparent !important;
    background: linear-gradient(135deg, #a31030 0%, #cf2d4e 100%) !important;
    color: #fff !important;
    box-shadow: 0 14px 30px rgba(163, 16, 48, 0.28);
}

body.wm-layout .btn-success,
body.du-app .btn-success {
    border-color: transparent !important;
    background: linear-gradient(135deg, #12834c 0%, #22c55e 100%) !important;
    color: #fff !important;
}

body.wm-layout .btn-warning,
body.du-app .btn-warning {
    border-color: transparent !important;
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
    color: #fff !important;
}

body.wm-layout .btn-info,
body.du-app .btn-info {
    border-color: transparent !important;
    background: linear-gradient(135deg, #0f6e91 0%, #22a7d6 100%) !important;
    color: #fff !important;
}

body.wm-layout .badge,
body.du-app .badge,
body.wm-layout .status-badge,
body.du-app .status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 24px;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    font-weight: 900;
    letter-spacing: 0.01em;
}

body.wm-layout .badge-primary,
body.du-app .badge-primary,
body.wm-layout .badge-danger,
body.du-app .badge-danger {
    background: rgba(163, 16, 48, 0.1);
    color: #a31030;
}

body.wm-layout .badge-secondary,
body.du-app .badge-secondary {
    background: rgba(26, 47, 80, 0.1);
    color: #1a2f50;
}

body.wm-layout .badge-success,
body.du-app .badge-success {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

body.wm-layout .badge-warning,
body.du-app .badge-warning {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

body.wm-layout .alert,
body.du-app .alert {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(26, 47, 80, 0.09);
    border-radius: 18px;
    background: #fff;
    color: #25364d;
    font-weight: 800;
    box-shadow: 0 14px 34px rgba(26, 47, 80, 0.08);
}

body.wm-layout .alert::before,
body.du-app .alert::before {
    content: '';
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 5px;
    background: #1a2f50;
}

body.wm-layout .alert-success::before,
body.du-app .alert-success::before {
    background: #22c55e;
}

body.wm-layout .alert-warning::before,
body.du-app .alert-warning::before {
    background: #f59e0b;
}

body.wm-layout .alert-danger::before,
body.du-app .alert-danger::before {
    background: #a31030;
}

body.wm-layout .alert-info::before,
body.du-app .alert-info::before {
    background: #22a7d6;
}

body.wm-layout .nav-tabs,
body.du-app .nav-tabs,
body.wm-layout .nav-pills,
body.du-app .nav-pills {
    gap: 0.45rem;
    border: 0;
    padding: 0.45rem;
    border-radius: 18px;
    background: rgba(26, 47, 80, 0.055);
}

body.wm-layout .nav-tabs .nav-link,
body.du-app .nav-tabs .nav-link,
body.wm-layout .nav-pills .nav-link,
body.du-app .nav-pills .nav-link {
    border: 0 !important;
    border-radius: 14px !important;
    color: #1a2f50;
    font-weight: 900;
}

body.wm-layout .nav-tabs .nav-link.active,
body.du-app .nav-tabs .nav-link.active,
body.wm-layout .nav-pills .nav-link.active,
body.du-app .nav-pills .nav-link.active {
    color: #fff !important;
    background: linear-gradient(135deg, #a31030 0%, #c92749 100%) !important;
    box-shadow: 0 12px 24px rgba(163, 16, 48, 0.22);
}

body.wm-layout .dropdown-menu,
body.du-app .dropdown-menu {
    overflow: hidden;
    padding: 0.45rem;
    border: 1px solid rgba(26, 47, 80, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 64px rgba(26, 47, 80, 0.18);
}

body.wm-layout .dropdown-item,
body.du-app .dropdown-item {
    border-radius: 12px;
    color: #172842;
    font-weight: 800;
}

body.wm-layout .dropdown-item:hover,
body.wm-layout .dropdown-item:focus,
body.du-app .dropdown-item:hover,
body.du-app .dropdown-item:focus {
    background: rgba(163, 16, 48, 0.08);
    color: #a31030;
}

body.wm-layout .breadcrumb,
body.du-app .breadcrumb {
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(26, 47, 80, 0.09);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 28px rgba(26, 47, 80, 0.06);
}

body.wm-layout .breadcrumb-item,
body.du-app .breadcrumb-item {
    color: #667487;
    font-weight: 800;
}

body.wm-layout .breadcrumb-item a,
body.du-app .breadcrumb-item a {
    color: #a31030;
    font-weight: 900;
}

body.wm-layout .list-group,
body.du-app .list-group {
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(26, 47, 80, 0.08);
}

body.wm-layout .list-group-item,
body.du-app .list-group-item {
    border-color: rgba(26, 47, 80, 0.08);
    color: #26364d;
    font-weight: 800;
}

body.wm-layout .list-group-item.active,
body.du-app .list-group-item.active {
    border-color: transparent;
    background: linear-gradient(135deg, #a31030 0%, #1a2f50 100%);
}

body.wm-layout .progress,
body.du-app .progress {
    overflow: hidden;
    height: 0.75rem;
    border-radius: 999px;
    background: rgba(26, 47, 80, 0.08);
}

body.wm-layout .progress-bar,
body.du-app .progress-bar {
    border-radius: inherit;
    background: linear-gradient(90deg, #a31030 0%, #d74462 100%);
}

body.wm-layout .custom-control-input:checked ~ .custom-control-label::before,
body.du-app .custom-control-input:checked ~ .custom-control-label::before {
    border-color: #a31030;
    background-color: #a31030;
}

body.wm-layout input[type="checkbox"],
body.wm-layout input[type="radio"],
body.du-app input[type="checkbox"],
body.du-app input[type="radio"] {
    accent-color: #a31030;
}

body.wm-layout .custom-file-label,
body.du-app .custom-file-label {
    min-height: 46px;
    border: 1px solid rgba(26, 47, 80, 0.14);
    border-radius: 14px;
    color: #667487;
    font-weight: 800;
}

body.wm-layout .custom-file-label::after,
body.du-app .custom-file-label::after {
    height: 100%;
    border: 0;
    border-radius: 0 14px 14px 0;
    background: #1a2f50;
    color: #fff;
    font-weight: 900;
}

body.wm-layout .empty-state,
body.du-app .empty-state,
body.wm-layout .no-data,
body.du-app .no-data {
    border: 1px dashed rgba(26, 47, 80, 0.16);
    border-radius: 22px;
    background:
        radial-gradient(circle at center, rgba(163, 16, 48, 0.06), transparent 18rem),
        rgba(255, 255, 255, 0.72);
}

body.wm-layout ::selection,
body.du-app ::selection {
    background: rgba(163, 16, 48, 0.22);
    color: #1a2f50;
}

body.wm-layout *::-webkit-scrollbar,
body.du-app *::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

body.wm-layout *::-webkit-scrollbar-track,
body.du-app *::-webkit-scrollbar-track {
    background: rgba(26, 47, 80, 0.06);
    border-radius: 999px;
}

body.wm-layout *::-webkit-scrollbar-thumb,
body.du-app *::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: linear-gradient(135deg, #a31030 0%, #1a2f50 100%) padding-box;
}

body.wm-layout[dir="rtl"] .alert::before,
body.du-app[dir="rtl"] .alert::before {
    inset-inline-start: auto;
    inset-inline-end: 0;
}

body.wm-layout[dir="rtl"] .custom-file-label::after,
body.du-app[dir="rtl"] .custom-file-label::after {
    border-radius: 14px 0 0 14px;
}

/* Professional modal system */
body.wm-layout .modal-backdrop.show,
body.du-app .modal-backdrop.show {
    opacity: 0.68;
    background:
        radial-gradient(circle at 24% 18%, rgba(163, 16, 48, 0.28), transparent 28rem),
        linear-gradient(135deg, rgba(9, 15, 27, 0.92), rgba(26, 47, 80, 0.88));
    backdrop-filter: blur(6px);
}

body.wm-layout .modal,
body.du-app .modal {
    padding-inline: 0.75rem !important;
}

body.wm-layout .modal-dialog,
body.du-app .modal-dialog {
    margin-top: clamp(1.25rem, 5vh, 3.5rem);
    margin-bottom: clamp(1.25rem, 5vh, 3.5rem);
}

body.wm-layout .modal.fade .modal-dialog,
body.du-app .modal.fade .modal-dialog {
    transform: translateY(18px) scale(0.98);
    transition: transform 0.24s ease-out, opacity 0.24s ease-out;
}

body.wm-layout .modal.show .modal-dialog,
body.du-app .modal.show .modal-dialog {
    transform: translateY(0) scale(1);
}

body.wm-layout .modal-content,
body.du-app .modal-content {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.96) 100%);
    box-shadow:
        0 34px 95px rgba(9, 15, 27, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
}

body.wm-layout .modal-content::before,
body.du-app .modal-content::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, #a31030 0%, #d74462 48%, #1a2f50 100%);
}

body.wm-layout .modal-header,
body.du-app .modal-header {
    position: relative;
    align-items: center;
    gap: 1rem;
    min-height: 72px;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(26, 47, 80, 0.09);
    background:
        radial-gradient(circle at 100% 0%, rgba(163, 16, 48, 0.1), transparent 18rem),
        linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(245, 247, 251, 0.92) 100%) !important;
}

body.wm-layout .modal-title,
body.du-app .modal-title {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0;
    color: #1a2f50;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-weight: 900;
    letter-spacing: -0.025em;
}

body.wm-layout .modal-title i,
body.du-app .modal-title i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 13px;
    background: rgba(163, 16, 48, 0.09);
    color: #a31030;
}

body.wm-layout .modal-header .close,
body.du-app .modal-header .close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0;
    margin-inline-start: auto;
    padding: 0;
    border: 1px solid rgba(26, 47, 80, 0.1);
    border-radius: 14px;
    background: #fff;
    color: #1a2f50;
    font-size: 1.35rem;
    line-height: 1;
    opacity: 1;
    text-shadow: none;
    box-shadow: 0 10px 22px rgba(26, 47, 80, 0.08);
}

body.wm-layout .modal-header .close:hover,
body.du-app .modal-header .close:hover {
    border-color: rgba(163, 16, 48, 0.2);
    background: rgba(163, 16, 48, 0.09);
    color: #a31030;
    transform: rotate(90deg);
}

body.wm-layout .modal-body,
body.du-app .modal-body {
    padding: 1.5rem;
    color: #26364d;
    font-weight: 700;
    line-height: 1.75;
}

body.wm-layout .modal-body.text-center,
body.du-app .modal-body.text-center {
    padding-block: 2rem;
}

body.wm-layout .modal-footer,
body.du-app .modal-footer {
    gap: 0.65rem;
    padding: 1rem 1.5rem 1.35rem;
    border-top: 1px solid rgba(26, 47, 80, 0.09);
    background: rgba(248, 250, 252, 0.72);
}

body.wm-layout .modal-footer .btn,
body.du-app .modal-footer .btn {
    min-height: 42px;
    padding-inline: 1.1rem;
    border-radius: 14px;
}

body.wm-layout .modal .form-control,
body.wm-layout .modal .custom-select,
body.du-app .modal .form-control,
body.du-app .modal .custom-select {
    background-color: #fff;
}

body.wm-layout .modal .table-responsive,
body.du-app .modal .table-responsive {
    border: 1px solid rgba(26, 47, 80, 0.08);
    border-radius: 18px;
    background: #fff;
}

body.wm-layout .modal .spinner-border,
body.wm-layout .modal .spinner-grow,
body.du-app .modal .spinner-border,
body.du-app .modal .spinner-grow {
    color: #a31030;
}

body.wm-layout #LoadingModal .modal-content,
body.du-app #LoadingModal .modal-content {
    text-align: center;
}

body.wm-layout #LoadingModal .modal-body,
body.du-app #LoadingModal .modal-body {
    color: #a31030 !important;
}

body.wm-layout #MsgPrintModal .modal-content,
body.du-app #MsgPrintModal .modal-content {
    border-color: rgba(163, 16, 48, 0.16);
}

body.wm-layout #MsgPrintModal .modal-body,
body.du-app #MsgPrintModal .modal-body {
    color: #a31030 !important;
    font-size: clamp(1.6rem, 4vw, 2.5rem) !important;
    font-weight: 900 !important;
    letter-spacing: -0.035em;
}

body.wm-layout #GlobalDataModal .modal-body,
body.du-app #GlobalDataModal .modal-body {
    color: #667487 !important;
}

body.wm-layout .modal .alert,
body.du-app .modal .alert {
    border-radius: 18px;
}

body.wm-layout[dir="rtl"] .modal,
body.du-app[dir="rtl"] .modal {
    direction: rtl;
    text-align: right;
}

body.wm-layout[dir="rtl"] .modal-header .close,
body.du-app[dir="rtl"] .modal-header .close {
    margin-inline-start: 0;
    margin-inline-end: auto;
}

body.wm-layout[dir="rtl"] .modal-content::before,
body.du-app[dir="rtl"] .modal-content::before {
    background: linear-gradient(270deg, #a31030 0%, #d74462 48%, #1a2f50 100%);
}

@media (max-width: 575.98px) {
    body.wm-layout .modal,
    body.du-app .modal {
        padding-inline: 0.45rem !important;
    }

    body.wm-layout .modal-content,
    body.du-app .modal-content {
        border-radius: 22px;
    }

    body.wm-layout .modal-header,
    body.du-app .modal-header,
    body.wm-layout .modal-body,
    body.du-app .modal-body,
    body.wm-layout .modal-footer,
    body.du-app .modal-footer {
        padding-inline: 1rem;
    }

    body.wm-layout .modal-footer,
    body.du-app .modal-footer {
        align-items: stretch;
        flex-direction: column;
    }

    body.wm-layout .modal-footer .btn,
    body.du-app .modal-footer .btn {
        width: 100%;
    }
}

/* RTL and responsive details */
body.wm-layout[dir="rtl"],
body.du-app[dir="rtl"] {
    text-align: right;
}

body.wm-layout[dir="rtl"] .hero-actions,
body.wm-layout[dir="rtl"] .hero-buttons,
body.wm-layout[dir="rtl"] .coverage-actions,
body.wm-layout[dir="rtl"] .cta-actions,
body.wm-layout[dir="rtl"] .cta-feature,
body.wm-layout[dir="rtl"] .coverage-feature,
body.wm-layout[dir="rtl"] .table-title,
body.wm-layout[dir="rtl"] .card-title {
    direction: rtl;
}

body.wm-layout[dir="rtl"] .modern-prices-table,
body.wm-layout[dir="rtl"] .tracking-card,
body.wm-layout[dir="rtl"] .results-card {
    direction: rtl;
}

body.wm-layout[dir="rtl"] .timeline-date,
body.wm-layout[dir="rtl"] .detail-item {
    direction: rtl;
}

body.du-app[dir="rtl"] .d-card .d-card-heading .d-content,
body.du-app[dir="rtl"] .frm-header .content,
body.du-app[dir="rtl"] .dataTables_wrapper {
    direction: rtl;
}

@media (max-width: 991.98px) {
    body.wm-layout .modern-hero.image-hero .hero-content {
        padding: 5rem 0 4rem;
    }

    body.wm-layout .hero-stats {
        grid-template-columns: 1fr;
        max-width: 22rem;
    }

    body.wm-layout .tracking-card {
        margin-top: -4rem;
    }

    body.wm-layout .tracking-illustration {
        margin-top: 2rem;
    }
}

@media (max-width: 767.98px) {
    body.wm-layout .home-prices-section,
    body.wm-layout .modern-features,
    body.wm-layout .modern-coverage,
    body.wm-layout .tracking-form-section,
    body.wm-layout .tracking-results-section {
        padding: 3.5rem 0;
    }

    body.wm-layout .modern-hero .hero-title,
    body.wm-layout .track-hero .hero-title {
        letter-spacing: -0.045em;
    }

    body.wm-layout .modern-hero.image-hero::before {
        background:
            linear-gradient(180deg, rgba(10, 18, 31, 0.92) 0%, rgba(13, 23, 40, 0.74) 72%, rgba(13, 23, 40, 0.52) 100%),
            radial-gradient(circle at 18% 24%, rgba(163, 16, 48, 0.34), transparent 18rem);
    }

    body.wm-layout .hero-actions .btn,
    body.wm-layout .hero-buttons .btn,
    body.wm-layout .coverage-actions .btn,
    body.wm-layout .cta-actions .btn {
        width: 100%;
    }

    body.wm-layout .cta-content,
    body.wm-layout .coverage-visual,
    body.wm-layout .tracking-card .card-body,
    body.wm-layout .results-card .card-body {
        padding: 1.2rem;
    }

    body.wm-layout .tracking-form .input-group {
        display: block;
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    body.wm-layout .shipment-input,
    body.wm-layout[dir="rtl"] .shipment-input {
        height: 54px;
        margin-bottom: 0.75rem;
        border: 1px solid rgba(26, 47, 80, 0.16);
        border-radius: 16px;
        background: #fff;
    }

    body.wm-layout .track-btn {
        width: 100%;
        height: 52px;
    }

    body.wm-layout .modern-tabs {
        align-items: stretch;
        flex-direction: column;
        border-radius: 20px;
    }

    body.wm-layout .modern-tabs .nav-link {
        justify-content: center;
    }

    body.wm-layout .detail-item {
        align-items: flex-start;
        flex-direction: column;
    }
}
