.life-global-button {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    min-height: 33px !important;
    padding: 7px 11px !important;
    border: 1px solid #cee4e2 !important;
    border-radius: 8px !important;
    color: #087f76 !important;
    background: #edf8f7 !important;
    box-shadow: none !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
}

.life-global-button:hover {
    color: #fff !important;
    background: #15988e !important;
}

.life-global-mobile-button {
    width: 100%;
    margin-top: 8px;
}

.life-global-tooltip {
    position: fixed;
    z-index: 2147483646;
    width: max-content;
    max-width: 230px;
    padding: 7px 9px;
    border-radius: 6px;
    border: 1px solid #d5dde6;
    color: inherit;
    background: #ffffff;
    box-shadow: 0 5px 14px rgba(23, 48, 74, 0.12);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.35;
    pointer-events: none;
}

.life-global-tooltip[hidden] {
    display: none;
}

.life-global-modal[hidden] {
    display: none !important;
}

.life-global-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483647 !important;
    display: grid !important;
    place-items: center !important;
    padding: clamp(6px, 1.2vw, 18px) !important;
    isolation: isolate !important;
    transform: none !important;
}

html body.life-global-open > *:not(.life-global-modal):not(.life-student-results) {
    z-index: 0 !important;
}

html body.life-global-open header.page-header,
html body.life-global-open header.page-header .topbar,
html body.life-global-open .hero-panel,
html body.life-global-open .main-content,
html body.life-global-open .footer {
    z-index: 0 !important;
}

.life-global-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(circle at 18% 12%, rgba(21, 152, 142, .18), transparent 34%),
        radial-gradient(circle at 86% 16%, rgba(15, 96, 116, .2), transparent 32%),
        rgba(16, 38, 59, .64);
    backdrop-filter: blur(7px);
}

.life-global-dialog {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    width: min(1640px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    overflow: hidden;
    border: 1px solid rgba(204, 223, 229, .95);
    border-radius: 16px;
    color: #172f49;
    background: #f5f8fb;
    box-shadow: 0 28px 80px rgba(9, 29, 48, .38);
}

.life-global-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    min-height: 118px;
    padding: 24px 24px 20px;
    border-bottom: 1px solid rgba(21, 152, 142, .18);
    background:
        linear-gradient(135deg, rgba(21, 152, 142, .18), rgba(255, 255, 255, .94) 42%, rgba(15, 96, 116, .08)),
        #ffffff;
    overflow: hidden;
}

.life-global-header::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 7px;
    height: 100%;
    background: linear-gradient(180deg, #15988e, #0f6074);
}

.life-global-header::after {
    content: "";
    position: absolute;
    right: 86px;
    top: 22px;
    width: 132px;
    height: 132px;
    border: 24px solid rgba(21, 152, 142, .08);
    border-radius: 50%;
    pointer-events: none;
}

.life-global-header p,
.life-global-header h2 {
    margin: 0;
}

.life-global-header > div {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 5px;
}

.life-global-header p {
    color: #087f76;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.life-global-header h2 {
    color: #172f49;
    font-size: 30px;
    line-height: 1.1;
}

.life-global-close {
    position: relative;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(15, 96, 116, .18);
    border-radius: 12px;
    color: #0f3855;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 12px 26px rgba(23, 48, 74, .12);
    cursor: pointer;
    font-size: 24px;
    transition: transform .18s ease, background .18s ease, color .18s ease;
}

.life-global-close:hover,
.life-global-close:focus-visible {
    color: #ffffff;
    background: #0f6074;
    transform: translateY(-1px);
}

.life-global-selectors {
    position: relative;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(180px, .7fr) minmax(260px, 1.3fr);
    align-items: start;
    gap: 16px;
    padding: 18px 24px;
    border-bottom: 1px solid #dce5ea;
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,253,.96)),
        #ffffff;
}

.life-global-selectors label {
    display: grid;
    gap: 8px;
    min-height: 92px;
    padding: 12px;
    border: 1px solid rgba(203, 219, 229, .95);
    border-radius: 14px;
    color: #46617d;
    background: linear-gradient(180deg, #ffffff, #f8fbfd);
    box-shadow: 0 10px 22px rgba(23, 48, 74, .06);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.life-global-selectors select,
.life-global-selectors input {
    min-height: 48px;
    padding: 8px 14px;
    border: 1px solid #cbdbe5;
    border-radius: 10px;
    color: #172f49;
    background: #f9fcfe;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
    font-size: 14px;
    font-weight: 800;
}

.life-global-selectors select option {
    font-size: 14px;
    font-weight: 700;
}

.life-global-selectors select:focus,
.life-global-selectors input:focus {
    outline: 3px solid rgba(21, 152, 142, .15);
    border-color: #15988e;
    background: #ffffff;
}

.life-global-selectors input:disabled {
    color: #7a8ba0;
    background: #f3f6f8;
    cursor: not-allowed;
}

.life-student-search-field {
    position: relative;
}

.life-student-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 40;
    max-height: min(270px, calc(100vh - 250px));
    overflow-y: auto;
    border: 1px solid #cad8e4;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(16, 38, 59, .16);
    scrollbar-width: thin;
}

.life-student-panel {
    display: grid;
    align-content: start;
}

.life-student-results[hidden] {
    display: none;
}

.life-student-result {
    display: grid;
    gap: 2px;
    width: 100%;
    min-height: 50px;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid #e2e8ed;
    border-radius: 0;
    color: #172f49;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.life-student-result:last-child {
    border-bottom: 0;
}

.life-student-result:hover,
.life-student-result:focus {
    outline: none;
    background: #edf8f7;
}

.life-student-result strong {
    font-size: 13px;
    line-height: 1.25;
}

.life-student-result span {
    color: #61758d;
    font-size: 12px;
    line-height: 1.2;
}

.life-student-empty-result {
    color: #61758d;
    font-size: 12px;
    line-height: 1.25;
    padding: 8px 10px;
    background: #fff;
}

.life-global-content {
    position: relative;
    z-index: 1;
    overflow-y: auto;
    min-height: 190px;
    padding: 24px;
    background:
        linear-gradient(180deg, #f7fafc, #eef4f8);
}

.life-student-profile {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(4, minmax(105px, 145px));
    gap: 9px;
    margin-bottom: 14px;
}

.life-profile-main,
.life-stat,
.life-record-section {
    border: 1px solid rgba(210, 224, 234, .95);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(23, 48, 74, .06);
}

.life-profile-main {
    padding: 16px;
    border-left: 4px solid #15988e;
}

.life-profile-main h3,
.life-profile-main p {
    margin: 0;
}

.life-profile-main h3 {
    color: #172f49;
    font-size: 19px;
}

.life-profile-main p {
    margin-top: 4px;
    color: #61758d;
    font-size: 11px;
}

.life-stat {
    display: grid;
    align-content: center;
    padding: 12px;
    background: linear-gradient(180deg, #ffffff, #f8fbfd);
}

.life-stat strong {
    color: #15988e;
    font-size: 24px;
}

.life-stat span {
    color: #61758d;
    font-size: 10px;
    font-weight: 800;
}

.life-record-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.life-record-section {
    overflow: hidden;
}

.life-record-section > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8ed;
    background: linear-gradient(180deg, #ffffff, #f5faf9);
}

.life-record-section h4 {
    margin: 0;
    color: #172f49;
    font-size: 13px;
}

.life-record-count {
    display: inline-flex;
    min-width: 24px;
    justify-content: center;
    padding: 3px 7px;
    border-radius: 999px;
    color: #ffffff;
    background: #15988e;
    font-size: 10px;
    font-weight: 900;
}

.life-record-list {
    display: grid;
    gap: 7px;
    max-height: 330px;
    overflow-y: auto;
    padding: 10px;
}

.life-record-section.life-wide {
    grid-column: span 2;
}

.life-record-section.life-full {
    grid-column: 1 / -1;
}

.life-record-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

.life-record-table th,
.life-record-table td {
    padding: 8px;
    border-bottom: 1px solid #e5ebef;
    color: #526b87;
    text-align: left;
}

.life-record-table th {
    color: #172f49;
    background: #edf8f7;
    font-weight: 900;
}

.life-record-table strong {
    color: #087f76;
}

.life-record {
    padding: 10px 11px;
    border: 1px solid #e3e9ee;
    border-left: 3px solid #71839a;
    border-radius: 9px;
    background: linear-gradient(180deg, #ffffff, #fbfdfe);
    box-shadow: 0 2px 8px rgba(23, 48, 74, .04);
}

.life-record.positive { border-left-color: #15988e; }
.life-record.negative { border-left-color: #d86666; }
.life-record.warning { border-left-color: #df940b; }

.life-record strong,
.life-record span,
.life-record p {
    margin: 0;
}

.life-record strong {
    color: #172f49;
    font-size: 11px;
}

.life-record span {
    color: #71839a;
    font-size: 9px;
    font-weight: 800;
}

.life-record p {
    margin-top: 4px;
    color: #526b87;
    font-size: 10px;
    line-height: 1.35;
    white-space: pre-wrap;
}

.life-global-empty {
    position: relative;
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 210px;
    padding: 48px 20px;
    border: 1px dashed rgba(21, 152, 142, .28);
    border-radius: 16px;
    text-align: center;
    color: #61758d;
    background:
        linear-gradient(180deg, rgba(255,255,255,.84), rgba(247,250,252,.9)),
        #ffffff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
    font-size: 14px;
    font-weight: 700;
}

.life-global-empty::before {
    content: "\1F4CB";
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border: 1px solid rgba(21, 152, 142, .2);
    border-radius: 18px;
    color: #087f76;
    background: #ffffff;
    box-shadow: 0 14px 28px rgba(23, 48, 74, .08);
    font-size: 25px;
}

@media (max-width: 800px) {
    .life-global-modal {
        padding: 7px;
    }

    .life-global-dialog {
        max-height: calc(100vh - 14px);
    }

    .life-global-selectors,
    .life-record-grid,
    .life-student-profile {
        grid-template-columns: 1fr;
    }

    .life-record-section.life-wide,
    .life-record-section.life-full {
        grid-column: auto;
    }

    .life-global-content {
        padding: 12px;
    }
}
