:root {
    --portal-mint: #54c9b5;
    --portal-mint-dark: #238b7b;
    --portal-mint-soft: #e8f8f3;
    --portal-coral: #ff8075;
    --portal-coral-dark: #ec665c;
    --portal-cream: #fff9e9;
    --portal-yellow: #f3c95d;
    --portal-sky: #bce8f1;
    --portal-ink: #303238;
    --portal-muted: #68727a;
    --portal-border: #e8ece8;
    --portal-shadow: 0 18px 45px rgba(60, 84, 78, .10);
}
* { box-sizing: border-box; }
body.portal-profile-page {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 5% 9%, rgba(84,201,181,.15) 0 72px, transparent 73px),
        radial-gradient(circle at 93% 12%, rgba(188,232,241,.28) 0 95px, transparent 96px),
        var(--portal-cream);
    color: var(--portal-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.portal-header { position: sticky; top: 0; z-index: 50; padding: 12px 18px 0; }
.portal-header-inner {
    max-width: 1180px; margin: 0 auto; min-height: 68px; padding: 10px 18px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    background: rgba(239, 250, 246, .94); border: 1px solid rgba(84,201,181,.18);
    border-radius: 22px; box-shadow: 0 10px 30px rgba(50,81,74,.08); backdrop-filter: blur(16px);
}
.brand-link { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
.brand-logo { width: 48px; height: 48px; object-fit: contain; flex: none; filter: drop-shadow(0 8px 20px rgba(31,87,78,.12)); }
.brand-link span { display: grid; line-height: 1.05; }
.brand-link strong { font-size: 15px; font-weight: 850; }
.brand-link small { margin-top: 5px; color: var(--portal-mint-dark); font-size: 11px; font-weight: 700; }
.portal-actions { display: flex; align-items: center; gap: 2px; padding: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
.top-link { position: relative; border: 0; background: transparent !important; display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px; border-radius: 999px; color: #4a5658; text-decoration: none; font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; transition: color .2s ease, transform .2s ease; }
.top-link::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px; border-radius: 999px; background: linear-gradient(90deg, var(--portal-mint), var(--portal-coral)); transform: scaleX(0); transform-origin: center; transition: transform .22s ease; opacity: .92; }
.top-link:hover { background: transparent !important; color: var(--portal-mint-dark); transform: translateY(-1px); }
.top-link:hover::after, .top-link:focus-visible::after { transform: scaleX(1); }
.top-link:focus-visible { outline: 0; color: var(--portal-mint-dark); }
.top-link.danger:hover { color: #cf4d45; background: transparent !important; }
.top-link.danger::after { background: linear-gradient(90deg, #ffb2aa, #ff8075); }
.portal-shell { width: min(1180px, calc(100% - 32px)); margin: 96px auto 50px; }
.hidden { display: none !important; }
.auth-gate { min-height: calc(100vh - 160px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 470px); gap: 30px; align-items: center; }
.auth-illustration { min-height: 520px; position: relative; border-radius: 42px; overflow: hidden; background: linear-gradient(135deg, #e3f8f2, #fef6d8 62%, #ffdfd9); box-shadow: var(--portal-shadow); }
.auth-illustration::after { content: "Pantau proses pendaftaran dengan mudah"; position: absolute; left: 36px; right: 36px; bottom: 34px; font-size: clamp(26px, 4vw, 48px); line-height: 1.05; font-weight: 900; max-width: 480px; color: #2d5f58; }
.mini-school { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); width: 190px; height: 190px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--portal-coral); font-size: 82px; box-shadow: 0 18px 45px rgba(70,109,99,.12); }
.shape { position: absolute; border-radius: 50%; }
.shape-one { width: 110px; height: 110px; background: var(--portal-sky); top: 45px; right: 40px; }
.shape-two { width: 78px; height: 78px; background: var(--portal-yellow); top: 240px; left: 45px; }
.shape-three { width: 58px; height: 58px; background: var(--portal-mint); top: 270px; right: 70px; }
.auth-card { background: rgba(255,255,255,.96); border-radius: 32px; padding: 34px; box-shadow: var(--portal-shadow); border: 1px solid rgba(84,201,181,.12); }
.eyebrow, .panel-kicker { display: inline-block; color: var(--portal-mint-dark); font-size: 11px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.eyebrow.light { color: rgba(255,255,255,.82); }
.auth-card h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.08; margin: 10px 0 12px; font-weight: 900; }
.auth-card > p { color: var(--portal-muted); line-height: 1.65; margin-bottom: 24px; }
.auth-form { display: grid; gap: 14px; }
.auth-form label, .modal-card label { display: grid; gap: 7px; color: #4c5557; font-size: 13px; font-weight: 750; }
.auth-form input, .modal-card input { width: 100%; border: 1px solid #dbe5e1; background: #fbfdfc; border-radius: 14px; padding: 13px 14px; outline: none; font: inherit; color: var(--portal-ink); }
.auth-form input:focus, .modal-card input:focus { border-color: var(--portal-mint); box-shadow: 0 0 0 4px rgba(84,201,181,.12); }
.primary-button, .google-button { min-height: 46px; border-radius: 15px; border: 0; padding: 11px 16px; font: inherit; font-size: 14px; font-weight: 850; cursor: pointer; display: inline-flex; justify-content: center; align-items: center; gap: 8px; text-decoration: none; }
.primary-button { background: var(--portal-coral); color: white; box-shadow: 0 10px 22px rgba(255,128,117,.22); }
.primary-button:hover { background: var(--portal-coral-dark); transform: translateY(-1px); }
.google-button { width: 100%; margin-top: 12px; background: white; border: 1px solid #dde4e1; color: #444; }
.google-button:hover { background: #f9fbfa; }
.text-button { margin: 12px auto 0; display: block; border: 0; background: transparent; color: var(--portal-mint-dark); font-weight: 750; cursor: pointer; }
.auth-footnote { text-align: center; font-size: 13px; color: var(--portal-muted); }
.auth-footnote a { color: var(--portal-mint-dark); font-weight: 800; }
.message-box { padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; font-size: 13px; background: #fff1ef; color: #a33e37; border: 1px solid #ffd4cf; }
.dashboard { display: grid; gap: 22px; }
.welcome-banner { min-height: 180px; padding: 30px; border-radius: 32px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; color: #fff; background: linear-gradient(125deg, #45b9a5, #62cfbd 58%, #94ded1); position: relative; overflow: hidden; box-shadow: var(--portal-shadow); }
.welcome-banner::before, .welcome-banner::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.13); }
.welcome-banner::before { width: 220px; height: 220px; right: -45px; top: -85px; }
.welcome-banner::after { width: 110px; height: 110px; right: 170px; bottom: -55px; }
.welcome-banner > * { position: relative; z-index: 1; }
.welcome-banner h1 { margin: 8px 0 6px; font-size: clamp(29px, 4vw, 46px); line-height: 1.06; font-weight: 900; }
.welcome-banner p { margin: 0; color: rgba(255,255,255,.88); max-width: 720px; }
.welcome-badge-wrap { display: grid; justify-items: end; gap: 8px; }
.soft-badge, .id-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 7px 11px; font-size: 11px; font-weight: 850; background: var(--portal-mint-soft); color: var(--portal-mint-dark); white-space: nowrap; }
.welcome-banner .soft-badge { background: rgba(255,255,255,.96); color: #238b7b; border: 1px solid rgba(255,255,255,.98); box-shadow: 0 7px 18px rgba(36,83,75,.10); }
.sync-text { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 11px; border-radius: 999px; background: rgba(255,255,255,.78); color: #46625c; border: 1px solid rgba(255,255,255,.82); box-shadow: 0 6px 16px rgba(36,83,75,.07); font-size: 11px; font-weight: 750; }
.sync-text i { color: #238b7b; }
.welcome-logout-btn { min-height: 40px; border: 0; border-radius: 999px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #ef5350; color: #fff; font: inherit; font-size: 12px; font-weight: 850; cursor: pointer; border: 1px solid rgba(185,28,28,.12); box-shadow: 0 8px 18px rgba(239,83,80,.22); transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.welcome-logout-btn i { color: #fff; }
.welcome-logout-btn:hover { background: #dc3f3c; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(220,63,60,.26); }

.loading-card { display: flex; align-items: center; gap: 15px; background: #fff; border-radius: 22px; padding: 22px 24px; border: 1px solid var(--portal-border); box-shadow: 0 10px 26px rgba(64,89,82,.06); }
.loading-card div:last-child { display: grid; gap: 3px; }
.loading-card span { font-size: 13px; color: var(--portal-muted); }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #d8f2ec; border-top-color: var(--portal-mint); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.dashboard-grid { display: grid; gap: 22px; }
.top-grid { grid-template-columns: minmax(280px, .75fr) minmax(0, 1.55fr); }
.detail-grid { grid-template-columns: minmax(0, 1.35fr) minmax(320px, .75fr); margin-top: 22px; }
.panel { background: #fff; border: 1px solid var(--portal-border); border-radius: 28px; padding: 24px; box-shadow: 0 12px 34px rgba(67,88,82,.07); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.panel-heading h2 { margin: 4px 0 0; font-size: 20px; font-weight: 900; letter-spacing: -.02em; }
.icon-button { width: 38px; height: 38px; border-radius: 12px; border: 1px solid #e4ebe8; background: #f9fbfa; color: var(--portal-mint-dark); cursor: pointer; }
.icon-button:hover { background: var(--portal-mint-soft); }
.profile-identity { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 20px; background: linear-gradient(135deg, #effaf7, #fff9e9); }
.profile-avatar { width: 66px; height: 66px; border-radius: 50%; object-fit: cover; background: #fff; border: 4px solid #fff; box-shadow: 0 8px 20px rgba(60,95,84,.12); }
.profile-identity h3 { margin: 0; font-size: 18px; font-weight: 900; }
.profile-identity p { margin: 4px 0 0; color: var(--portal-muted); font-size: 12px; overflow-wrap: anywhere; }
.mini-detail-list { margin: 18px 0 0; display: grid; gap: 0; }
.mini-detail-list div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px dashed #e9eeec; }
.mini-detail-list dt { color: var(--portal-muted); font-size: 12px; }
.mini-detail-list dd { margin: 0; font-size: 12px; font-weight: 800; text-align: right; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: #49bf83; margin-right: 5px; box-shadow: 0 0 0 3px rgba(73,191,131,.13); }
.privacy-note, .edit-warning { display: flex; align-items: flex-start; gap: 9px; margin: 16px 0 0; padding: 12px; border-radius: 15px; background: #f6faf8; color: #65706c; font-size: 11px; line-height: 1.5; }
.progress-heading { align-items: center; }
.registration-selector { max-width: 250px; border: 1px solid #dfe9e5; background: #fbfdfc; border-radius: 12px; padding: 10px 34px 10px 12px; color: #43504c; font-size: 12px; font-weight: 750; }
.status-summary { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 18px; border-radius: 20px; background: linear-gradient(135deg, #f3fbf8, #fff9ea); margin-bottom: 18px; }
.status-summary h3 { margin: 0 0 4px; font-size: 21px; font-weight: 900; }
.status-summary p { margin: 0; color: var(--portal-muted); font-size: 12px; line-height: 1.5; }
.current-status { min-width: 105px; padding: 10px 13px; border-radius: 14px; text-align: center; font-size: 12px; font-weight: 900; }
.status-new { color: #7e651d; background: #fff4ca; }
.status-verified { color: #277769; background: #dff6ef; }
.status-success { color: #2f7b4e; background: #e3f6e9; }
.status-danger { color: #a54842; background: #ffe8e5; }
.status-neutral { color: #52616b; background: #edf2f4; }
.progress-track { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.progress-step { min-width: 0; position: relative; text-align: center; padding: 0 4px; }
.progress-step::before { content: ""; position: absolute; left: calc(50% + 17px); right: calc(-50% + 17px); top: 16px; height: 3px; background: #e7eeeb; z-index: 0; }
.progress-step:last-child::before { display: none; }
.progress-step.completed::before { background: #8ddccc; }
.progress-node { width: 34px; height: 34px; margin: 0 auto 9px; border-radius: 50%; display: grid; place-items: center; position: relative; z-index: 1; background: #edf2f0; color: #8b9994; font-size: 12px; border: 3px solid white; box-shadow: 0 0 0 1px #e1e8e5; }
.progress-step.completed .progress-node { background: var(--portal-mint); color: #fff; box-shadow: 0 0 0 1px var(--portal-mint); }
.progress-step.current .progress-node { background: var(--portal-coral); color: #fff; box-shadow: 0 0 0 5px rgba(255,128,117,.13); }
.progress-step strong { display: block; font-size: 10px; font-weight: 850; line-height: 1.25; }
.progress-step span { display: block; margin-top: 3px; color: #8a9591; font-size: 9px; line-height: 1.2; }
.empty-registration { margin-top: 22px; background: #fff; padding: 42px 24px; text-align: center; border-radius: 28px; border: 1px solid var(--portal-border); box-shadow: 0 12px 34px rgba(67,88,82,.07); }
.empty-icon { width: 72px; height: 72px; border-radius: 24px; margin: 0 auto 16px; display: grid; place-items: center; background: #fff0ed; color: var(--portal-coral); font-size: 30px; }
.empty-registration h2 { font-size: 23px; margin: 0 0 8px; font-weight: 900; }
.empty-registration p { max-width: 650px; margin: 0 auto 18px; color: var(--portal-muted); line-height: 1.6; }
.inline-button { width: fit-content; margin: 0 auto; }
.id-badge { background: #fff3ef; color: #c65b51; }
.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 18px; }
.detail-row { padding: 12px 0; border-bottom: 1px dashed #e9eeec; min-width: 0; }
.detail-row.full { grid-column: 1 / -1; }
.detail-row span { display: block; color: var(--portal-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.detail-row strong { display: block; margin-top: 4px; font-size: 13px; font-weight: 800; overflow-wrap: anywhere; }
.document-list { display: grid; gap: 11px; }
.document-item { display: flex; align-items: center; gap: 12px; padding: 13px; border-radius: 17px; background: #f9fbfa; border: 1px solid #edf1ef; }
.document-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--portal-mint-soft); color: var(--portal-mint-dark); flex: none; }
.document-copy { min-width: 0; flex: 1; }
.document-copy strong { display: block; font-size: 12px; font-weight: 850; }
.document-copy span { display: block; margin-top: 2px; font-size: 10px; color: var(--portal-muted); }
.document-action { flex: none; color: var(--portal-mint-dark); text-decoration: none; font-size: 11px; font-weight: 850; padding: 7px 9px; border-radius: 10px; background: #e7f8f3; }
.document-action.disabled { pointer-events: none; color: #9aa4a0; background: #eef1f0; }
.whatsapp-button { margin-top: 16px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 14px; border-radius: 15px; background: #22b573; color: #fff; text-decoration: none; font-size: 13px; font-weight: 850; }
.info-panel { margin-top: 22px; }
.panel-link { font-size: 11px; font-weight: 850; color: var(--portal-mint-dark); text-decoration: none; }
.schedule-list { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.schedule-item { min-height: 105px; padding: 15px; border-radius: 19px; background: #fbfdfc; border: 1px solid #edf1ef; position: relative; overflow: hidden; }
.schedule-item::after { content: ""; position: absolute; width: 54px; height: 54px; border-radius: 50%; right: -16px; bottom: -18px; background: var(--schedule-color, #e4f8f2); opacity: .6; }
.schedule-item i { color: var(--portal-mint-dark); }
.schedule-item strong { display: block; margin-top: 11px; font-size: 12px; font-weight: 850; }
.schedule-item span { display: block; margin-top: 4px; font-size: 10px; color: var(--portal-muted); line-height: 1.35; }
.profile-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 18px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(30,45,41,.34); backdrop-filter: blur(5px); }
.modal-card { position: relative; width: min(460px, 100%); background: #fff; border-radius: 26px; padding: 28px; box-shadow: 0 30px 80px rgba(24,48,41,.2); }
.modal-card h2 { margin: 6px 0 8px; font-size: 25px; font-weight: 900; }
.modal-card p { margin: 0 0 18px; color: var(--portal-muted); font-size: 12px; line-height: 1.55; }
.modal-card form { display: grid; gap: 15px; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #fff2ef; color: #c9574e; cursor: pointer; }
.portal-footer { margin: 34px auto 28px; width: min(1180px, calc(100% - 32px)); background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(246,252,249,.95)); border: 1px solid rgba(84,201,181,.14); border-radius: 30px; box-shadow: 0 22px 55px rgba(53,81,74,.08); padding: 0; overflow: hidden; }
.portal-footer-inner { display: grid; grid-template-columns: minmax(0, 1.3fr) .8fr 1fr; gap: 26px; padding: 28px 28px 22px; }
.footer-brand { display: flex; align-items: flex-start; gap: 14px; }
.footer-logo { width: 60px; height: 60px; object-fit: contain; flex: none; filter: drop-shadow(0 10px 18px rgba(38,98,88,.14)); }
.footer-brand h2 { margin: 0 0 8px; font-size: 20px; font-weight: 900; color: #26313a; }
.footer-brand p, .footer-contact p { margin: 0; color: var(--portal-muted); font-size: 13px; line-height: 1.7; }
.footer-links h3, .footer-contact h3 { margin: 0 0 12px; font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--portal-mint-dark); }
.footer-links { display: grid; align-content: start; gap: 10px; }
.footer-links a { color: #425052; text-decoration: none; font-size: 14px; font-weight: 700; }
.footer-links a:hover { color: var(--portal-mint-dark); }
.footer-contact { display: grid; align-content: start; gap: 10px; }
.footer-contact p { display: flex; align-items: flex-start; gap: 10px; }
.footer-contact i { width: 16px; margin-top: 3px; color: var(--portal-coral); flex: none; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 28px 18px; border-top: 1px solid rgba(84,201,181,.12); background: linear-gradient(90deg, rgba(84,201,181,.08), rgba(255,128,117,.08)); }
.footer-bottom p { margin: 0; color: #66726d; font-size: 12px; }
.footer-bottom a { display: inline-flex; align-items: center; gap: 8px; color: #1f8a72; text-decoration: none; font-size: 13px; font-weight: 800; }
.footer-bottom a:hover { color: #11735e; }
@media (max-width: 920px) {
    .auth-gate { grid-template-columns: 1fr; }
    .auth-illustration { display: none; }
    .auth-card { max-width: 560px; margin: 5vh auto; }
    .top-grid, .detail-grid { grid-template-columns: 1fr; }
    .schedule-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 680px) {
    .portal-shell { margin: 90px auto 40px; }

    .portal-header { padding: 8px 10px 0; }
    .portal-header-inner { min-height: 60px; padding: 8px 10px; border-radius: 18px; }
    .brand-logo { width: 40px; height: 40px; }
    .brand-link strong { font-size: 13px; }
    .brand-link small { font-size: 9px; }
    .top-link span { display: none; }
    .top-link { width: 38px; height: 38px; padding: 0; justify-content: center; }
    .portal-shell { width: min(100% - 20px, 1180px); margin-top: 14px; }
    .portal-actions { gap: 0; }
    .auth-card { padding: 24px 20px; border-radius: 25px; }
    .welcome-banner { min-height: 195px; padding: 22px; border-radius: 25px; align-items: flex-start; flex-direction: column; }
    .welcome-badge-wrap { justify-items: start; }
    .panel { padding: 19px; border-radius: 23px; }
    .progress-heading { align-items: flex-start; flex-direction: column; }
    .registration-selector { width: 100%; max-width: none; }
    .status-summary { grid-template-columns: 1fr; }
    .current-status { width: fit-content; }
    .progress-track { grid-template-columns: 1fr; gap: 0; }
    .progress-step { display: grid; grid-template-columns: 38px 1fr; text-align: left; align-items: start; gap: 8px; min-height: 60px; padding: 0; }
    .progress-step::before { left: 16px; right: auto; top: 34px; bottom: -2px; width: 3px; height: auto; }
    .progress-node { margin: 0; }
    .progress-step strong, .progress-step span { grid-column: 2; }
    .progress-step strong { margin-top: 5px; }
    .progress-step span { margin-top: -24px; padding-top: 24px; }
    .detail-list { grid-template-columns: 1fr; }
    .detail-row.full { grid-column: auto; }
    .schedule-list { grid-template-columns: 1fr; }
    .panel-heading { gap: 8px; }
    .panel-link { display: none; }
}

@media (max-width: 920px) {
    .portal-footer-inner { grid-template-columns: 1fr; gap: 18px; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 680px) {
    .portal-shell { margin: 90px auto 40px; }

    .portal-footer { width: min(100% - 20px, 1180px); margin: 24px auto 20px; border-radius: 24px; }
    .portal-footer-inner { padding: 22px 18px 18px; }
    .footer-brand { gap: 12px; }
    .footer-logo { width: 52px; height: 52px; }
    .footer-brand h2 { font-size: 18px; }
    .footer-bottom { padding: 14px 18px 18px; }
}

footer.portal-footer.school-shared-footer { padding: 0 !important; padding-bottom: 0 !important; }

/* Shared public header must stay identical on the profile portal. */
@media (min-width: 768px) {
    .portal-profile-page .public-header-controls { display: flex !important; }
}
@media (max-width: 767px) {
    .portal-profile-page .public-header-controls { display: none !important; }
}
