/* Role palette is presentational; permissions remain server controlled. */
body.omid-premium {
    --role-accent: #134e82;
    --role-hover: #103f69;
    --role-soft: #edf4fa;
    --role-border: #c8dbea;
    --role-ink: #134e82;
    --role-dark: #134e82;
    --role-on: #fff;
    --role-hero: #fff;
    --role-muted: #e0ecf7;
    --role-ring: #134e8226;
    --omid-blue: var(--role-accent);
    --omid-gold: var(--role-accent);
    --omid-navy: var(--role-dark);
}
body.omid-premium[data-omid-role="user"] {
    --role-accent: #feb911;
    --role-hover: #e6a400;
    --role-soft: #fff7df;
    --role-border: #f4dda4;
    --role-ink: #765000;
    --role-dark: #feb911;
    --role-on: #302100;
    --role-hero: #302100;
    --role-muted: #513b00;
    --role-ring: #feb9112b;
}
body.omid-premium[data-omid-role="admin"] {
    --role-accent: #134e82;
    --role-hover: #103f69;
    --role-soft: #edf4fa;
    --role-border: #c8dbea;
    --role-ink: #134e82;
    --role-dark: #134e82;
    --role-on: #fff;
    --role-hero: #fff;
    --role-muted: #e0ecf7;
    --role-ring: #134e8226;
}
body.omid-premium[data-omid-role="representative"] {
    --role-accent: #7179a5;
    --role-hover: #656d96;
    --role-soft: #f0f1f8;
    --role-border: #d9dcec;
    --role-ink: #4d567e;
    --role-dark: #7179a5;
    --role-on: #080c12;
    --role-hero: #080c12;
    --role-muted: #101626;
    --role-ring: #7179a529;
}
body.omid-premium a {
    color: var(--role-ink);
}
body.omid-premium .v5-nav > a.active {
    background: var(--role-soft);
    border-color: var(--role-border);
    color: var(--role-ink);
}
body.omid-premium .v5-nav > a.active:before {
    background: var(--role-accent);
}
body.omid-premium .v5-nav > a:hover {
    background: var(--role-soft);
    color: var(--role-ink);
}
body.omid-premium .od-hero {
    background: var(--role-dark);
    border-color: var(--role-dark);
}
body.omid-premium .od-hero p,
body.omid-premium .od-hero .od-date {
    color: var(--role-muted);
}
body.omid-premium .od-hero .od-kicker {
    color: var(--role-hero);
}
body.omid-premium .od-hero .od-primary {
    background: var(--role-accent);
    border-color: var(--role-accent);
    color: var(--role-on);
}
body.omid-premium .od-hero .od-secondary {
    color: var(--role-hero);
    background: transparent;
    border-color: var(--role-muted);
}
body.omid-premium .od-card {
    border-top-color: var(--role-border);
}
body.omid-premium .od-card strong {
    color: var(--role-dark);
}
body.omid-premium .od-tag {
    background: var(--role-soft);
    color: var(--role-ink);
    border-color: var(--role-border);
}
body.omid-premium .omid-login-story {
    background: var(--role-dark);
}
body.omid-premium
    :is(
        .primary,
        .od-primary,
        button:not(.secondary):not(.nav-toggle):not(.danger):not(.compact):not(.omid-nav-scrim)
    ) {
    background: var(--role-accent);
    border-color: var(--role-accent);
    color: var(--role-on);
}
body.omid-premium
    :is(
        .primary,
        .od-primary,
        button:not(.secondary):not(.nav-toggle):not(.danger):not(.compact):not(.omid-nav-scrim)
    ):hover {
    background: var(--role-hover);
    border-color: var(--role-hover);
    color: var(--role-on);
}
body.omid-premium :is(.secondary, .od-secondary) {
    color: var(--role-ink);
    border-color: var(--role-border);
}
body.omid-premium :is(.secondary, .od-secondary):hover {
    background: var(--role-soft);
    border-color: var(--role-accent);
}
body.omid-premium :where(input, select, textarea):focus {
    border-color: var(--role-accent);
    box-shadow: 0 0 0 3px var(--role-ring);
}
body.omid-premium :focus-visible {
    outline-color: var(--role-ink);
}
body.omid-premium input:is([type="checkbox"], [type="radio"]) {
    accent-color: var(--role-ink);
}
/* Shared spacing: headings, toolbar actions and adjacent help text. */
body.omid-premium
    :is(.panel-heading, .od-heading, .panel-actions, .form-actions, .od-actions, .filter-bar) {
    gap: 16px 20px;
    row-gap: 18px;
    align-items: center;
}
body.omid-premium :is(.panel-heading, .od-heading) {
    margin-block: 0 24px;
    flex-wrap: wrap;
}
body.omid-premium :is(.panel-heading, .od-heading) > :is(h1, h2, h3, p) {
    margin: 0;
    line-height: 1.8;
}
body.omid-premium :is(.panel-heading, .od-heading) > :is(button, a, form) {
    flex-shrink: 0;
}
body.omid-premium :is(.panel, .od-panel, .wizard-body) > :is(h2, h3) {
    margin-block: 0 22px;
    line-height: 1.8;
}
body.omid-premium :is(button, .primary, .secondary, .od-primary, .od-secondary) {
    line-height: 1.7;
    gap: 9px;
    white-space: normal;
    vertical-align: middle;
}
body.omid-premium :is(button, .primary, .secondary) > svg {
    flex-shrink: 0;
}
body.omid-premium :is(p, .notice, .flash) + :is(button, .primary, .secondary) {
    margin-block-start: 16px;
}
body.omid-premium :is(button, .primary, .secondary) + :is(p, .notice, .flash) {
    margin-block-start: 18px;
}
body.omid-premium :is(h1, h2, h3) + :is(button, .primary, .secondary) {
    margin-block-start: 10px;
}
body.omid-premium :is(.panel, .od-panel) > form {
    margin-block-start: 18px;
}
body.omid-premium .filter-bar {
    padding-block: 6px 22px;
    align-items: end;
}
body.omid-premium .filter-bar > button {
    margin-block: 0;
    min-height: 46px;
}
body.omid-premium label > :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    margin-block-start: 8px;
}
body.omid-premium .checkline {
    gap: 10px;
    line-height: 1.9;
    padding-block: 10px;
    align-items: center;
}
body.omid-premium td :is(button, a.secondary, a.primary) {
    margin: 4px 3px;
    min-height: 40px;
}
body.omid-premium .v5-account {
    gap: 20px;
}
body.omid-premium .v5-account button {
    margin: 0;
}
body.omid-premium #third-wizard .wizard-actions {
    gap: 14px;
    padding-block: 22px 6px;
    margin-block: 24px 18px;
    border-top: 1px solid var(--omid-line);
}
body.omid-premium #third-wizard .wizard-actions button {
    padding: 11px 22px;
    min-height: 46px;
    margin: 0;
}
body.omid-premium #third-wizard .cii-plate-toolbar {
    gap: 14px;
    flex-wrap: wrap;
    margin-block-end: 18px;
}
body.omid-premium #third-wizard .cii-previous-policy h3 {
    margin-block-end: 22px;
}
/* Connected RTL stepper. Numbers stay inside the card; no clipped circles. */
body.omid-premium #third-wizard .wizard-steps {
    display: flex;
    align-items: stretch;
    gap: 0;
    list-style: none;
    padding: 22px 12px 18px;
    margin: 0 0 28px;
    background: #fff;
    border: 1px solid var(--omid-line);
    border-radius: 18px;
    overflow-x: auto;
    overflow-y: hidden;
    isolation: isolate;
    scrollbar-width: thin;
}
body.omid-premium #third-wizard .wizard-steps li {
    position: relative;
    display: flex;
    flex: 1 0 150px;
    min-width: 150px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 13px;
    padding: 0 12px 9px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #7c8b97;
    text-align: center;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.8;
    overflow: visible;
    z-index: 0;
}
body.omid-premium #third-wizard .wizard-steps li:not(:last-child):after {
    content: "";
    position: absolute;
    top: 19px;
    inset-inline-start: 50%;
    width: 100%;
    height: 3px;
    background: #e4eaf0;
    z-index: -1;
    border-radius: 3px;
}
body.omid-premium #third-wizard .wizard-steps li:before {
    display: none;
}
body.omid-premium #third-wizard .wizard-steps li > span {
    position: relative;
    inset: auto;
    transform: none;
    float: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    margin: 0;
    border: 2px solid #dbe3eb;
    border-radius: 50%;
    background: #fff;
    color: #738494;
    box-shadow: 0 0 0 7px #fff;
    font-size: 15px;
    line-height: 1;
    font-weight: 700;
    z-index: 1;
    overflow: visible;
}
body.omid-premium #third-wizard .wizard-steps li.complete {
    background: transparent;
    border: 0;
    color: var(--role-ink);
    font-weight: 400;
}
body.omid-premium #third-wizard .wizard-steps li.complete:after {
    background: var(--role-accent);
}
body.omid-premium #third-wizard .wizard-steps li.complete > span {
    background: var(--role-soft);
    color: var(--role-ink);
    border-color: var(--role-accent);
}
body.omid-premium #third-wizard .wizard-steps li.active {
    background: transparent;
    border: 0;
    color: var(--role-ink);
    font-weight: 700;
}
body.omid-premium #third-wizard .wizard-steps li.active > span {
    background: var(--role-accent);
    color: var(--role-on);
    border-color: var(--role-accent);
    box-shadow:
        0 0 0 5px #fff,
        0 0 0 7px var(--role-border);
}
body.omid-premium #third-wizard .omid-progress-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin: 0 2px 12px;
    font-size: 12px;
    color: var(--omid-muted);
}
body.omid-premium #third-wizard .omid-progress-caption strong {
    font-weight: 700;
    color: var(--role-ink);
}
@media (max-width: 700px) {
    body.omid-premium :is(.panel-heading, .od-heading) {
        gap: 14px;
        margin-bottom: 22px;
    }
    body.omid-premium #third-wizard .wizard-steps {
        padding: 21px 6px 15px;
        border-radius: 14px;
        margin-bottom: 22px;
        scroll-padding-inline: 18px;
    }
    body.omid-premium #third-wizard .wizard-steps li {
        flex-basis: 145px;
        min-width: 145px;
        font-size: 12px;
        padding-inline: 10px;
    }
    body.omid-premium #third-wizard .wizard-actions {
        gap: 12px;
    }
    body.omid-premium #third-wizard .wizard-actions button {
        flex: 1 1 140px;
        padding: 11px 16px;
    }
    body.omid-premium #third-wizard .wizard-actions [data-next] {
        flex-basis: 100%;
    }
    body.omid-premium .filter-bar > button {
        width: 100%;
    }
}
@media print {
    body.omid-premium #third-wizard :is(.wizard-steps, .omid-progress-caption) {
        display: none !important;
    }
}
/* Preserve exact brand surfaces and readable text for each palette. */
body.omid-premium .od-hero :is(h1, h2, h3) {
    color: var(--role-on);
}
body.omid-premium .od-hero .od-secondary {
    color: var(--role-on);
    border-color: var(--role-on);
}
body.omid-premium .od-hero .od-secondary:hover {
    background: var(--role-soft);
    color: var(--role-ink);
    border-color: var(--role-border);
}
body.omid-premium .od-hero .od-date {
    background: #ffffff18;
}
body.omid-premium .od-hero .od-date strong {
    color: var(--role-on);
}
body.omid-premium .omid-login {
    --role-accent: #134e82;
    --role-hover: #103f69;
    --role-soft: #edf4fa;
    --role-border: #c8dbea;
    --role-ink: #134e82;
    --role-dark: #134e82;
    --role-on: #fff;
    --role-hero: #fff;
    --role-muted: #e0ecf7;
    --role-ring: #134e8226;
    --omid-blue: #134e82;
    --omid-gold: #134e82;
    --omid-navy: #134e82;
}
body.omid-premium .omid-login-story {
    background: #134e82;
    border-color: #134e82;
    color: #fff;
}
body.omid-premium .omid-login-story :is(h1, h2, h3) {
    color: #fff;
}
body.omid-premium .omid-login-story :is(p, small, .omid-login-kicker, .omid-login-signature) {
    color: #e0ecf7;
}
body.omid-premium .omid-login-label {
    color: #134e82;
    background: #edf4fa;
}
body.omid-premium .omid-login .primary {
    background: #134e82;
    border-color: #134e82;
    color: #fff;
}
body.omid-premium .omid-login .primary:hover {
    background: #103f69;
    border-color: #103f69;
}

/* Dashboard contrast and matching outlined actions. */
body.omid-premium[data-omid-role="user"] {
    --role-on: #000;
    --role-hero: #000;
    --role-muted: #000;
}
body.omid-premium[data-omid-role="representative"] {
    --role-accent: #8188af;
    --role-dark: #8188af;
    --role-hover: #7179a5;
    --role-on: #fff;
    --role-hero: #fff;
    --role-muted: #fff;
}
body.omid-premium[data-omid-role="user"]
    .od-hero
    :is(h1, h2, h3, p, span, strong, small, a, button) {
    color: #000;
}
body.omid-premium[data-omid-role="representative"]
    .od-hero
    :is(h1, h2, h3, p, span, strong, small, a, button) {
    color: #fff;
}
body.omid-premium[data-omid-role="user"] .od-hero .od-actions :is(.od-primary, .od-secondary),
body.omid-premium[data-omid-role="representative"]
    .od-hero
    .od-actions
    :is(.od-primary, .od-secondary) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 11px 22px;
    border: 1px solid #000;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.7;
    text-decoration: none;
    margin: 0;
}
body.omid-premium[data-omid-role="user"] .od-hero .od-actions :is(.od-primary, .od-secondary) {
    color: #000;
}
body.omid-premium[data-omid-role="representative"]
    .od-hero
    .od-actions
    :is(.od-primary, .od-secondary) {
    color: #fff;
}
body.omid-premium[data-omid-role="user"]
    .od-hero
    .od-actions
    :is(.od-primary, .od-secondary):hover {
    background: #0000000b;
    color: #000;
    border-color: #000;
}
body.omid-premium[data-omid-role="representative"]
    .od-hero
    .od-actions
    :is(.od-primary, .od-secondary):hover {
    background: #ffffff14;
    color: #fff;
    border-color: #000;
}
body.omid-premium[data-omid-role="user"]
    .od-hero
    .od-actions
    :is(.od-primary, .od-secondary):focus-visible {
    outline: 3px solid #000;
    outline-offset: 4px;
}
body.omid-premium[data-omid-role="representative"]
    .od-hero
    .od-actions
    :is(.od-primary, .od-secondary):focus-visible {
    outline: 3px solid #fff;
    outline-offset: 4px;
}

/* Solid matching frames on both dashboard roles. */
body.omid-premium:is([data-omid-role="user"], [data-omid-role="representative"]) .od-hero .od-date {
    border: 1px solid #000;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
}
body.omid-premium:is([data-omid-role="user"], [data-omid-role="representative"])
    .od-hero
    .od-actions
    :is(.od-primary, .od-secondary) {
    border: 1px solid #000;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
}
/* Viewport anchored RTL navigation; browser zoom naturally changes CSS viewport width. */
body.omid-premium {
    --omid-header-height: 94px;
    --omid-side-width: clamp(210px, 17vw, 260px);
}
body.omid-premium .v5-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    border-inline: 0;
    grid-template-columns: var(--omid-side-width) minmax(0, 1fr);
}
body.omid-premium .v5-main {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}
body.omid-premium .v5-header {
    height: var(--omid-header-height);
}
body.omid-premium .v5-nav {
    position: fixed;
    right: 0;
    left: auto;
    inset-inline-start: 0;
    inset-inline-end: auto;
    top: var(--omid-header-height);
    bottom: 0;
    width: var(--omid-side-width);
    height: auto;
    max-height: calc(100vh - var(--omid-header-height));
    max-height: calc(100dvh - var(--omid-header-height));
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    z-index: 80;
    scrollbar-gutter: stable;
}
body.omid-premium .v5-nav > a {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}
body.omid-premium .v5-nav > a > span {
    min-width: 0;
}
body.omid-premium .od-hero {
    min-width: 0;
    gap: 24px;
    flex-wrap: wrap;
}
body.omid-premium .od-hero > div:first-child {
    flex: 1 1 380px;
    min-width: 0;
}
body.omid-premium .od-hero .od-date {
    flex: 0 1 230px;
    max-width: 100%;
    min-width: 0;
}
body.omid-premium .od-actions {
    gap: 14px;
    flex-wrap: wrap;
}
body.omid-premium .od-actions > :is(a, button) {
    max-width: 100%;
    text-align: center;
    white-space: normal;
}
body.omid-premium :is(.panel, .od-panel, .fields, .od-grid, .od-two-col, .review-grid) {
    min-width: 0;
}
body.omid-premium :is(.table-scroll, .table-wrap, .omid-table-scroll) {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}
@media (min-width: 981px) {
    body.omid-premium .v5-shell {
        display: grid;
    }
    body.omid-premium .v5-main {
        grid-column: 2;
    }
    body.omid-premium .v5-nav {
        display: flex;
    }
}
@media (max-width: 980px) {
    body.omid-premium {
        --omid-header-height: 84px;
        --omid-side-width: min(290px, 85vw);
    }
    body.omid-premium .v5-shell {
        display: block;
    }
    body.omid-premium .v5-main {
        grid-column: auto;
    }
    body.omid-premium .v5-nav {
        display: none;
        z-index: 100;
    }
    body.omid-premium .v5-nav.open {
        display: flex;
    }
    body.omid-premium .omid-nav-scrim {
        top: var(--omid-header-height);
    }
    body.omid-premium .od-two-col {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (max-width: 700px) {
    body.omid-premium {
        --omid-header-height: 78px;
    }
    body.omid-premium .od-hero {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
    body.omid-premium .od-hero > div:first-child {
        flex: 0 1 auto;
        width: 100%;
    }
    body.omid-premium .od-hero .od-date {
        flex: 0 1 auto;
        width: 100%;
        margin-top: 0;
    }
    body.omid-premium .od-actions > :is(a, button) {
        flex: 1 1 170px;
    }
    body.omid-premium :is(.od-stats, .stats-grid) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body.omid-premium .v5-page-title {
        flex-wrap: wrap;
    }
    body.omid-premium .v5-account {
        flex-shrink: 0;
    }
}
@media (max-width: 420px) {
    body.omid-premium :is(.od-stats, .stats-grid) {
        grid-template-columns: minmax(0, 1fr);
    }
    body.omid-premium .od-actions > :is(a, button) {
        flex-basis: 100%;
    }
    body.omid-premium .v5-brand {
        min-width: 0;
    }
    body.omid-premium .v5-brand > span {
        min-width: 0;
    }
}
@media print {
    body.omid-premium .v5-shell {
        display: block;
    }
    body.omid-premium .v5-main {
        grid-column: auto;
        max-width: none;
    }
    body.omid-premium .v5-nav {
        display: none !important;
    }
}

/* Explicit border wins over the shared primary-button rule with multiple :not() classes. */
body.omid-premium:is([data-omid-role="user"], [data-omid-role="representative"]) .od-hero .od-date,
body.omid-premium:is([data-omid-role="user"], [data-omid-role="representative"])
    .od-hero
    .od-actions
    a.od-primary,
body.omid-premium:is([data-omid-role="user"], [data-omid-role="representative"])
    .od-hero
    .od-actions
    a.od-secondary,
body.omid-premium:is([data-omid-role="user"], [data-omid-role="representative"])
    .od-hero
    .od-actions
    button.od-primary,
body.omid-premium:is([data-omid-role="user"], [data-omid-role="representative"])
    .od-hero
    .od-actions
    button.od-secondary {
    border: 1.5px solid #000 !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    box-sizing: border-box;
}
