html, body {
    direction: ltr !important;
    text-align: left !important;
}

input, select, textarea, .form-control, .form-select, .table {
    direction: ltr !important;
    text-align: left !important;
}

.sidebar-glass, .content-zone, .topbar-glass, .page-wrapper, .mobile-menu-canvas,
.menu-stack, .brand-box, .topbar-main, .topbar-actions {
    direction: ltr !important;
    text-align: left !important;
}

.menu-stack .nav-link { flex-direction: row !important; }
.menu-stack .nav-link i { margin-left: 0 !important; margin-right: .65rem !important; }

.brand-box, .brand-link, .topbar-main, .topbar-actions, .currency-chip, .brand-chip {
    flex-direction: row !important;
}

.sidebar-footer .nav-link i { margin-left: 0 !important; margin-right: .65rem !important; }

.offcanvas-start {
    left: 0;
    right: auto;
    transform: translateX(-100%);
}
.offcanvas-start.show { transform: none; }

.table th, .table td { text-align: left; }
.text-end { text-align: right !important; }
.text-start { text-align: left !important; }
canvas { max-width: 100%; }

.cw-dashboard-page, .cw-form-page { width: 100%; }

.cw-hero-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.25rem;
    border-radius: 28px;
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(0, 154, 154, .14);
    box-shadow: 0 24px 60px rgba(0, 88, 93, .08);
    backdrop-filter: blur(18px);
}

.cw-eyebrow {
    display: inline-flex;
    margin-bottom: .35rem;
    font-size: .78rem;
    font-weight: 800;
    color: #008b88;
}

.cw-hero-card h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.65rem);
    font-weight: 800;
    letter-spacing: -.04em;
    color: #12343b;
}

.cw-hero-card p {
    margin: .35rem 0 0;
    color: #607882;
}

.cw-filter-inline {
    display: flex;
    align-items: end;
    gap: .75rem;
    flex-wrap: wrap;
}

.cw-filter-inline label {
    display: block;
    margin-bottom: .25rem;
    font-size: .78rem;
    color: #557078;
    font-weight: 700;
}

.cw-filter-inline input {
    min-width: 145px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(0, 154, 154, .18);
    padding: .5rem .75rem;
    background: #fff;
}

.cw-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.cw-kpi-grid-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cw-kpi-card {
    padding: 1.15rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(0, 154, 154, .14);
    box-shadow: 0 18px 48px rgba(0, 88, 93, .07);
}

.cw-kpi-card span {
    display: block;
    color: #68808a;
    font-size: .8rem;
    font-weight: 700;
}

.cw-kpi-card strong {
    display: block;
    margin-top: .5rem;
    font-size: 1.25rem;
    color: #0c3339;
    font-weight: 900;
}

.cw-panel {
    padding: 1.15rem;
    margin-bottom: 1.25rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, .86);
    border: 1px solid rgba(0, 154, 154, .14);
    box-shadow: 0 18px 48px rgba(0, 88, 93, .07);
}

.cw-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .85rem;
    gap: 1rem;
}

.cw-panel-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 850;
    color: #12343b;
}

.cw-muted {
    color: #68808a;
    font-size: .85rem;
}

.cw-responsive-table {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cw-table {
    margin: 0;
    min-width: 980px;
    overflow: hidden;
    border-radius: 18px;
}

.cw-table thead th {
    color: #0c3339;
    font-size: .82rem;
    background: rgba(0, 170, 170, .06);
    border-bottom: 1px solid rgba(0, 154, 154, .12);
    white-space: nowrap;
}

.cw-table tbody td {
    border-color: rgba(0, 154, 154, .09);
    color: #2b4149;
    vertical-align: middle;
}

.cw-table-sub {
    margin-top: .2rem;
    color: #7b929a;
    font-size: .82rem;
}

.cw-services-text {
    display: inline-block;
    max-width: 280px;
    white-space: normal;
    color: #2b4149;
}

.cw-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .4rem;
    flex-wrap: nowrap;
}

.cw-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: .2rem .65rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 800;
}

.cw-status.active {
    background: rgba(0, 160, 120, .1);
    color: #007b66;
}

.cw-status.inactive {
    background: rgba(239, 68, 68, .1);
    color: #c92c2c;
}

.cw-polished-form { display: grid; gap: 1rem; }

.cw-form-section {
    padding: 1.25rem;
    border-radius: 26px;
    background: rgba(255, 255, 255, .86);
    border: 1px solid rgba(0, 154, 154, .14);
    box-shadow: 0 18px 48px rgba(0, 88, 93, .07);
}

.cw-section-title {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.cw-section-title > span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    border-radius: 16px;
    background: linear-gradient(135deg, #dffbfa, #ffffff);
    color: #008b88;
    font-weight: 900;
    border: 1px solid rgba(0, 154, 154, .16);
}

.cw-section-title h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 850;
    color: #12343b;
}

.cw-section-title p {
    margin: .2rem 0 0;
    color: #68808a;
    font-size: .9rem;
}

.cw-input-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.cw-field label {
    display: block;
    margin-bottom: .4rem;
    font-weight: 750;
    color: #244b53;
}

.cw-field small {
    color: #7b929a;
    font-weight: 500;
}

.cw-input {
    width: 100%;
    min-height: 48px;
    padding: .7rem .9rem;
    border-radius: 16px;
    border: 1px solid rgba(0, 154, 154, .18);
    background: rgba(255, 255, 255, .95);
    outline: none;
    transition: .18s ease;
}

.cw-input:focus {
    border-color: #00aead;
    box-shadow: 0 0 0 4px rgba(0, 174, 173, .12);
}

textarea.cw-input {
    min-height: 110px;
    resize: vertical;
}

.cw-service-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

.cw-service-tile {
    position: relative;
    display: flex;
    gap: .65rem;
    align-items: flex-start;
    min-height: 92px;
    padding: .95rem;
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(0, 154, 154, .15);
    cursor: pointer;
    transition: .18s ease;
}

.cw-service-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(0, 88, 93, .08);
}

.cw-service-tile input {
    width: 18px;
    height: 18px;
    margin-top: .2rem;
}

.cw-service-tile strong {
    display: block;
    color: #12343b;
    font-size: .95rem;
}

.cw-service-tile small {
    display: block;
    margin-top: .35rem;
    color: #009c99;
    font-weight: 900;
}

.cw-submit-bar {
    position: sticky;
    bottom: 1rem;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 24px;
    background: rgba(18, 38, 48, .96);
    color: #fff;
    box-shadow: 0 22px 60px rgba(18, 38, 48, .25);
    backdrop-filter: blur(18px);
}

.cw-submit-bar span {
    display: block;
    color: rgba(255, 255, 255, .7);
}

.cw-submit-bar strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 900;
}

@media (max-width: 1200px) {
    .cw-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cw-service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .cw-hero-card, .cw-submit-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .cw-filter-inline, .cw-input-grid, .cw-service-grid, .cw-kpi-grid, .cw-kpi-grid-compact {
        grid-template-columns: 1fr;
        display: grid;
    }

    .cw-filter-inline, .cw-filter-inline input, .cw-filter-inline button { width: 100%; }

    .cw-submit-bar { bottom: .5rem; }

    .cw-panel {
        padding: .85rem;
        border-radius: 20px;
    }

    .cw-responsive-table { overflow: visible; }
    .cw-table { min-width: 0; width: 100%; }

    .cw-table thead { display: none; }
    .cw-table, .cw-table tbody, .cw-table tr, .cw-table td {
        display: block;
        width: 100%;
    }

    .cw-table tr {
        margin-bottom: .85rem;
        padding: .85rem;
        border-radius: 18px;
        background: #fff;
        border: 1px solid rgba(0, 154, 154, .12);
        box-shadow: 0 10px 28px rgba(0, 88, 93, .05);
    }

    .cw-table td {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        border: 0;
        padding: .45rem 0;
        text-align: right !important;
    }

    .cw-table td::before {
        content: attr(data-label);
        font-weight: 800;
        color: #557078;
        text-align: left;
    }

    .cw-row-actions {
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .cw-services-text {
        max-width: 170px;
        text-align: right;
    }
}
