:root {
            --ink: #132238;
            --muted: #6b7890;
            --bg-start: #f6fbf3;
            --bg-end: #fcfef9;
        }

        body {
            min-height: 100vh;
            color: var(--ink);
            background:
                radial-gradient(circle at top right, rgba(6, 122, 67, 0.14), transparent 28%),
                linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 100%);
        }

        .shell {
            min-height: 100vh;
            display: flex;
            align-items: center;
            padding: 1.5rem 0;
        }

        .panel {
            position: relative;
            overflow: hidden;
            border: 1px solid rgba(19, 34, 56, 0.08);
            border-radius: 1.75rem;
            background: rgba(255, 255, 255, 0.96);
            box-shadow: 0 18px 50px rgba(26, 44, 86, 0.10);
        }

        .panel::before {
            content: "";
            position: absolute;
            width: 12rem;
            height: 12rem;
            border-radius: 999px;
            background: rgba(6, 122, 67, 0.08);
            top: -4rem;
            right: -4rem;
            pointer-events: none;
        }

        .panel-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 1rem;
            flex-wrap: wrap;
            padding: 1.5rem 1.75rem;
            background: linear-gradient(120deg, #067a43 0%, #0f9a57 100%);
            color: #fff;
        }

        .panel-header-brand {
            display: flex;
            align-items: flex-start;
            gap: 0.85rem;
            min-width: 0;
        }

        .panel-header-logo {
            flex: 0 0 auto;
            width: 8.4rem;
            height: 8.4rem;
            padding: 0;
            border: none;
            border-radius: 0;
            background: transparent;
            object-fit: contain; filter: drop-shadow(1px 0 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 1px 0 #fff) drop-shadow(0 -1px 0 #fff);
            box-shadow: none;
        }

        .panel-header-text {
            min-width: 0;
        }

        .panel-header .badge {
            font-size: 0.72rem;
            letter-spacing: 0.04em;
        }

        .panel-header-title {
            font-size: 1.65rem;
            font-weight: 800;
            margin: 0.55rem 0 0.35rem;
        }

        .panel-header-sub {
            color: rgba(255, 255, 255, 0.88);
            font-size: 0.95rem;
            max-width: 640px;
        }

        .content-shell {
            padding: 1.5rem;
        }

        .form-section {
            border: 1px solid rgba(19, 34, 56, 0.08);
            border-radius: 1.25rem;
            background: #fff;
            padding: 1rem;
            margin-bottom: 1rem;
        }

        .section-heading {
            display: flex;
            justify-content: space-between;
            gap: 1rem;
            align-items: flex-start;
            margin-bottom: 1rem;
        }

        .section-heading h3 {
            font-size: 1rem;
            margin-bottom: 0.25rem;
        }

        .section-heading p {
            margin-bottom: 0;
            color: var(--muted);
            font-size: 0.9rem;
        }

        .form-label {
            font-size: 0.82rem;
            font-weight: 600;
            color: var(--ink);
            margin-bottom: 0.3rem;
        }

        .form-control, .form-select {
            border-radius: 0.7rem;
            border-color: rgba(19, 34, 56, 0.12);
            padding: 0.6rem 0.85rem;
            font-size: 0.95rem;
        }

        .form-control:focus, .form-select:focus {
            border-color: rgba(6, 122, 67, 0.45);
            box-shadow: 0 0 0 0.2rem rgba(6, 122, 67, 0.12);
        }

        /* Responsive field grids — fields keep a sensible minimum width and
           flow into as many columns as the space allows. */
        .reg-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
            gap: 0.85rem 1rem;
            align-items: start;
        }

        .reg-grid-2 {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 0.85rem 1rem;
            align-items: start;
        }

        .reg-field {
            min-width: 0;
        }

        /* Keep inputs across a row aligned even when a label wraps to two lines. */
        .reg-grid .reg-field > .form-label {
            display: flex;
            align-items: flex-start;
            min-height: 2.1em;
            line-height: 1.2;
        }

        .password-toggle {
            border-left: 0;
            border-radius: 0 0.7rem 0.7rem 0;
            width: 3.25rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0;
        }

        .password-field {
            border-radius: 0.7rem 0 0 0.7rem;
        }

        .toggle-icon {
            width: 1.15rem;
            height: 1.15rem;
        }

        .confirm-password-toggle {
            border-left: 0;
            border-radius: 0 0.7rem 0.7rem 0;
            width: 3.25rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0;
        }

        .confirm-password-field {
            border-radius: 0.7rem 0 0 0.7rem;
        }

        .strength-wrap {
            margin-top: 0.75rem;
        }

        .strength-bar {
            height: 0.45rem;
            border-radius: 999px;
            overflow: hidden;
            background: rgba(19, 34, 56, 0.08);
        }

        .strength-fill {
            height: 100%;
            width: 0;
            border-radius: inherit;
            transition: width 180ms ease, background-color 180ms ease;
        }

        .strength-text {
            margin-top: 0.45rem;
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--muted);
        }

        .degree-section {
            border: 1px solid rgba(19, 34, 56, 0.08);
            border-radius: 1.25rem;
            background: #fdfdff;
            padding: 1rem;
        }

        .degree-section.is-disabled {
            opacity: 0.72;
        }

        .degree-section.is-disabled .degree-body {
            pointer-events: none;
            user-select: none;
        }

        .degree-row {
            border-top: 1px dashed rgba(19, 34, 56, 0.12);
            padding-top: 1rem;
            margin-top: 1rem;
        }

        .degree-row:first-of-type {
            border-top: 0;
            padding-top: 0;
            margin-top: 0;
        }

        .degree-combobox {
            position: relative;
        }

        .degree-search {
            padding-right: 2.5rem;
            background-image: linear-gradient(45deg, transparent 50%, #6b7890 50%), linear-gradient(135deg, #6b7890 50%, transparent 50%);
            background-position: calc(100% - 1.1rem) 50%, calc(100% - 0.75rem) 50%;
            background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
            background-repeat: no-repeat;
        }

        .degree-results {
            display: none;
            position: absolute;
            z-index: 20;
            top: calc(100% + 0.35rem);
            left: 0;
            right: 0;
            max-height: 15rem;
            overflow-y: auto;
            padding: 0.35rem;
            border: 1px solid rgba(19, 34, 56, 0.14);
            border-radius: 0.75rem;
            background: #fff;
            box-shadow: 0 12px 28px rgba(19, 34, 56, 0.16);
        }

        .degree-results.is-open {
            display: block;
        }

        .degree-result {
            display: block;
            width: 100%;
            padding: 0.6rem 0.75rem;
            border: 0;
            border-radius: 0.5rem;
            background: transparent;
            color: var(--ink);
            text-align: left;
            font-size: 0.9rem;
        }

        .degree-result:hover,
        .degree-result:focus-visible {
            background: #eef8f1;
            color: #067a43;
            outline: none;
        }

        .degree-result--custom {
            margin-top: 0.25rem;
            border-top: 1px solid rgba(19, 34, 56, 0.08);
            color: #067a43;
            font-weight: 600;
        }

        .degree-result-empty {
            padding: 0.7rem 0.75rem;
            color: var(--muted);
            font-size: 0.85rem;
        }

        .rank-search-row {
            display: flex;
            align-items: flex-start;
            gap: 0.5rem;
        }

        .rank-combobox {
            flex: 1 1 auto;
            min-width: 0;
        }

        .rank-manage-button {
            flex: 0 0 auto;
            min-height: 2.75rem;
            border-radius: 0.7rem;
        }

        .rank-result {
            display: flex;
            flex-direction: column;
            gap: 0.1rem;
        }

        .rank-result-name {
            color: inherit;
            font-weight: 600;
        }

        .rank-result-category {
            color: var(--muted);
            font-size: 0.75rem;
        }

        @media (max-width: 575.98px) {
            .rank-search-row {
                align-items: stretch;
                flex-direction: column;
            }

            .rank-manage-button {
                align-self: flex-start;
            }
        }

        .degree-remove-button {
            width: 2.75rem;
            height: 2.75rem;
            justify-content: center;
            padding: 0;
            border-radius: 0.65rem;
        }

        .degree-remove-button svg {
            width: 1.1rem;
            height: 1.1rem;
        }

        @media (max-width: 767.98px) {
            .degree-remove-col {
                justify-content: flex-start !important;
            }
        }

        .mini-label {
            text-transform: uppercase;
            letter-spacing: 0.08em;
            font-size: 0.72rem;
            font-weight: 700;
            color: var(--muted);
        }

        .btn-primary {
            background: #067a43;
            border: none;
            box-shadow: 0 10px 20px rgba(6, 122, 67, 0.18);
        }

        .btn-primary:hover {
            background: #035a31;
        }

        .text-bg-primary {
            background-color: #067a43 !important;
            color: #fff !important;
            border: 1px solid rgba(212, 163, 27, 0.55);
        }

        .btn-light {
            border-color: rgba(19, 34, 56, 0.10);
        }

        .icon-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }

        .icon-btn svg {
            width: 1rem;
            height: 1rem;
            flex: 0 0 auto;
        }

        .icon-btn .btn-label {
            line-height: 1;
        }

        /* ── Multi-step wizard ──────────────────────────────── */
        .reg-stepper {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 1.5rem;
        }

        .reg-stepper-item {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: var(--muted);
            font-weight: 600;
            font-size: 0.85rem;
            white-space: nowrap;
        }

        .reg-stepper-num {
            flex: 0 0 auto;
            width: 1.85rem;
            height: 1.85rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: #eef1f6;
            color: var(--muted);
            font-weight: 700;
            font-size: 0.85rem;
            border: 2px solid transparent;
            transition: all 0.2s ease;
        }

        .reg-stepper-item.is-active { color: var(--ink); }
        .reg-stepper-item.is-active .reg-stepper-num {
            background: #067a43;
            color: #fff;
            box-shadow: 0 6px 14px rgba(6, 122, 67, 0.25);
        }

        .reg-stepper-item.is-done { color: #067a43; }
        .reg-stepper-item.is-done .reg-stepper-num {
            background: #e3f3ea;
            color: #067a43;
            border-color: #067a43;
        }

        .reg-stepper-bar {
            flex: 1 1 auto;
            min-width: 1rem;
            height: 2px;
            background: #e3e7ee;
            border-radius: 2px;
        }

        .reg-nav {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-top: 0.5rem;
        }

        .reg-nav-hint {
            flex: 1 1 auto;
            text-align: center;
        }

        @media (max-width: 575.98px) {
            .reg-stepper-label { display: none; }
            .reg-nav { flex-wrap: wrap; }
            .reg-nav-hint { order: 3; flex-basis: 100%; }
        }

        @media (min-width: 992px) {
            .content-shell {
                padding: 2rem 2.25rem;
            }

            .panel-header {
                padding: 1.75rem 2.25rem;
            }
        }

        @media (max-width: 575.98px) {
            .panel-header-brand {
                align-items: center;
            }

            .panel-header-logo {
                width: 5.95rem;
                height: 5.95rem;
            }

            .panel-header-title {
                font-size: 1.4rem;
            }
        }

