/*
 * Alpline Career 90
 * Small, release-specific improvements only. The main design remains in app.css.
 * Keeping this file separate makes future maintenance and rollback straightforward.
 */

.release-291 .main-header {
    border-top: 3px solid #d8ad3f;
}

/* Public homepage release marker and career summary. */
.career-90-banner {
    display: grid;
    grid-template-columns: minmax(260px, 1.15fr) minmax(320px, 1fr);
    gap: 32px;
    align-items: center;
    padding: clamp(28px, 5vw, 64px);
    background:
        radial-gradient(circle at 90% 12%, rgba(228, 188, 74, 0.24), transparent 28%),
        linear-gradient(135deg, #073f34, #0b6551);
    color: #ffffff;
}

.career-90-copy small {
    color: #f4cf6a;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.career-90-copy h2 {
    max-width: 680px;
    margin: 10px 0 14px;
    color: #ffffff;
    font-size: clamp(30px, 4vw, 54px);
    line-height: 1.04;
}

.career-90-copy p {
    max-width: 650px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 16px;
    line-height: 1.7;
}

.career-90-copy .btn {
    background: #f2c95b;
    color: #153a31;
}

.career-90-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 12px;
}

.career-90-facts article {
    min-height: 130px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.career-90-facts b {
    display: block;
    color: #f4cf6a;
    font-size: 34px;
    line-height: 1;
}

.career-90-facts span {
    display: block;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.release-291 .business-banner {
    grid-template-columns: 1fr;
}

/* Keep the homepage readable even when an old theme cache was previously active. */
.release-291 .retail-hero,
.release-291 .retail-hero__visual,
.release-291 .retail-hero__copy {
    visibility: visible;
    opacity: 1;
}

.release-291 .retail-hero__visual {
    min-height: 480px;
}

/* Admin controls: readable tables and form controls without changing the layout. */
.admin-portal .admin-page .control-card {
    padding: clamp(18px, 2.4vw, 32px);
    border: 1px solid #dce7e1;
    box-shadow: 0 10px 30px rgba(7, 63, 48, 0.04);
}

.admin-portal .admin-page .table-wrap {
    max-width: 100%;
    overflow-x: auto;
    border-radius: 12px;
}

.admin-portal .admin-page table {
    font-size: 14px;
    line-height: 1.5;
}

.admin-portal .admin-page table th {
    padding: 15px 14px;
    font-size: 12px;
    letter-spacing: 0.04em;
}

.admin-portal .admin-page table td {
    padding: 15px 14px;
    vertical-align: middle;
}

.admin-portal .admin-page input:not([type="checkbox"]):not([type="hidden"]),
.admin-portal .admin-page select {
    min-height: 44px;
    max-width: 100%;
    font-size: 15px;
}

.admin-portal .admin-page .btn {
    min-height: 44px;
    font-size: 14px;
}

.admin-portal .career-budget-page table input {
    width: 130px;
}

.admin-portal .career-budget-page table select {
    min-width: 150px;
}

.admin-portal .theme-control-page table {
    width: 100%;
    min-width: 900px;
    table-layout: fixed;
}

.admin-portal .theme-control-page th:nth-child(1) { width: 12%; }
.admin-portal .theme-control-page th:nth-child(2) { width: 24%; }
.admin-portal .theme-control-page th:nth-child(3) { width: 10%; }
.admin-portal .theme-control-page th:nth-child(4) { width: 28%; }
.admin-portal .theme-control-page th:nth-child(5) { width: 26%; }

.admin-portal .theme-control-page td {
    overflow-wrap: anywhere;
}

.admin-portal .theme-control-page .setting-form {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto;
    gap: 8px;
}

/* Legacy tree styles retained for compatibility. */
.alpline-genealogy .genealogy-scroll {
    max-width: 100%;
    overflow: auto;
    overscroll-behavior: contain;
    padding-bottom: 16px;
}

.alpline-genealogy .genealogy-tree {
    width: max-content;
    min-width: 100%;
}

.alpline-genealogy .tree-member {
    min-width: 145px;
    max-width: 195px;
}

.alpline-genealogy .tree-member.leg-a {
    border-color: #aacdbb !important;
    background: #deeee3 !important;
    color: #123d32 !important;
}

.alpline-genealogy .tree-member.leg-b {
    border-color: #176a58 !important;
    background: #075445 !important;
    color: #ffffff !important;
}

.alpline-genealogy details {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
    white-space: normal;
}

.alpline-genealogy summary {
    min-height: 30px;
    cursor: pointer;
    font-weight: 700;
}

/* One-level genealogy: selected sponsor plus every direct member. */
.one-level-genealogy {
    overflow: hidden;
}

.one-level-root {
    position: relative;
    width: min(360px, 100%);
    margin: 22px auto 30px;
    padding: 19px 24px;
    border-radius: 18px;
    background: linear-gradient(145deg, #0a463b, #062f28);
    box-shadow: 0 14px 34px rgba(6, 58, 45, 0.15);
    color: #ffffff;
    text-align: center;
}

.one-level-root::after {
    position: absolute;
    bottom: -24px;
    left: 50%;
    width: 2px;
    height: 24px;
    background: #a9bdb6;
    content: "";
}

.one-level-root small,
.one-level-root span {
    display: block;
    opacity: 0.76;
    letter-spacing: 0.06em;
}

.one-level-root b {
    display: block;
    margin: 5px 0;
    color: #f5cb5c;
    font-size: 22px;
}

.one-level-flow {
    display: grid;
    grid-template-columns: repeat(2, minmax(290px, 1fr));
    gap: 18px;
    align-items: start;
}

.one-level-group {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #cfddd7;
    border-radius: 18px;
    background: #ffffff;
}

.one-level-group > header {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 15px 17px;
}

.one-level-group > header small,
.one-level-group > header b {
    display: block;
}

.one-level-group > header small {
    font-size: 11px;
    letter-spacing: 0.12em;
}

.one-level-group > header b {
    font-size: 14px;
}

.one-level-group > header span {
    font-size: 11px;
    opacity: 0.74;
}

.group-a > header {
    background: #dfeee6;
    color: #113e32;
}

.group-b > header {
    background: #075445;
    color: #ffffff;
}

.group-unplaced {
    grid-column: 1 / -1;
}

.group-unplaced > header {
    background: #fff5d8;
    color: #5f4710;
}

.one-level-members {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 14px;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
}

.one-level-member {
    display: grid;
    flex: 0 0 235px;
    grid-template-columns: 42px 1fr;
    gap: 11px;
    align-items: center;
    min-height: 96px;
    padding: 13px;
    border: 1px solid #dbe5e1;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 7px 18px rgba(17, 56, 46, 0.05);
    color: #123c32;
    text-decoration: none;
    scroll-snap-align: start;
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.one-level-member:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(17, 56, 46, 0.1);
}

.group-a .one-level-member {
    background: #f3faf6;
}

.group-b .one-level-member {
    border-color: #237663;
    background: #0b6352;
    color: #ffffff;
}

.group-unplaced .one-level-member {
    background: #fffbef;
}

.member-avatar {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: #f1c75b;
    color: #173d33;
    font-size: 17px;
    font-weight: 900;
}

.one-level-member span:nth-child(2) {
    min-width: 0;
}

.one-level-member b,
.one-level-member strong,
.one-level-member small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.one-level-member b,
.one-level-member strong {
    color: inherit;
    font-size: 13px;
}

.one-level-member strong {
    margin: 3px 0;
}

.one-level-member small {
    font-size: 10px;
    opacity: 0.72;
}

.one-level-member em {
    grid-column: 2;
    color: inherit;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.08em;
    opacity: 0.75;
}

.one-level-empty {
    width: 100%;
    padding: 20px;
    color: #6b7b75;
    font-size: 13px;
    text-align: center;
}

@media (max-width: 900px) {
    .career-90-banner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .one-level-flow {
        grid-template-columns: 1fr;
    }

    .group-unplaced {
        grid-column: auto;
    }

    .one-level-member {
        flex-basis: 215px;
    }

    .one-level-group > header {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 700px) {
    .admin-portal .admin-page table {
        min-width: 650px;
    }

    .admin-portal .admin-page .dash-head h1 {
        font-size: 34px;
    }

    .career-90-facts {
        grid-template-columns: 1fr 1fr;
    }

    .career-90-facts article {
        min-height: 110px;
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .career-90-facts {
        grid-template-columns: 1fr;
    }
}
