/* =========================================================
   Nosa Customer Affairs
   Modern RTL stylesheet
   ========================================================= */


/* =========================================================
   RESET
   ========================================================= */

   .crm-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.crm-page {
    scroll-behavior: smooth;
}

.crm-page {
    direction: rtl;
    background: #fafafa;
    color: #2b2b2b;
    line-height: 1.9;
}

.crm-page a {
    color: inherit;
    text-decoration: none;
}

.crm-page button,
.crm-page input {
    _font-family: inherit;
}

.crm-page button {
    cursor: pointer;
}

.crm-page img {
    max-width: 100%;
    display: block;
}


/* =========================================================
   VARIABLES
   ========================================================= */

.crm-page {

    --nosa-red: #b72025;
    --nosa-red-dark: #8f181c;
    --nosa-red-light: #fdeeee;

    --text: #2b2b2b;
    --text-soft: #555555;
    --text-light: #8a8a8a;

    --border: #e6e6e6;

    --white: #ffffff;
    --background: #fafafa;
    --background-dark: #eef1f4;

    --success: #16835b;
    --danger: #c0392b;

    --container: 1100px;

    --radius: 14px;

    --shadow-sm:
        0 4px 18px rgba(15, 40, 65, 0.05);

    --shadow-md:
        0 15px 45px rgba(15, 40, 65, 0.09);
}


/* =========================================================
   COMMON
   ========================================================= */

.crm-page .content-container {
    width: min(var(--container), calc(100% - 48px));
    margin: auto;
}

.crm-page h1,
.crm-page h2,
.crm-page h3 {
    line-height: 1.5;
}

.crm-page h2 {
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 800;
}

.crm-page p {
    color: var(--text-soft);
    font-size: 15px;
}


/* =========================================================
   HERO
   ========================================================= */

.crm-page .hero {
    position: relative;
    overflow: hidden;

    background:
        linear-gradient(
            115deg,
            #fdf5f5 0%,
            #ffffff 55%,
            #fff7e3 100%
        );

    display: flex;
    align-items: center;

    padding: 30px 7% 35px;

    min-height: auto;
}

.crm-page .hero-content {
    width: min(900px, 100%);

    position: relative;
    z-index: 3;
}

.crm-page .hero h1 {
    font-size: clamp(38px, 6vw, 60px);
    font-weight: 800;

    letter-spacing: -1.5px;

    color: #222222;
}

.crm-page .hero p {
    max-width: none;

    margin-top: 8px;

    font-size: 1.1rem;
    line-height: 2;

    color: #555555;

    white-space: normal;
}

.crm-page .hero-actions {
    display: flex;
    flex-wrap: wrap;

    gap: 12px;

    margin-top: 25px;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.crm-page .primary-button,
.crm-page .secondary-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 11px;

    min-height: 49px;

    padding: 0 20px;

    border-radius: 9px;

    font-size: 13px;
    font-weight: 600;

    transition:
        background .2s ease,
        border-color .2s ease,
        color .2s ease,
        transform .2s ease;
}

.crm-page .primary-button {
    color: #fff;
    background: var(--nosa-red);

    box-shadow:
        0 10px 24px rgba(183, 32, 37, .18);
}

.crm-page .primary-button:hover {
    background: var(--nosa-red-dark);
    transform: translateY(-2px);
}

.crm-page .secondary-button {
    color: var(--nosa-red);
    background: #fff;

    border: 1px solid #ecd3d4;
}

.crm-page .secondary-button:hover {
    border-color: var(--nosa-red);
    background: var(--nosa-red-light);

    transform: translateY(-1px);
}


/* =========================================================
   NOTICE
   ========================================================= */

.crm-page .notice {
    background: #fff;

    padding: 30px 0;

    border-bottom: 1px solid var(--border);
}

.crm-page .notice-inner {
    width: min(var(--container), calc(100% - 48px));

    margin: auto;

    display: grid;

    grid-template-columns: 52px 1fr auto;

    align-items: center;

    gap: 20px;
}

.crm-page .notice-icon {
    width: 43px;
    height: 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: var(--nosa-red);
    background: var(--nosa-red-light);

    font-weight: 800;

    align-self: flex-start;
    margin-top: 18px;
}

.crm-page .notice h3 {
    font-size: 15px;
    font-weight: 600;
    line-height: 2;
}

.crm-page .notice p {
    margin-top: 2px;

    font-size: 12px;
}

.crm-page .notice-button {
    white-space: nowrap;

    padding: 10px 17px;

    border-radius: 8px;

    color: var(--nosa-red);

    background: var(--nosa-red-light);

    font-size: 12px;
    font-weight: 700;

    transition: .2s ease;
}

.crm-page .notice-button:hover {
    color: #fff;
    background: var(--nosa-red);
}


/* =========================================================
   NORMAL CONTENT SECTION
   ========================================================= */

.crm-page .content-section {
    padding: 100px 0;

    background: var(--background);
}

.crm-page .two-column {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 90px;

    align-items: start;
}

.crm-page .two-column h2 {
    max-width: 540px;
}

.crm-page .two-column p {
    max-width: 620px;

    margin-top: 16px;
}


/* =========================================================
   LINK BOX
   ========================================================= */

.crm-page .link-box {
    border-top: 1px solid var(--border);
}

.crm-page .document-link {
    min-height: 65px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    border-bottom: 1px solid var(--border);

    color: #394651;

    font-size: 13px;
    font-weight: 500;

    transition: .2s ease;
}

.crm-page .document-link:hover {
    padding-right: 10px;

    color: var(--nosa-red);
}

.crm-page .document-link > span:last-child {
    color: var(--nosa-red);
    font-size: 18px;
}


/* =========================================================
   DOCUMENTS
   ========================================================= */

.crm-page .documents-section {
    padding: 100px 0;

    background: #fff;
}

.crm-page .documents-header {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 80px;

    align-items: end;

    margin-bottom: 45px;
}

.crm-page .documents-header p {
    max-width: 500px;
}

.crm-page .document-form {
    padding: 35px;

    border: 1px solid var(--border);

    background: #f9fafb;

    border-radius: var(--radius);
}

.crm-page .document-form label {
    display: block;

    margin-bottom: 10px;

    color: #36424c;

    font-size: 13px;
    font-weight: 700;
}

.crm-page .form-row {
    display: flex;

    gap: 10px;
}

.crm-page .form-row input {
    flex: 1;

    height: 50px;

    padding: 0 16px;

    border: 1px solid #d8dee4;

    border-radius: 8px;

    outline: none;

    background: #fff;

    color: var(--text);

    font-size: 13px;

    transition:
        border .2s ease,
        box-shadow .2s ease;
}

.crm-page .form-row input:focus {
    border-color: var(--nosa-red);

    box-shadow:
        0 0 0 3px rgba(183,32,37,.08);
}

.crm-page .form-row button {
    height: 50px;

    padding: 0 24px;

    border: 0;

    border-radius: 8px;

    color: #fff;

    background: var(--nosa-red);

    font-size: 13px;
    font-weight: 600;

    transition: .2s ease;
}

.crm-page .form-row button:hover {
    background: var(--nosa-red-dark);
}

.crm-page #document-result {
    min-height: 28px;

    margin-top: 14px;
}

.crm-page .error-message {
    color: var(--danger);

    font-size: 12px;
}

.crm-page .success-message {
    color: var(--success);

    font-size: 12px;
}

.crm-page .sales-contact {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding-top: 25px;

    color: var(--text-soft);

    font-size: 12px;
}

.crm-page .sales-contact strong {
    color: var(--nosa-red);

    direction: ltr;

    font-size: 16px;
}


/* =========================================================
   CONTRACTS
   ========================================================= */

.crm-page .contracts-section {
    background: #fafafa;
}

.crm-page .section-description {
    max-width: 800px;

    margin-top: 16px;
}

.crm-page .contract-groups {
    margin-top: 45px;

    border-top: 1px solid var(--border);
}

.crm-page .contract-groups details {
    border-bottom: 1px solid var(--border);
}

.crm-page .contract-groups summary {
    list-style: none;

    min-height: 70px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    cursor: pointer;

    font-size: 14px;
    font-weight: 700;

    color: #27343e;
}

.crm-page .contract-groups summary::-webkit-details-marker {
    display: none;
}

.crm-page .contract-groups summary span {
    width: 27px;
    height: 27px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 50%;

    color: var(--nosa-red);

    background: var(--nosa-red-light);

    font-size: 18px;

    transition: transform .2s ease;
}

.crm-page .contract-groups details[open] summary span {
    transform: rotate(45deg);
}

.crm-page .contract-list {
    padding: 0 20px 20px;

    display: flex;
    flex-direction: column;
}

.crm-page .contract-list a {
    display: flex;

    justify-content: space-between;

    gap: 20px;

    padding: 12px 0;

    border-bottom: 1px dashed #dfe3e7;

    color: var(--text-soft);

    font-size: 12px;

    transition: .2s ease;
}

.crm-page .contract-list a:last-child {
    border-bottom: 0;
}

.crm-page .contract-list a:hover {
    color: var(--nosa-red);
}

.crm-page .contract-list a span {
    color: var(--nosa-red);
}


/* =========================================================
   VERSIONS
   ========================================================= */

.crm-page .versions-section {
    padding: 100px 0;

    background: #fff;
}

.crm-page .versions-heading {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 80px;

    align-items: end;
}

.crm-page .versions-heading p {
    max-width: 500px;
}

.crm-page .latest-version {
    margin-top: 50px;

    padding: 35px;

    border-radius: var(--radius);

    background:
        linear-gradient(
            135deg,
            #fdf3f3,
            #fffaf5
        );

    border: 1px solid #eddcdc;
}

.crm-page .latest-label {
    margin-bottom: 20px;

    color: var(--nosa-red);

    font-size: 12px;
    font-weight: 800;
}

.crm-page .version-items {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 15px;
}

.crm-page .version-items a {
    min-height: 90px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 18px 20px;

    background: #fff;

    border: 1px solid #eee4e4;

    border-radius: 10px;

    transition: .2s ease;
}

.crm-page .version-items a:hover {
    border-color: #e3a9ab;

    transform: translateY(-2px);

    box-shadow: var(--shadow-sm);
}

.crm-page .version-items a div {
    display: flex;
    flex-direction: column;
}

.crm-page .version-items a span {
    color: var(--text-soft);

    font-size: 11px;
}

.crm-page .version-items a strong {
    margin-top: 3px;

    color: #202c35;

    font-size: 15px;
}

.crm-page .version-arrow {
    color: var(--nosa-red);

    font-size: 20px;
}


/* =========================================================
   ARCHIVE
   ========================================================= */

.crm-page .archive {
    margin-top: 55px;
}

.crm-page .archive-title {
    padding-bottom: 15px;

    border-bottom: 1px solid var(--border);

    color: #27343e;

    font-size: 14px;
    font-weight: 800;
}

.crm-page .archive-grid {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 1px;

    margin-top: 20px;

    background: var(--border);

    border: 1px solid var(--border);
}

.crm-page .archive-grid a {
    min-height: 90px;

    padding: 17px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    background: #fff;

    transition: .2s ease;
}

.crm-page .archive-grid a:hover {
    background: #fdf5f5;
}

.crm-page .archive-grid a span {
    color: var(--text-soft);

    font-size: 11px;
}

.crm-page .archive-grid a strong {
    color: #293640;

    font-size: 15px;
}

.crm-page .archive-grid a i {
    align-self: flex-start;

    color: var(--nosa-red);

    font-style: normal;

    font-size: 14px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1050px) {

    .crm-page .hero {
        padding: 30px 6% 35px;
    }

    .crm-page .hero-content {
        width: min(800px, 100%);
    }

    .crm-page .customer-system .content-container {
        grid-template-columns: 1fr;

        gap: 50px;
    }

    .crm-page .two-column {
        gap: 50px;
    }

    .crm-page .archive-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 720px) {

    .crm-page .content-container {
        width: min(100% - 30px, var(--container));
    }


    /* HERO */

    .crm-page .hero {
        padding: 30px 15px 35px;
    }

    .crm-page .hero-content {
        width: 100%;
    }

    .crm-page .hero h1 {
        font-size: 43px;
    }

    .crm-page .hero p {
        font-size: 14px;
        line-height: 1.9;
    }

    .crm-page .hero-actions {
        flex-direction: column;

        align-items: stretch;

        margin-top: 22px;
    }

    .crm-page .primary-button,
.crm-page .secondary-button {
        width: 100%;
    }


    /* NOTICE */

    .crm-page .notice {
        padding: 25px 0;
    }

    .crm-page .notice-inner {
        width: min(100% - 30px, var(--container));

        grid-template-columns: 42px 1fr;

        gap: 14px;
    }

    .crm-page .notice-icon {
        width: 38px;
        height: 38px;

        margin-top: 12px;
    }

    .crm-page .notice h3 {
        font-size: 13px;
        line-height: 1.9;
    }

    .crm-page .notice-button {
        grid-column: 1 / -1;

        text-align: center;

        width: 100%;
    }


    /* CONTENT */

    .crm-page .services,
.crm-page .content-section,
.crm-page .documents-section,
.crm-page .versions-section {
        padding: 70px 0;
    }

    .crm-page .two-column {
        grid-template-columns: 1fr;

        gap: 45px;
    }


    /* DOCUMENTS */

    .crm-page .documents-header,
.crm-page .versions-heading {
        grid-template-columns: 1fr;

        gap: 20px;
    }

    .crm-page .document-form {
        padding: 20px;
    }

    .crm-page .form-row {
        flex-direction: column;
    }

    .crm-page .form-row input,
.crm-page .form-row button {
        width: 100%;
    }

    .crm-page .sales-contact {
        flex-direction: column;

        align-items: flex-start;
    }


    /* CONTRACTS */

    .crm-page .contract-groups summary {
        font-size: 12px;
    }

    .crm-page .contract-list {
        padding-right: 8px;
        padding-left: 8px;
    }


    /* VERSIONS */

    .crm-page .version-items {
        grid-template-columns: 1fr;
    }

    .crm-page .latest-version {
        padding: 20px;
    }

    .crm-page .archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

    .crm-page .hero {
        padding: 25px 15px 30px;
    }

    .crm-page .hero h1 {
        font-size: 37px;
    }

    .crm-page .hero p {
        font-size: 13px;
    }

    .crm-page .archive-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   VISUAL POLISH
   (appended overrides - original rules above are untouched)
   ========================================================= */

.crm-page ::selection {
    color: #fff;
    background: var(--nosa-red);
}

.crm-page :focus-visible {
    outline: 3px solid rgba(183, 32, 37, .35);
    outline-offset: 3px;
    border-radius: 6px;
}


/* ---------- HERO ---------- */

.crm-page .hero::before,
.crm-page .hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.crm-page .hero::before {
    width: 460px;
    height: 460px;
    left: -140px;
    top: -200px;
    background: radial-gradient(circle, rgba(183, 32, 37, .13), transparent 70%);
}

.crm-page .hero::after {
    width: 320px;
    height: 320px;
    right: -100px;
    bottom: -180px;
    background: radial-gradient(circle, rgba(252, 191, 20, .16), transparent 70%);
}

.crm-page .hero h1 {
    display: inline-block;
    background: linear-gradient(90deg, var(--nosa-red-dark), var(--nosa-red) 60%, #fcbf14);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.crm-page .secondary-button {
    box-shadow: var(--shadow-sm);
}

.crm-page .primary-button:hover {
    box-shadow: 0 14px 30px rgba(183, 32, 37, .28);
}


/* ---------- NOTICE ---------- */

.crm-page .notice {
    background: linear-gradient(#ffffff, #fffdfd);
}

.crm-page .notice-inner {
    padding: 22px 26px;
    background: #fff;
    border: 1px solid #eddcdc;
    border-right: 4px solid var(--nosa-red);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.crm-page .notice-inner + .notice-inner {
    margin-top: 16px;
}

.crm-page .notice-icon {
    margin-top: 4px;
    color: #fff;
    background: linear-gradient(135deg, var(--nosa-red), #d9363b);
    box-shadow: 0 6px 16px rgba(183, 32, 37, .25);
}

.crm-page .notice-button {
    border: 1px solid transparent;
}

.crm-page .notice-button:hover {
    box-shadow: 0 8px 20px rgba(183, 32, 37, .22);
}


/* ---------- SECTION HEADINGS ---------- */

.crm-page .content-section h2::after,
.crm-page .documents-section h2::after,
.crm-page .versions-section h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    margin-top: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--nosa-red), #fcbf14);
}


/* ---------- SUPPORT LINKS ---------- */

.crm-page .link-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 0;
}

.crm-page .document-link {
    padding: 0 20px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(15, 40, 65, .03);
}

.crm-page .document-link::after {
    content: "\2190";
    color: var(--nosa-red);
    font-size: 18px;
    transition: transform .2s ease;
}

.crm-page .document-link:hover {
    padding-right: 26px;
    border-color: #e3a9ab;
    background: var(--nosa-red-light);
    box-shadow: var(--shadow-sm);
}

.crm-page .document-link:hover::after {
    transform: translateX(-4px);
}

/* label text was inheriting the blue 18px arrow style */
.crm-page .document-link > span:last-child {
    color: inherit;
    font-size: inherit;
}


/* ---------- DOCUMENT FORM ---------- */

.crm-page .document-form {
    background: linear-gradient(135deg, #fffaf5, #fdf3f3);
    border-color: #eddcdc;
    box-shadow: var(--shadow-sm);
}

.crm-page .form-row input::placeholder {
    color: var(--text-light);
}

.crm-page .form-row button {
    box-shadow: 0 8px 18px rgba(183, 32, 37, .18);
}

.crm-page .form-row button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(183, 32, 37, .26);
}

.crm-page .error-message,
.crm-page .success-message {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
}

.crm-page .error-message {
    background: rgba(192, 57, 43, .08);
}

.crm-page .success-message {
    background: rgba(22, 131, 91, .08);
}

.crm-page .sales-contact {
    margin-top: 25px;
    border-top: 1px solid var(--border);
}


/* ---------- CONTRACTS ---------- */

.crm-page .contract-groups {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 0;
}

.crm-page .contract-groups details {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(15, 40, 65, .03);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.crm-page .contract-groups details[open] {
    border-color: #e8c3c5;
    box-shadow: var(--shadow-sm);
}

.crm-page .contract-groups summary {
    padding: 0 22px;
    transition: color .2s ease;
}

.crm-page .contract-groups summary:hover {
    color: var(--nosa-red);
}

.crm-page .contract-list {
    padding-top: 8px;
    border-top: 1px solid var(--border);
}


/* ---------- VERSIONS ---------- */

.crm-page .latest-version {
    box-shadow: var(--shadow-sm);
}

.crm-page .latest-label::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(22, 131, 91, .15);
}

.crm-page .version-items a {
    border-radius: 12px;
}

.crm-page .version-items a:hover {
    box-shadow: var(--shadow-md);
}

/* arrow was picking up the generic "a span" small gray style */
.crm-page .version-items a .version-arrow {
    display: inline-block;
    color: var(--nosa-red);
    font-size: 20px;
    transition: transform .2s ease;
}

.crm-page .version-items a:hover .version-arrow {
    transform: translateX(-5px);
}


/* ---------- ARCHIVE ---------- */

.crm-page .archive-grid {
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.crm-page .archive-grid a i {
    transition: transform .2s ease;
}

.crm-page .archive-grid a:hover strong {
    color: var(--nosa-red);
}

.crm-page .archive-grid a:hover i {
    transform: translate(-3px, -3px);
}


/* ---------- MOBILE TWEAKS ---------- */

@media (max-width: 720px) {

    .crm-page .notice-inner {
        padding: 16px;
    }

    .crm-page .document-link {
        padding: 0 16px;
    }

    .crm-page .contract-groups summary {
        padding: 0 16px;
    }
}


/* ---------- REDUCED MOTION ---------- */

@media (prefers-reduced-motion: reduce) {

    .crm-page * {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}


/* =========================================================
   PORTAL INTEGRATION
   ========================================================= */

.crm-page h2 {
    color: var(--nosa-red);
    font-size: 22px;
    font-weight: 500;
    line-height: 1.6;
}

/* the portal banner already shows the page title */
.crm-page .hero h1 {
    display: none;
}

/* justified text (!important so the portal stylesheet can't override it) */
.crm-page p,
.crm-page .notice h3,
.crm-page .notice p {
    text-align: justify !important;
    text-align-last: start !important;
    text-justify: inter-word;
}

/* compact support-form links + larger side text */
.crm-page .link-box {
    gap: 8px;
}

.crm-page .document-link {
    min-height: 46px;
    font-size: 12.5px;
}

.crm-page .two-column p {
    font-size: 14px;
    line-height: 2;
}

/* support section: text on top, form links below in 2 columns */
.crm-page .two-column {
    grid-template-columns: 1fr;
    gap: 28px;
}

.crm-page .link-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (max-width: 1050px) {

    .crm-page .link-box {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 720px) {

    .crm-page .link-box {
        grid-template-columns: 1fr;
    }
}

/* let the side text fill its whole column */
.crm-page .two-column h2,
.crm-page .two-column p {
    max-width: none;
}

/* documents section: paragraph goes under the heading */
.crm-page .documents-header {
    grid-template-columns: 1fr;
    gap: 16px;
}

/* documents section: larger paragraph under the heading */
.crm-page .documents-header p {
    max-width: none;
    font-size: 14px;
    line-height: 2;
}

/* documents section: no empty space under the input until a message shows */
.crm-page #document-result {
    min-height: 0;
    margin-top: 0;
}

.crm-page #document-result:not(:empty) {
    margin-top: 14px;
}

/* contracts section: same paragraph treatment as the other sections */
.crm-page .section-description {
    max-width: none;
    font-size: 14px;
    line-height: 2;
}

/* contracts section: shorter accordion bars */
.crm-page .contract-groups summary {
    min-height: 52px;
}

.crm-page .contract-groups {
    gap: 10px;
}

/* versions section: paragraph under the heading, same as the other sections */
.crm-page .versions-heading {
    grid-template-columns: 1fr;
    gap: 16px;
}

.crm-page .versions-heading p {
    max-width: none;
    font-size: 14px;
    line-height: 2;
}

/* versions section: shorter boxes */
.crm-page .version-items a {
    min-height: 72px;
    padding: 14px 20px;
}

/* archive: two columns (finance / information), versions listed under each */
.crm-page .archive-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
    overflow: visible;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.crm-page .archive-column {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.crm-page .archive-column-title {
    padding: 14px 20px;
    color: var(--nosa-red);
    background: var(--nosa-red-light);
    font-size: 14px;
    font-weight: 800;
}

.crm-page .archive-grid a {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 0;
    padding: 11px 20px;
    border-top: 1px solid var(--border);
    line-height: 1.6;
}

.crm-page .archive-grid a i {
    align-self: center;
    font-size: 16px;
}


/* =========================================================
   TYPOGRAPHY (match the old customer-affairs page)
   ========================================================= */

.crm-page p {
    font-size: 14px;
    line-height: 2;
}

.crm-page .notice h3 {
    font-size: 14px;
    font-weight: 500;
    line-height: 2;
}

.crm-page .document-link {
    font-size: 13px;
}

/* hero: same width and centering as the notice boxes and sections below */
.crm-page .hero {
    padding-right: 0;
    padding-left: 0;
}

.crm-page .hero-content {
    width: min(var(--container), calc(100% - 48px));
    margin: 0 auto;
}

/* contracts section: tighter spacing between list rows */
.crm-page .contract-list {
    padding-top: 4px;
    padding-bottom: 10px;
}

.crm-page .contract-list a {
    padding: 5px 0;
    line-height: 1.7;
}

/* archive: collapsible, closed by default */
.crm-page .archive-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    cursor: pointer;
}

.crm-page .archive-title::-webkit-details-marker {
    display: none;
}

.crm-page .archive-title::after {
    content: "+";
    width: 27px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    color: var(--nosa-red);
    background: var(--nosa-red-light);
    font-size: 18px;
    transition: transform .2s ease;
}

.crm-page .archive[open] .archive-title::after {
    transform: rotate(45deg);
}

.crm-page .archive-title:hover {
    color: var(--nosa-red);
}

@media (max-width: 720px) {

    .crm-page .hero-content {
        width: min(100% - 30px, var(--container));
    }
}


/* =========================================================
   HERO (NEW)
   title bigger; on mobile the 4 buttons are always visible
   in two columns under the title
   ========================================================= */

.crm-page .hero p {
    font-size: 22px;
    line-height: 1.6;
}

@media (max-width: 720px) {

    .crm-page .hero {
        padding: 15px 0 20px;
    }

    .crm-page .hero p {
        margin-top: 0;
        font-size: 18px;
        line-height: 1.5;
    }

    .crm-page .hero-actions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 12px;
    }

    .crm-page .hero-actions .secondary-button {
        width: 100%;
        padding: 6px 10px;
        text-align: center;
        line-height: 1.6;
    }
}


/* hero: banner image as background */
.crm-page .hero {
    background:
        linear-gradient(rgba(0, 0, 0, .35), rgba(0, 0, 0, .35)),
        url("./asset/banner.jpg") center / cover no-repeat;
}

/* =========================================================
   HERO: slim banner like the portal
   ========================================================= */

/* نوار بیرونی: خاکستری روشن در دو طرف */
.crm-page .hero {
    position: relative;
    min-height: 0;
    padding: 0;
    background: #dcdcdc;
    overflow: hidden;
}

/* عکس بنر: عرض محدود و وسط‌چین */
.crm-page .hero::before {
    content: "";
    display: block !important;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: min(1600px, 100%);
    height: auto;
    transform: translateX(-50%);
    border-radius: 0;
    /* لایه‌ی تیره‌ی ملایم، فقط سمت راست برای خوانایی عنوان */
    background:
        linear-gradient(270deg, rgba(0, 0, 0, .28) 0%, rgba(0, 0, 0, .10) 30%, rgba(0, 0, 0, 0) 55%),
        url("./asset/banner.jpg") center 40% / cover no-repeat;
    background-color: #8a8a8a;
    z-index: 1;
}

.crm-page .hero::after {
    display: none !important;
}

/* محتوا: هم‌عرض و هم‌تراز با کارت‌های پایین */
.crm-page .hero-content {
    position: relative;
    z-index: 3;
    width: min(var(--container), calc(100% - 48px));
    height: 85px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.crm-page .hero .hero-title {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

.crm-page .hero-actions {
    margin-top: 0;
    gap: 8px;
}

.crm-page .hero-actions .secondary-button {
    min-height: 34px;
    padding: 0 14px;
    font-size: 12.5px;
    border-radius: 8px;
}

/* ---------- تبلت ---------- */
@media (max-width: 1050px) {

    .crm-page .hero .hero-title {
        font-size: 21px;
    }

    .crm-page .hero-actions .secondary-button {
        padding: 0 10px;
        font-size: 12px;
    }
}

/* ---------- موبایل ---------- */
@media (max-width: 720px) {

    .crm-page .hero::before {
        width: 100%;
        background:
            linear-gradient(180deg, rgba(0, 0, 0, .3), rgba(0, 0, 0, .1)),
            url("./asset/banner.jpg") center / cover no-repeat;
        background-color: #8a8a8a;
    }

    .crm-page .hero-content {
        width: min(100% - 30px, var(--container));
        height: auto;
        padding: 12px 0;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .crm-page .hero .hero-title {
        font-size: 19px;
    }

    .crm-page .hero-actions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .crm-page .hero-actions .secondary-button {
        width: 100%;
        min-height: 34px;
        padding: 0 8px;
        text-align: center;
    }
}

/* the two decorative glows don't fit on top of a photo */
.crm-page .hero::before,
.crm-page .hero::after {
    display: none;
}

/* title must stay readable on the dark image */
.crm-page .hero p {
    color: #fff;
}

