:root {
    --navy: #15477f;
    --navy-2: #0f3766;
    --sky: #67c7ef;
    --sky-2: #e7f7fd;
    --ink: #15314f;
    --muted: #6d7c8f;
    --line: #dce7f3;
    --soft: #f3f7fb;
    --white: #ffffff;
    --green: #1f9d68;
    --green-soft: #e9f8f1;
    --amber: #b9770e;
    --amber-soft: #fff7e6;
    --red: #c2413f;
    --red-soft: #fff0ef;
    --shadow: 0 18px 45px rgba(21, 71, 127, 0.08);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--soft);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
}

.app-root {
    min-height: 100vh;
}

.boot-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 18px;
    text-align: center;
    padding: 24px;
}

.boot-screen img {
    width: min(280px, 80vw);
}

.login-page {
    min-height: calc(100vh - 52px);
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
    background: var(--soft);
}

.login-brand {
    background: var(--white);
    border-right: 1px solid var(--line);
    padding: clamp(28px, 5vw, 54px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 36px;
}

.login-brand img {
    width: min(300px, 82%);
}

.login-brand h1,
.page-title h1 {
    color: var(--navy);
    font-size: clamp(34px, 4vw, 58px);
    line-height: 1;
    margin: 18px 0 14px;
}

.login-brand p,
.page-title p,
.muted {
    color: var(--muted);
    line-height: 1.55;
}

.login-card-wrap {
    display: grid;
    place-items: center;
    padding: clamp(18px, 4vw, 54px);
}

.login-card {
    width: min(480px, 100%);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(22px, 4vw, 34px);
}

.login-footer {
    min-height: 52px;
    display: grid;
    place-items: center;
    padding: 12px 18px;
    border-top: 1px solid var(--line);
    background: var(--white);
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    text-align: center;
}

.postulate-page {
    width: min(1180px, calc(100% - 28px));
    min-height: calc(100vh - 52px);
    display: grid;
    grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr);
    gap: 18px;
    align-items: start;
    margin: 0 auto;
    padding: 24px 0;
}

.postulate-brand,
.postulate-card,
.application-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 34px rgba(21, 71, 127, 0.06);
}

.postulate-brand {
    position: sticky;
    top: 18px;
    padding: 24px;
}

.postulate-brand img {
    width: min(240px, 82%);
}

.postulate-brand h1 {
    margin: 14px 0 12px;
    color: var(--navy);
    font-size: 38px;
    line-height: 1.05;
}

.postulate-brand p,
.postulate-card p {
    color: var(--muted);
    line-height: 1.55;
}

.postulate-card {
    padding: clamp(18px, 3vw, 28px);
}

.postulate-card h2 {
    margin: 22px 0 10px;
    color: var(--navy);
    font-size: 26px;
}

.postulate-card h2:first-child {
    margin-top: 0;
}

.application-questions {
    display: grid;
    gap: 12px;
}

.application-question {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfdff;
}

.application-question h3 {
    margin: 0 0 10px;
    color: var(--navy);
    font-size: 17px;
}

.eyebrow {
    margin: 0;
    color: var(--sky);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.field {
    display: grid;
    gap: 7px;
    margin-top: 16px;
}

.field span,
.field legend {
    color: var(--navy);
    font-size: 13px;
    font-weight: 850;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.field textarea {
    min-height: 94px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--sky);
    outline: 3px solid rgba(103, 199, 239, 0.2);
}

.field-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.check-row label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--navy);
    background: #fff;
    font-size: 13px;
    font-weight: 750;
}

.btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 850;
    color: var(--navy);
    background: #eaf6fc;
    transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(21, 71, 127, 0.12);
}

.btn.primary {
    color: #fff;
    background: var(--navy);
}

.btn.success {
    color: #fff;
    background: var(--green);
}

.btn.warning {
    color: #6b3d00;
    background: var(--amber-soft);
    border-color: rgba(185, 119, 14, 0.28);
}

.btn.danger {
    color: #fff;
    background: var(--red);
}

.btn.ghost {
    background: #fff;
    border-color: var(--line);
}

.btn.full {
    display: flex;
    width: 100%;
}

.btn.small {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
    box-shadow: none;
}

.demo-logins {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.demo-logins button {
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--navy);
    background: #fff;
    font-weight: 800;
}

.alert {
    margin: 16px 0;
    padding: 13px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    line-height: 1.45;
}

.alert.success {
    border-color: rgba(31, 157, 104, 0.28);
    background: var(--green-soft);
    color: #136244;
}

.alert.warning {
    border-color: rgba(185, 119, 14, 0.28);
    background: var(--amber-soft);
    color: #704700;
}

.alert.danger {
    border-color: rgba(194, 65, 63, 0.28);
    background: var(--red-soft);
    color: #7b2524;
}

.shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px;
    background: var(--white);
    border-right: 1px solid var(--line);
    overflow: auto;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-lockup img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.brand-lockup strong {
    display: block;
    color: var(--navy);
    font-size: 17px;
}

.brand-lockup span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.nav {
    display: grid;
    gap: 8px;
    margin: 26px 0;
}

.nav button {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: var(--muted);
    font-weight: 850;
    text-align: left;
}

.nav button.active,
.nav button:hover {
    color: var(--navy);
    background: var(--sky-2);
}

.user-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    background: #f9fbfe;
}

.user-panel strong {
    display: block;
    color: var(--navy);
}

.user-panel span {
    color: var(--muted);
    font-size: 13px;
}

.main {
    padding: clamp(18px, 4vw, 36px);
    min-width: 0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.page-title {
    max-width: 880px;
}

.page-title h1 {
    margin-top: 8px;
    font-size: clamp(30px, 3vw, 48px);
}

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

.grid {
    display: grid;
    gap: 16px;
}

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

.grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.stat,
.module-row,
.video-card,
.exam-card,
.admin-section,
.report-row {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 34px rgba(21, 71, 127, 0.06);
}

.card,
.stat,
.module-row,
.video-card,
.exam-card,
.admin-section {
    padding: 18px;
}

.video-card {
    display: flex;
    flex-direction: column;
}

.stat {
    min-height: 136px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat small {
    color: var(--muted);
    font-weight: 800;
}

.stat strong {
    color: var(--navy);
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.stat span {
    color: var(--muted);
    font-size: 13px;
}

.hero-panel {
    padding: clamp(18px, 4vw, 28px);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-panel h2,
.card h2,
.admin-section h2 {
    margin: 0 0 8px;
    color: var(--navy);
    font-size: clamp(22px, 2.5vw, 32px);
}

.hero-panel p,
.card p,
.video-card p,
.exam-card p,
.module-row p {
    color: var(--muted);
    line-height: 1.52;
}

.progress {
    height: 10px;
    border-radius: 999px;
    background: #edf3f8;
    overflow: hidden;
}

.progress > span {
    display: block;
    height: 100%;
    width: var(--value, 0%);
    background: var(--sky);
    border-radius: inherit;
}

.groomia-goal {
    display: grid;
    grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.goal-score,
.goal-main,
.goal-strip {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 34px rgba(21, 71, 127, 0.06);
}

.goal-score {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    min-height: 210px;
    padding: 18px;
    text-align: center;
}

.goal-score strong,
.goal-main h2,
.goal-counter strong,
.next-goal strong,
.goal-strip strong {
    color: var(--navy);
}

.goal-score small,
.goal-main p,
.goal-counter span,
.next-goal span,
.goal-strip small {
    color: var(--muted);
}

.stars {
    display: inline-flex;
    gap: 4px;
    color: #cbd6e4;
    font-size: 25px;
    line-height: 1;
}

.stars .filled {
    color: #f4b63f;
    text-shadow: 0 2px 8px rgba(244, 182, 63, 0.2);
}

.goal-main {
    padding: 18px;
}

.goal-head,
.next-goal,
.goal-strip {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.goal-main h2 {
    margin: 5px 0 8px;
    font-size: 30px;
}

.goal-counter {
    min-width: 112px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--sky-2);
    text-align: center;
}

.goal-counter strong {
    display: block;
    font-size: 28px;
    line-height: 1;
}

.goal-meter {
    margin: 16px 0;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.training-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--navy);
    background: #fff;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.training-badge.unlocked {
    border-color: rgba(31, 157, 104, 0.24);
    background: var(--green-soft);
    color: #136244;
}

.training-badge.locked {
    color: var(--muted);
    background: #f4f7fa;
}

.next-goal {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.goal-strip {
    margin-top: 16px;
    padding: 14px;
}

.goal-strip > div {
    display: grid;
    gap: 4px;
}

.goal-strip .stars {
    font-size: 18px;
}

.status-pill,
.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--navy);
    background: var(--sky-2);
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.status-pill.approved {
    color: #136244;
    background: var(--green-soft);
}

.status-pill.failed,
.status-pill.blocked {
    color: #7b2524;
    background: var(--red-soft);
}

.status-pill.pending {
    color: #704700;
    background: var(--amber-soft);
}

.tag.gray {
    color: var(--muted);
    background: #eef3f8;
}

.tag.green {
    color: #136244;
    background: var(--green-soft);
}

.tag.red {
    color: #7b2524;
    background: var(--red-soft);
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 16px;
    align-items: start;
}

.course-list,
.video-list,
.exam-list,
.report-list {
    display: grid;
    gap: 12px;
}

.module-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.module-row h3,
.video-card h3,
.exam-card h3,
.report-row h3 {
    margin: 0 0 6px;
    color: var(--navy);
}

.video-meta,
.exam-meta,
.inline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.video-meta {
    position: relative;
    z-index: 1;
    margin-bottom: 14px;
}

.video-card .btn {
    position: relative;
    z-index: 2;
    margin-top: auto;
}

.video-frame {
    height: 150px;
    display: grid;
    place-items: center;
    margin: -2px -2px 14px;
    border-radius: var(--radius);
    background: #eef7fc;
    border: 1px solid var(--line);
    color: var(--navy);
    font-weight: 850;
    text-align: center;
    padding: 16px;
}

.video-frame.has-thumb {
    padding: 0;
    overflow: hidden;
    background: #fff;
}

.video-frame.has-thumb img,
.admin-video-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.module-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
    gap: 16px;
    align-items: start;
}

.module-main {
    overflow: hidden;
}

.video-player,
.module-video-placeholder {
    width: 100%;
    margin: 18px 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #edf7fd;
    overflow: hidden;
}

.video-player {
    position: relative;
    aspect-ratio: 16 / 9;
}

.video-player iframe,
.video-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-player iframe.locked-youtube {
    pointer-events: none;
}

.video-sound-button {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 5;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--navy);
    font-size: 13px;
    font-weight: 850;
    box-shadow: var(--shadow);
}

.video-sound-button.active,
.video-sound-button:disabled {
    background: rgba(16, 122, 86, 0.94);
    color: #fff;
    opacity: 1;
}

.video-thumb {
    pointer-events: none;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.18;
}

.video-timer-pill {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 999px;
    background: rgba(16, 71, 128, 0.92);
    color: #fff;
    box-shadow: var(--shadow);
    pointer-events: none;
}

.video-timer-pill span {
    font-size: 11px;
    font-weight: 800;
}

.video-timer-pill strong {
    min-width: 52px;
    text-align: center;
    font-size: 18px;
    line-height: 1;
}

.video-timer-pill.done,
.video-timer-pill.ready {
    background: rgba(16, 122, 86, 0.94);
    font-weight: 850;
}

.module-video-placeholder {
    position: relative;
    min-height: 260px;
    display: grid;
    place-items: center;
    gap: 12px;
    padding: 22px;
    color: var(--navy);
    font-weight: 850;
    text-align: center;
}

.module-video-placeholder img {
    max-height: 230px;
    border-radius: var(--radius);
    object-fit: cover;
}

.watch-gate {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    margin: 16px 0;
    border: 1px solid rgba(103, 199, 239, 0.5);
    border-radius: var(--radius);
    background: var(--sky-2);
}

.watch-gate strong {
    color: var(--navy);
}

.watch-gate span,
.module-sequence small,
.admin-video-cell small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.watch-gate .progress {
    grid-column: 1 / -1;
}

.module-sequence {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.module-sequence a {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--navy);
    background: #fff;
    text-decoration: none;
    font-weight: 850;
}

.sequence-thumb {
    width: 64px;
    aspect-ratio: 16 / 10;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--sky-2);
    color: var(--navy);
    font-size: 16px;
    overflow: hidden;
}

.sequence-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sequence-copy {
    min-width: 0;
}

.sequence-copy strong {
    display: block;
    line-height: 1.2;
}

.module-sequence a.active,
.module-sequence a:hover {
    border-color: rgba(103, 199, 239, 0.7);
    background: var(--sky-2);
}

.module-sequence a.disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.admin-video-cell {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 220px;
}

.admin-video-cell > span,
.admin-video-cell img {
    width: 48px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--sky-2);
}

.admin-video-cell strong {
    display: block;
    color: var(--navy);
}

.inline-check {
    align-self: end;
    margin-bottom: 0;
}

.exam-taking {
    display: grid;
    gap: 16px;
}

.question-card {
    padding: 18px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.question-card h3 {
    margin: 0 0 14px;
    color: var(--navy);
    font-size: 18px;
}

.option {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px;
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.option input {
    margin-top: 3px;
}

.result-panel {
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--white);
}

.feedback-list {
    display: grid;
    gap: 10px;
}

.feedback-item {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.admin-tabs button {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--navy);
    background: #fff;
    font-weight: 800;
}

.admin-tabs button.active {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
    gap: 16px;
    align-items: start;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--navy);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

td {
    color: var(--muted);
}

.report-row {
    padding: 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.4fr);
    gap: 16px;
    align-items: center;
}

.application-list {
    display: grid;
    gap: 14px;
}

.application-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(170px, 0.25fr);
    gap: 14px;
    padding: 18px;
}

.application-card h2 {
    margin: 4px 0 6px;
    color: var(--navy);
    font-size: 24px;
}

.application-card p {
    color: var(--muted);
    line-height: 1.45;
}

.application-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.application-contact a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--sky-2);
    color: var(--navy);
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
}

.application-score {
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfdff;
    text-align: center;
}

.application-score strong {
    color: var(--navy);
    font-size: 34px;
    line-height: 1;
}

.application-score span,
.application-score small {
    color: var(--muted);
}

.application-answers,
.application-status-form {
    grid-column: 1 / -1;
}

.application-answers summary {
    cursor: pointer;
    color: var(--navy);
    font-weight: 850;
}

.application-status-form {
    display: grid;
    grid-template-columns: minmax(160px, 0.28fr) minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.certificate {
    position: relative;
    overflow: hidden;
    padding: clamp(24px, 5vw, 46px);
    background: #fff;
    border: 2px solid var(--navy);
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.certificate::before {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(103, 199, 239, 0.8);
    border-radius: var(--radius);
    pointer-events: none;
}

.certificate img {
    width: 100px;
    margin-bottom: 14px;
}

.certificate h2 {
    color: var(--navy);
    font-size: clamp(28px, 4vw, 48px);
    margin: 0;
}

.certificate h3 {
    color: var(--navy);
    font-size: clamp(22px, 3vw, 34px);
    margin: 14px 0;
}

.certificate p {
    color: var(--muted);
    line-height: 1.6;
}

.certificate-code {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--sky-2);
    color: var(--navy);
    font-weight: 850;
}

.empty {
    padding: 24px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1120px) {
    .grid.cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid.cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .split,
    .admin-grid,
    .module-layout,
    .groomia-goal,
    .postulate-page,
    .application-card,
    .application-status-form {
        grid-template-columns: 1fr;
    }

    .postulate-brand {
        position: static;
    }

    .goal-score {
        min-height: 0;
        align-content: start;
        justify-items: start;
        text-align: left;
    }
}

@media (max-width: 860px) {
    .login-page,
    .shell {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .login-brand {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .sidebar {
        position: sticky;
        top: 0;
        z-index: 30;
        height: auto;
        padding: 10px 12px 8px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        box-shadow: 0 12px 28px rgba(21, 71, 127, 0.08);
        overflow: visible;
        width: 100%;
        max-width: 100vw;
        min-width: 0;
    }

    .main {
        width: 100%;
        max-width: 100vw;
        min-width: 0;
    }

    .brand-lockup {
        gap: 9px;
    }

    .brand-lockup img {
        width: 42px;
        height: 42px;
    }

    .brand-lockup strong {
        font-size: 15px;
        line-height: 1.1;
    }

    .brand-lockup span {
        font-size: 11px;
    }

    .nav {
        display: flex;
        gap: 8px;
        margin: 10px -12px 0;
        padding: 0 12px 8px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        min-width: 0;
        max-width: calc(100% + 24px);
    }

    .nav::-webkit-scrollbar {
        display: none;
    }

    .nav button {
        flex: 0 0 auto;
        justify-content: center;
        gap: 6px;
        min-height: 38px;
        min-width: 84px;
        padding: 0 10px;
        border-color: var(--line);
        background: #fff;
        font-size: 13px;
        text-align: center;
        white-space: nowrap;
    }

    .nav button.active {
        border-color: rgba(103, 199, 239, 0.8);
        box-shadow: inset 0 -3px 0 rgba(103, 199, 239, 0.45);
    }

    .user-panel {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 10px;
        align-items: center;
        margin-top: 6px;
        padding: 9px 10px;
    }

    .user-panel strong,
    .user-panel span {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .user-panel .inline-tags {
        display: none;
    }

    .user-panel .btn.full {
        grid-row: 1 / span 2;
        grid-column: 2;
        width: auto;
        min-height: 34px;
        padding: 0 14px;
    }

    .topbar {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .main {
        padding: 14px;
    }

    .grid.cols-4,
    .grid.cols-3,
    .grid.cols-2,
    .field-group,
    .demo-logins,
    .report-row,
    .module-row,
    .watch-gate {
        grid-template-columns: 1fr;
    }

    .actions,
    .topbar .actions {
        width: 100%;
    }

    .actions .btn,
    .topbar .btn,
    .next-goal .btn,
    .goal-strip .btn,
    .application-status-form .btn {
        flex: 1 1 100%;
    }

    .postulate-page {
        width: min(100% - 20px, 640px);
        padding: 12px 0;
    }

    .postulate-brand h1 {
        font-size: 30px;
    }

    .goal-head,
    .next-goal,
    .goal-strip {
        align-items: stretch;
        flex-direction: column;
    }

    .goal-counter {
        width: 100%;
    }

    .goal-main h2 {
        font-size: 24px;
    }

    .video-timer-pill {
        top: 8px;
        right: 8px;
        gap: 6px;
        padding: 7px 8px;
    }

    .video-timer-pill span {
        display: none;
    }

    .video-timer-pill strong {
        min-width: 48px;
        font-size: 16px;
    }

    .video-sound-button {
        left: 8px;
        bottom: 8px;
        min-height: 34px;
        padding: 0 10px;
        font-size: 12px;
    }

    .nav button {
        min-width: 78px;
        font-size: 12px;
    }

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

    .user-panel > span {
        font-size: 12px;
    }

    .login-brand h1,
    .page-title h1 {
        font-size: 34px;
    }

    .stat {
        min-height: 110px;
    }
}

@media (hover: none) {
    .btn:hover {
        transform: none;
        box-shadow: none;
    }
}

@media print {
    body {
        background: #fff;
    }

    .sidebar,
    .topbar,
    .actions,
    .nav,
    .alert,
    .btn {
        display: none !important;
    }

    .shell {
        display: block;
    }

    .main {
        padding: 0;
    }

    .certificate {
        box-shadow: none;
        page-break-inside: avoid;
    }
}
