/* ==========================================================================
   DRABOTALEB PROFILE — CANONICAL VISUAL ARCHITECTURE
   One stylesheet. One cascade. No historical patch layers.
   ========================================================================== */

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

.profile-page {
    display: grid;
    gap: 18px;
    width: 100%;
    min-width: 0;
    color: #173b2c;
    box-sizing: border-box;
}

.profile-hero,
.profile-card {
    min-width: 0;
    background: #fff;
    border: 1px solid #e6dfd2;
    border-radius: 20px;
    box-shadow: 0 14px 38px rgba(24, 61, 47, .055);
}

.profile-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 18px 22px;
    min-height: 0;
    border: 1px solid #d8e7df;
    border-radius: 22px;
    background:
        linear-gradient(
            135deg,
            #0f5f4d 0%,
            #14705a 46%,
            #1b8a6c 100%
        );
    box-shadow:
        0 14px 38px
        rgba(15, 95, 77, .18);
    color: #fff;
}

.profile-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(
            circle at 15% 15%,
            rgba(255, 255, 255, .18),
            transparent 28%
        ),
        radial-gradient(
            circle at 88% 20%,
            rgba(255, 255, 255, .12),
            transparent 24%
        ),
        linear-gradient(
            115deg,
            transparent 0 54%,
            rgba(255, 255, 255, .07) 54% 58%,
            transparent 58%
        );
    opacity: 1;
}


.profile-hero-main {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.profile-photo {
    position: relative;

    z-index: 1;
}

.profile-photo img,
.profile-initials {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    object-fit: cover;
    border: 4px solid #fff;
    background: #e8f4ed;
    display: grid;
    place-items: center;
    font-size: 34px;
    font-weight: 900;
    color: #1f4a38;
    box-shadow: 0 14px 28px rgba(24, 61, 47, .12);
}

.profile-role-pill {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: #e8f4ed;
    color: #1f7a4d;
    font-size: 12px;
    font-weight: 900;
}

.profile-hero h2 {
    margin: 0 0 5px;
    color: #fff;
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.25;
    text-shadow:
        0 2px 10px
        rgba(5, 48, 36, .18);
}

.profile-hero p {
    margin: 0;
    color: rgba(255, 255, 255, .84);
    font-size: 14px;
    line-height: 1.55;
}

/* --------------------------------------------------------------------------
   BUTTONS / ACTIONS
   -------------------------------------------------------------------------- */

.profile-action,
.profile-save,
.profile-upload-button {
    box-sizing: border-box;
    min-height: 42px;
    border: 1px solid #d9d3c8;
    border-radius: 12px;
    background: #fff;
    color: #1f4a38;
    padding: 10px 15px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition:
        background-color .16s ease,
        border-color .16s ease,
        transform .16s ease,
        box-shadow .16s ease;
}

.profile-action:hover,
.profile-save:hover,
.profile-upload-button:hover {
    border-color: #b9cdbf;
    background: #f7fbf8;
}

.profile-action.primary,
.profile-save {
    border-color: #1f4a38;
    background: #1f4a38;
    color: #fff;
}

.profile-action.primary:hover,
.profile-save:hover {
    background: #173b2c;
}

.profile-action.danger {
    border-color: #f1d1cc;
    background: #fff8f6;
    color: #b42318;
}

/* --------------------------------------------------------------------------
   MAIN PROFILE GRID
   -------------------------------------------------------------------------- */

.profile-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.2fr)
        minmax(360px, .8fr);
    grid-template-areas:
        "basic account"
        "basic security"
        "student student";
    gap: 16px;
    align-items: stretch;
}

.profile-edit-card {
    grid-area: basic;
}

.profile-account-card {
    grid-area: account;
}

.profile-security-card {
    grid-area: security;
}

.profile-student-hub {
    grid-area: student;
}

.profile-card {
    padding: 18px;
    display: grid;
    gap: 14px;
    align-content: start;
}

.profile-wide {
    grid-column: 1 / -1;
}

.profile-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-section-head > span {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #f2eadc;
    color: #9b6b1d;
    font-weight: 900;
}

.profile-section-head h3,
.profile-card h3 {
    margin: 0;
    color: #173b2c;
    font-size: 20px;
}

.profile-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

/* --------------------------------------------------------------------------
   FORM CONTROLS
   -------------------------------------------------------------------------- */

.profile-card label {
    min-width: 0;
    display: grid;
    gap: 7px;
    color: #173b2c;
    font-weight: 900;
}

.profile-card input,
.profile-card textarea,
.profile-editable-fact-editor input,
.profile-editable-fact-editor select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #d8d0c3;
    border-radius: 12px;
    padding: 11px 12px;
    background: #fff;
    color: #173b2c;
    font: inherit;
    outline: none;
    transition:
        border-color .16s ease,
        box-shadow .16s ease;
}

.profile-card input:focus,
.profile-card textarea:focus,
.profile-editable-fact-editor input:focus,
.profile-editable-fact-editor select:focus {
    border-color: #8dbba4;
    box-shadow: 0 0 0 3px rgba(45, 122, 79, .10);
}

.profile-card input:disabled {
    background: #f8fafc;
    color: #667085;
}

.profile-card small {
    color: #667085;
}


.profile-name-editor {
    min-width: 0;
    display: grid;
    gap: 0;
}

.profile-name-editor-head {
    min-height: 72px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee8de;
}

.profile-name-editor-head > div {
    min-width: 0;
}

.profile-name-editor-head span {
    display: block;
    margin-bottom: 5px;
    color: #7a8190;
    font-size: 12px;
    font-weight: 700;
}

.profile-name-editor-head strong {
    display: block;
    color: #173b2c;
    font-size: 18px;
    font-weight: 950;
}

.profile-name-fields {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid #e7e0d4;
    border-radius: 14px;
    background: #fbfaf7;
}

.profile-name-fields[hidden] {
    display: none;
}

/* --------------------------------------------------------------------------
   AVATAR
   -------------------------------------------------------------------------- */


.profile-avatar-manager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 14px;
}

.profile-avatar-manager-copy {
    display: grid;
    gap: 3px;
}

.profile-avatar-manager-copy strong {
    color: #173b2c;
    font-size: 14px;
    font-weight: 950;
}

.profile-avatar-manager-copy span {
    color: #7a8190;
    font-size: 12px;
}

.profile-upload-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-save {
    width: fit-content;
}

/* --------------------------------------------------------------------------
   ACCOUNT FACTS
   -------------------------------------------------------------------------- */

.profile-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}


.profile-account-card .profile-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.profile-account-card .profile-facts > div {
    min-width: 0;
    min-height: 78px;
    display: grid;
    align-content: center;
    padding: 12px 13px;
    border: 1px solid #eee7dc;
    border-radius: 14px;
    background: #fbfaf7;
}

.profile-account-card .profile-facts span {
    display: block;
    margin-bottom: 5px;
    color: #7a8190;
    font-size: 11.5px;
}

.profile-account-card .profile-facts strong {
    color: #173b2c;
    font-size: 14px;
    font-weight: 900;
}

/* --------------------------------------------------------------------------
   SECURITY
   -------------------------------------------------------------------------- */


.profile-security-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 12px;
}

.profile-security-note {
    color: #667085;
    font-size: 12px;
}

/* --------------------------------------------------------------------------
   STUDENT HUB
   Architecture:
   outer profile card
      -> group surface
         -> flat rows
   -------------------------------------------------------------------------- */

.profile-student-hub {
    min-height: 0;
}

.profile-student-hub-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.profile-student-box {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e9e2d6;
    border-radius: 18px;
    background: #fff;
}


.profile-box-title {
    min-height: 54px;
    display: flex;
    align-items: center;
    padding: 13px 18px;
    border-bottom: 1px solid #eee8de;
    background:
        linear-gradient(
            180deg,
            #fffdfa 0%,
            #fbfaf7 100%
        );
}

.profile-box-title > strong {
    color: #173b2c;
    font-size: 15px;
    font-weight: 950;
}

/*
 * Critical visual cleanup:
 * no cards inside the student group.
 */

.profile-student-box .profile-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 22px;
    padding: 0 18px 6px;
}

.profile-student-box .profile-facts > div {
    min-width: 0;
    min-height: 68px;
    box-sizing: border-box;
    padding: 14px 0 12px;
    border: 0;
    border-bottom: 1px solid #f0ebe3;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.profile-student-box .profile-facts > div > span,
.profile-editable-fact-view > span {
    display: block;
    margin-bottom: 5px;
    color: #7a8190;
    font-size: 11.5px;
    font-weight: 700;
}

.profile-student-box .profile-facts > div > strong,
.profile-editable-fact-view > strong {
    display: block;
    color: #173b2c;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   EDITABLE STUDENT ROW
   Same surface as the read-only rows.
   -------------------------------------------------------------------------- */

.profile-editable-fact {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;

    min-width: 0;
    min-height: 68px;

    padding: 14px 0 12px;

    border: 0;
    border-bottom: 1px solid #f0ebe3;
    border-radius: 0;

    background: transparent;
    box-shadow: none;
}

.profile-editable-fact-view {
    min-width: 0;
}


.profile-icon-action {
    width: 42px;
    height: 42px;
    min-width: 42px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid #d9d3c8;
    border-radius: 14px;
    background: #fff;
    color: #1f4a38;
    font: inherit;
    font-weight: 950;
    cursor: pointer;
    transition:
        background-color .16s ease,
        border-color .16s ease,
        transform .16s ease;
}

.profile-icon-action:hover {
    border-color: #b7d2c2;
    background: #e8f4ed;
}

.profile-icon-action.mini {
    width: 31px;
    height: 31px;
    min-width: 31px;
    border-radius: 10px;
    color: #315f4b;
    font-size: 12px;
}

.profile-editable-fact-editor {
    grid-column: 1 / -1;

    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto
        auto;

    gap: 8px;
    margin-top: 10px;

    padding: 12px;
    border: 1px solid #e7e0d4;
    border-radius: 14px;
    background: #fbfaf7;
}

.profile-editable-fact-editor[hidden] {
    display: none;
}

/* --------------------------------------------------------------------------
   GRADE ROW
   -------------------------------------------------------------------------- */

.profile-grade-fact {
    align-items: start;
}

.profile-grade-editor select {
    width: 100%;
}


.profile-grade-next-date {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
    padding-top: 8px;
    border-top: 1px dashed #e7e0d4;
    color: #7a8190;
    font-size: 11.5px;
    line-height: 1.7;
}

.profile-grade-next-date strong {
    color: #315f4b;
    font-weight: 950;
    white-space: nowrap;

    direction: ltr;
    unicode-bidi: isolate;
}


.profile-phone-editor {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
}

.profile-phone-editor-shell {
    grid-column: 1 / -1;
    min-width: 0;
    display: grid;
    grid-template-columns:
        auto
        minmax(0, 1fr);
    align-items: stretch;
    overflow: hidden;
    border: 1px solid #b7d2c2;
    border-radius: 12px;
    background: #fff;
    box-shadow:
        0 0 0 3px
        rgba(31, 74, 56, .08);
}

.profile-phone-prefix {
    display: grid;
    place-items: center;
    min-width: 52px;
    padding: 0 12px;
    border-inline-end: 1px solid #d8e7df;
    background: #eef7f2;
    color: #173b2c;
    font-weight: 950;
    direction: ltr;
    user-select: none;
}

.profile-phone-editor-shell input {
    width: 100%;
    min-width: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
    direction: ltr;
}

.profile-phone-editor-shell input:focus {
    border: 0;
    box-shadow: none;
}

.profile-phone-editor .profile-action {
    width: 100%;
}

/* --------------------------------------------------------------------------
   CONTACT ACTIONS
   -------------------------------------------------------------------------- */

.profile-contact-actions .profile-action {
    flex: 1 1 auto;
    min-width: 130px;
}

/* --------------------------------------------------------------------------
   NOTES / EMPTY STATES / CHILDREN
   -------------------------------------------------------------------------- */

.profile-children {
    display: grid;
    gap: 8px;
}

.profile-children article {
    padding: 12px;
    border: 1px solid #eee7dc;
    border-radius: 12px;
    background: #fbfaf7;
}

.profile-children span {
    display: block;
    margin-top: 4px;
    color: #667085;
}

.profile-empty,
.profile-loading {
    padding: 28px;
    border: 1px dashed #d8d0c3;
    border-radius: 14px;
    background: #fff;
    color: #667085;
    text-align: center;
}

.profile-empty.error {
    color: #b42318;
}

/* --------------------------------------------------------------------------
   PROFILE ADMIN TARGET — CANONICAL OWNER
   -------------------------------------------------------------------------- */

.profile-name-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.profile-name-actions > .profile-save,
.profile-name-actions > .profile-action {
    flex: 0 1 auto;
}

.profile-admin-password-fields {
    width: min(100%, 420px);
    gap: 10px;
}

.profile-admin-security-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.profile-force-logout {
    border-color: #fecaca;
    background: #fff7f7;
    color: #b42318;
}

.profile-security-box-admin {
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.profile-security-box-admin > strong {
    margin-inline-end: auto;
}

.profile-security-box-admin
    .profile-admin-password-fields {
    flex: 1 1 100%;
}

.profile-admin-communication-panel {
    border-color: #c9ddd2;
}

.profile-admin-communication-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 12px;
}

.profile-admin-tool-card {
    display: grid;
    align-content: start;
    align-self: start;
    gap: 10px;
    padding: 14px;
    border: 1px solid #e3ded4;
    border-radius: 16px;
    background: #fff;
}

.profile-admin-tool-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.profile-admin-tool-head > div {
    display: grid;
    gap: 3px;
}

.profile-admin-tool-head strong {
    color: #123d30;
    font-size: 17px;
    font-weight: 900;
}

.profile-admin-tool-head span {
    color: #7a8191;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.6;
}

.profile-admin-tool-card label {
    display: grid;
    gap: 7px;
    color: #30493f;
    font-weight: 800;
}

.profile-admin-tool-card input,
.profile-admin-tool-card textarea {
    width: 100%;
    box-sizing: border-box;
}

.profile-admin-tool-card textarea {
    min-height: 76px;
    resize: vertical;
}

.profile-admin-tool-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-admin-panel-hint {
    display: block;
    margin-top: 8px;
    min-height: 0;
    font-weight: 900;
}

@media (max-width: 680px) {
    .profile-name-actions {
        width: 100%;
    }

    .profile-name-actions > .profile-save,
    .profile-name-actions > .profile-action {
        width: auto;
        min-width: 0;
        flex: 1 1 0;
    }

    .profile-security-box-admin {
        display: grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        align-items: stretch;
    }

    .profile-security-box-admin > strong,
    .profile-security-box-admin
        .profile-admin-password-fields {
        grid-column: 1 / -1;
        margin-inline-end: 0;
    }

    .profile-security-box-admin > .profile-action {
        width: 100%;
        min-width: 0;
    }

    .profile-admin-security-actions {
        width: 100%;
    }

    .profile-admin-security-actions
        .profile-action {
        flex: 1 1 0;
    }

    .profile-admin-communication-grid {
        grid-template-columns: 1fr;
    }

    .profile-admin-tool-actions
        .profile-action {
        width: 100%;
    }
}

.profile-contact-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 18px 16px;
}

.profile-contact-actions a,
.profile-contact-actions span {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 13px;
    box-sizing: border-box;
    border: 1px solid #d9d3c8;
    border-radius: 12px;
    background: #fff;
    color: #1f4a38;
    font-size: 12.5px;
    font-weight: 900;
    line-height: 1.4;
    text-decoration: none;
}

.profile-contact-actions a:hover {
    border-color: #b7d2c2;
    background: #e8f4ed;
    color: #173b2c;
    text-decoration: none;
}

.profile-contact-actions span {
    background: #f7f5f1;
    color: #8a8f98;
    cursor: default;
}



.profile-contact-btn.whatsapp {
    border-color: #20bd5a;
    background:
        linear-gradient(
            135deg,
            #25d366,
            #19b954
        );
    color: #fff;
    box-shadow:
        0 7px 18px
        rgba(37, 211, 102, .18);
}

.profile-contact-btn.whatsapp:hover {
    border-color: #17aa4b;
    background:
        linear-gradient(
            135deg,
            #20c75f,
            #149e46
        );
    color: #fff;
}

.profile-contact-btn.telegram:not(.is-disabled) {
    border-color: #229ed9;
    background:
        linear-gradient(
            135deg,
            #2aabee,
            #229ed9
        );
    color: #fff;
    box-shadow:
        0 7px 18px
        rgba(34, 158, 217, .18);
}

.profile-contact-btn.telegram:not(.is-disabled):hover {
    border-color: #188bc3;
    background:
        linear-gradient(
            135deg,
            #229ed9,
            #178cc5
        );
    color: #fff;
}

.profile-contact-btn.is-disabled {
    border-color: #ddd8cf;
    background: #f5f3ef;
    color: #8a8f98;
    box-shadow: none;
    pointer-events: none;
    cursor: default;
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */

@media (max-width: 1050px) {
    .profile-grid {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(320px, .8fr);
    }

    .profile-account-card .profile-facts {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .profile-page {
        padding-inline: 10px;
        overflow-x: hidden;
    }

    .profile-hero {
        grid-template-columns:
            auto
            minmax(0, 1fr);
    }

.profile-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "basic"
            "account"
            "security"
            "student";
    }

    .profile-account-card .profile-facts {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .profile-student-hub-grid {
        grid-template-columns: 1fr;
    }

    .profile-avatar-manager {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .profile-account-card .profile-facts {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .profile-account-card .profile-facts > div {
        min-height: 68px;
        padding: 9px 6px;
        text-align: center;
    }

    .profile-account-card .profile-facts span {
        margin-bottom: 4px;
        font-size: 10px;
        line-height: 1.3;
    }

    .profile-account-card .profile-facts strong {
        font-size: 11.5px;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    .profile-avatar-manager {
        align-items: stretch;
    }

    .profile-avatar-manager .profile-upload-row {
        width: 100%;
    }

    .profile-avatar-manager .profile-upload-row > * {
        flex: 1 1 0;
    }

    .profile-security-box {
        align-items: stretch;
    }

    .profile-security-box > .profile-action {
        width: 100%;
    }


    .profile-card {
        padding: 15px;
        border-radius: 18px;
    }

    .profile-hero {
        padding: 15px;
        gap: 11px;
    }

    .profile-two {
        grid-template-columns: 1fr;
    }

    .profile-student-box .profile-facts {
        grid-template-columns: 1fr;
        padding-inline: 16px;
    }

    .profile-editable-fact-editor {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        align-items: stretch;
    }

    .profile-editable-fact-editor > input,
    .profile-editable-fact-editor > select,
    .profile-editable-fact-editor > .profile-phone-input-shell {
        grid-column: 1 / -1;
    }

    .profile-editable-fact-editor .profile-action {
        width: 100%;
        min-width: 0;
    }

    .profile-contact-actions {
        padding-inline: 16px;
    }
}

@media (max-width: 480px) {
    .profile-page {
        padding-inline: 8px;
    }

    .profile-photo img,
    .profile-initials {
        width: 78px;
        height: 78px;
        border-radius: 21px;
    }

    .profile-hero {
        padding: 13px;
        gap: 10px;
    }

    .profile-hero h2 {
        font-size: 24px;
    }

    .profile-hero p {
        font-size: 12.5px;
        overflow-wrap: anywhere;
    }

    .profile-box-title {
        padding-inline: 15px;
    }
}

/* ==========================================================================
   NAME / PASSWORD / CONTACT FUNCTIONAL CONTROLS
   ========================================================================== */

@media (max-width: 760px) {
    .profile-contact-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .profile-contact-actions a,
    .profile-contact-actions span {
        width: 100%;
    }
}

.profile-name-fields input:disabled {
    background: #f8fafc;
    color: #667085;
}

.profile-name-fields input.is-editing {
    background: #fff;
    color: #173b2c;
    border-color: #1f4a38;
    box-shadow: 0 0 0 3px rgba(31,74,56,.12);
}

.profile-password-action {
    display: grid;
    align-content: end;
    gap: 8px;
}

.profile-password-action small {
    font-weight: 900;
    min-height: 18px;
}

@media (max-width: 760px) {
}

/* ==========================================================================
   GRADE CHANGE CONFIRMATION
   ========================================================================== */
.profile-grade-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(10, 31, 24, .64);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity .18s ease;
}

.profile-grade-confirm-overlay.is-visible {
    opacity: 1;
}

.profile-grade-confirm-dialog {
    position: relative;
    width: min(520px, 100%);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .62);
    border-radius: 24px;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, .99) 0%,
            rgba(255, 252, 245, .99) 100%
        );
    box-shadow:
        0 28px 80px rgba(12, 41, 31, .28),
        0 3px 12px rgba(12, 41, 31, .08);
    padding: 30px;
    text-align: center;
    transform: translateY(10px) scale(.985);
    transition:
        transform .2s ease,
        opacity .2s ease;
}

.profile-grade-confirm-overlay.is-visible
.profile-grade-confirm-dialog {
    transform: translateY(0) scale(1);
}

.profile-grade-confirm-close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid #e4ddd1;
    border-radius: 999px;
    background: #fff;
    color: #526158;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.profile-grade-confirm-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background:
        linear-gradient(
            135deg,
            #f4d77b 0%,
            #dfa83f 100%
        );
    color: #173b2c;
    font-size: 34px;
    font-weight: 1000;
    box-shadow:
        0 14px 30px rgba(210, 157, 54, .22);
}

.profile-grade-confirm-copy {
    display: grid;
    justify-items: center;
}

.profile-grade-confirm-kicker {
    display: inline-flex;
    padding: 6px 11px;
    border-radius: 999px;
    background: #edf6f1;
    color: #276347;
    font-size: 12px;
    font-weight: 900;
}

.profile-grade-confirm-copy h3 {
    margin: 12px 0 8px;
    color: #173b2c;
    font-size: clamp(21px, 3vw, 27px);
    font-weight: 1000;
    line-height: 1.3;
}

.profile-grade-confirm-copy p {
    margin: 0;
    color: #667085;
    font-size: 14px;
    line-height: 1.7;
}

.profile-grade-confirm-target {
    display: block;
    margin-top: 8px;
    color: #173b2c;
    font-size: 19px;
    font-weight: 1000;
}

.profile-grade-confirm-alert {
    width: 100%;
    box-sizing: border-box;
    margin-top: 20px;
    padding: 16px 17px;
    display: grid;
    gap: 6px;
    border: 1px solid #ead7aa;
    border-radius: 16px;
    background: #fff9e8;
    text-align: right;
}

.profile-grade-confirm-alert strong {
    color: #794b00;
    font-size: 14px;
    font-weight: 1000;
    line-height: 1.7;
}

.profile-grade-confirm-alert span {
    color: #765f31;
    font-size: 12.5px;
    line-height: 1.7;
}

.profile-grade-confirm-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    margin-top: 22px;
}

.profile-grade-confirm-actions .profile-action {
    min-height: 48px;
    justify-content: center;
    text-align: center;
    font-weight: 950;
}

.profile-grade-confirm-submit {
    background: #173b2c;
    color: #fff;
    border-color: #173b2c;
}

.profile-grade-confirm-cancel {
    background: #fff;
}

@media (max-width: 600px) {
    .profile-grade-confirm-overlay {
        align-items: end;
        padding: 12px;
    }

    .profile-grade-confirm-dialog {
        width: 100%;
        border-radius: 22px;
        padding:
            26px 18px
            calc(18px + env(safe-area-inset-bottom));
    }

    .profile-grade-confirm-actions {
        grid-template-columns: 1fr;
    }

    .profile-grade-confirm-submit {
        order: 1;
    }

    .profile-grade-confirm-cancel {
        order: 2;
    }
}

/* ==========================================================================
   PHASE5C1_CLAIM_VISUAL_POLISH_V5
   Canonical Section 05 account-completion controls.
   ========================================================================== */

.profile-admin-communication-grid
    > .profile-admin-claim-card {
    grid-column: 1 / -1;
}

.profile-admin-claim-card {
    position: relative;
    overflow: hidden;
    gap: 16px;
    padding: 20px;
    border: 1px solid rgba(20, 82, 63, 0.14);
    background:
        linear-gradient(
            135deg,
            rgba(244, 250, 247, 0.98),
            rgba(255, 252, 245, 0.98)
        );
}

.profile-admin-claim-card::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #166247;
}

.profile-admin-claim-card.is-unclaimed::before {
    background: #c7922c;
}

.profile-admin-claim-card
    .profile-admin-tool-head {
    margin-bottom: 2px;
}

.profile-admin-claim-card
    .profile-admin-tool-head strong {
    font-size: 17px;
}

.profile-admin-claim-card
    .profile-admin-tool-head span {
    max-width: 620px;
    line-height: 1.7;
}

.profile-claim-status-grid {
    display: grid;
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
    gap: 10px;
}

.profile-claim-status-item {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 13px;
    border: 1px solid rgba(15, 61, 47, 0.09);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.78);
}

.profile-claim-status-item > span {
    color: #68766f;
    font-size: 12px;
    font-weight: 700;
}

.profile-claim-status-item > strong {
    min-width: 0;
    text-align: end;
}

.profile-claim-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 900;
    white-space: nowrap;
}

.profile-claim-badge.is-success {
    color: #0c6548;
    background: #e8f7ef;
    border: 1px solid #bce5cf;
}

.profile-claim-badge.is-warning {
    color: #825d0a;
    background: #fff5d8;
    border: 1px solid #efd99c;
}

.profile-claim-badge.is-danger {
    color: #9b3228;
    background: #fff0ed;
    border: 1px solid #f1c9c3;
}

.profile-claim-badge.is-neutral {
    color: #52625b;
    background: #f2f5f3;
    border: 1px solid #dce4df;
}

.profile-claim-expiry {
    color: #183e32;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 850;
}

.profile-claim-code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border: 1px dashed rgba(19, 89, 65, 0.25);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
}

.profile-claim-code-copy {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.profile-claim-code-copy > span {
    flex: 0 0 auto;
    color: #68766f;
    font-size: 12px;
    font-weight: 800;
}

.profile-claim-code {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 10px;
    color: #123f31;
    background: #edf7f2;
    border: 1px solid #c8e3d6;
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        "Liberation Mono",
        monospace;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.07em;
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
}

.profile-claim-code-box > small {
    color: #7a837f;
    font-size: 11px;
    line-height: 1.6;
}

.profile-admin-claim-card
    .profile-admin-tool-actions {
    justify-content: flex-start;
    gap: 8px;
    margin-top: 0;
}

.profile-admin-claim-card
    .profile-action {
    min-height: 38px;
    border-radius: 11px;
    padding-inline: 15px;
}

.profile-claim-copy-btn {
    background: #ffffff;
}

@media (max-width: 760px) {
    .profile-admin-claim-card {
        padding: 14px;
        gap: 12px;
    }

    .profile-claim-status-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .profile-claim-status-item {
        padding: 10px 11px;
    }

    .profile-claim-code-box {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .profile-claim-code-copy {
        justify-content: space-between;
    }

    .profile-claim-code {
        max-width: 100%;
        overflow-x: auto;
    }

    .profile-admin-claim-card
        .profile-admin-tool-actions {
        display: grid;
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .profile-admin-claim-card
        .profile-admin-tool-actions
        .profile-action {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 420px) {
    .profile-admin-claim-card {
        padding: 12px;
        border-radius: 14px;
    }

    .profile-admin-claim-card
        .profile-admin-tool-head strong {
        font-size: 15px;
    }

    .profile-admin-claim-card
        .profile-admin-tool-head span {
        font-size: 11px;
    }

    .profile-claim-status-item {
        gap: 8px;
    }

    .profile-claim-status-item > span,
    .profile-claim-badge {
        font-size: 11px;
    }

    .profile-claim-code-copy {
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
    }

    .profile-claim-code {
        width: 100%;
        justify-content: center;
        font-size: 13px;
    }

    .profile-admin-claim-card
        .profile-admin-tool-actions {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   PHASE5C1_CLAIM_ONE_TIME_WARNING_V6
   ========================================================================== */

.profile-claim-code-note {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 220px;
    padding: 9px 11px;
    border-radius: 11px;
    background: #fff8e6;
    border: 1px solid #edd99f;
}

.profile-claim-code-note strong {
    color: #7c5b0c;
    font-size: 12px;
    font-weight: 900;
}

.profile-claim-code-note span {
    color: #766b50;
    font-size: 11px;
    line-height: 1.5;
}

@media (max-width: 760px) {
    .profile-claim-code-note {
        min-width: 0;
        width: 100%;
    }
}

