/* ==========================================================================
   Clean modern UI (teal chrome + white content)
   Colors:
     - dark:   #32A2A3
     - light:  #3ABFBE
   UX:
     - no layout shift (always reserve scrollbar)
     - responsive: stack sidebar above content (no overlays)
   ========================================================================== */

:root{
    --teal-dark:#0d7c82;
    --teal-light:#28BEBE;
    --teal-ink:#0b4f56;

    --white:#ffffff;
    --bg:#eef0f2;
    --sand:#f8f5ef;
    --peach:#f6e6d6;

    --text:#0f172a;
    --muted:#475569;
    --border:#d7e1ea;

    --shadow-lg: 0 20px 54px rgba(3, 25, 36, 0.18);
    --shadow-md: 0 12px 28px rgba(3, 25, 36, 0.14);

    --r-lg: 18px;
    --r-md: 14px;
    --r-sm: 10px;
    --public-accent-rgb: 13, 124, 130;
    --public-accent-light-rgb: 40, 190, 190;
    --public-on-accent: #ffffff;
}

*{ box-sizing:border-box; }

/* prevent horizontal jumping due to scrollbar appearance */
html{ height:100%; overflow-y: scroll; }

body{
    min-height:100%;
    margin:0;
    font-family: "IBM Plex Sans", "Avenir Next", "Gill Sans", "Trebuchet MS", "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}

/* typography normalization (prevents huge headings) */
h1,h2,h3,h4,h5{
    margin: 0 0 .75rem 0;
    font-weight: 800;
    color: var(--text);
}
.page-title{
    font-size: 1.35rem;
    font-weight: 900;
    margin: 0 0 12px 0;
    color: var(--text);
}
.page-subtitle{
    margin: 0 0 16px 0;
    color: var(--muted);
}

/* ======================================================================
   ADMIN LAYOUT
   ====================================================================== */

.admin-shell{
    min-height: 100vh;
    display:flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
}

/* topbar */
.admin-topbar{
    height: 64px;
    display:flex;
    align-items:center;
    justify-content: space-between;
    gap: 12px;

    padding: 10px 14px;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(180deg, var(--teal-light), var(--teal-dark));
    color: var(--white);
}

.admin-brand{
    display:flex;
    align-items:center;
    gap: 10px;
    min-width: 220px;
    white-space: nowrap;
    text-decoration: none;
    color: inherit;
}
.admin-brand:hover{
    text-decoration: none;
    color: inherit;
}

.brand-logo{
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display:flex;
    align-items:center;
    justify-content:center;
}
.brand-logo img{
    width: 34px;
    height: 34px;
    object-fit: cover;
    display:block;
}

.admin-title{
    font-weight: 900;
    letter-spacing: .2px;
    color: var(--white);
    font-size: 1.05rem;
}

.admin-actions{
    display:flex;
    align-items:center;
    gap: 36px;
    position: relative;
}

.lang-switch{
    display:flex;
    gap: 6px;
}
.lang-chip{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    font-weight: 900;
    text-decoration:none;
    font-size: 0.8rem;
}
.lang-chip.active{
    background: #fff;
    color: var(--teal-ink);
}

/* profile bubble */
.profile-bubble{
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display:flex;
    align-items:center;
    justify-content:center;

    background: rgba(255,255,255,0.22);
    border: 1px solid rgba(255,255,255,0.30);
    color: #fff;
    font-weight: 900;
    cursor:pointer;
    user-select:none;
}
.profile-bubble img{
    width: 100%;
    height: 100%;
    border-radius: 999px;
    object-fit: cover;
    display:block;
}

.admin-user-block{
    display:flex;
    align-items:center;
    gap: 10px;
    margin-right: 20px;
    cursor: pointer;
}
.admin-user-meta{
    display:flex;
    flex-direction: column;
    align-items: flex-start;
    color: #fff;
    line-height: 1.1;
    text-align: left;
}
.admin-user-name{
    font-weight: 900;
    font-size: 0.9rem;
}
.admin-user-sub{
    font-size: 0.75rem;
    opacity: 0.85;
}

.avatar-placeholder{
    width: 120px;
    height: 120px;
    border-radius: 16px;
    background: rgba(13, 124, 130, 0.1);
    border: 1px dashed rgba(13, 124, 130, 0.35);
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight: 900;
    color: var(--teal-ink);
    font-size: 2rem;
}

.avatar-shell{
    position: relative;
    display: inline-block;
}
.avatar-menu{
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 10px;
    display: none;
    z-index: 10;
    min-width: 200px;
}
.avatar-menu.show{
    display: grid;
    gap: 8px;
}

.user-cell{
    display:flex;
    align-items:center;
    gap: 14px;
}
.user-cell .user-name,
.user-cell .user-sub{
    display:block;
}
.user-avatar{
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(13, 124, 130, 0.12);
    border: 1px solid rgba(13, 124, 130, 0.35);
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight: 900;
    color: var(--teal-ink);
    overflow: hidden;
}
.user-avatar img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.user-name{
    font-weight: 900;
}
.user-sub{
    font-size: 0.8rem;
    color: var(--muted);
}

/* profile dropdown */
.profile-menu{
    position:absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 220px;

    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    display:none;
    z-index: 100;
}
.profile-menu.show{ display:block; }

.profile-menu a,
.profile-menu button{
    width:100%;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    padding: 10px 10px;

    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;

    color: var(--text);
    text-decoration:none;
    font-weight: 900;
    cursor:pointer;
}
.profile-menu a:hover,
.profile-menu button:hover{
    background: rgba(50,162,163,0.10);
    border-color: rgba(50,162,163,0.18);
}

/* main area */
.admin-main{
    display:grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
    min-height: 0;
    flex: 1 1 auto;
}

/* sidebar */
.admin-sidebar{
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(180deg, var(--teal-light), var(--teal-dark));
    color: #fff;
    padding: 12px;
    min-height: 0;
}

.sidebar-card{
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--r-md);
    padding: 10px;
}

.sidebar-nav{
    display:flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item{
    display:flex;
    align-items:center;
    padding: 10px 12px;

    border-radius: var(--r-sm);
    color:#fff;
    text-decoration:none;
    font-weight: 900;

    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.00);

    transition: background .15s ease, transform .15s ease, border-color .15s ease;
}
.nav-item:hover{
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.22);
    transform: translateY(-1px);
}
.nav-item.active{
    background: rgba(255,255,255,0.26);
    border-color: rgba(255,255,255,0.28);
}

.sort-handle{
    display:inline-block;
    margin-right: 8px;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(13, 124, 130, 0.12);
    color: var(--teal-ink);
    font-weight: 900;
    cursor: grab;
    user-select: none;
}
.sort-handle:active{
    cursor: grabbing;
}
.sort-dragging{
    opacity: 0.6;
}

.settings-card{
    display:flex;
    align-items:center;
    gap: 14px;
    text-decoration:none;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 16px;
    box-shadow: var(--shadow-md);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    color: var(--text);
}
.settings-card:hover{
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(3, 25, 36, 0.14);
    border-color: rgba(13, 124, 130, 0.3);
}
.settings-card-icon{
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(13, 124, 130, 0.12);
    display:flex;
    align-items:center;
    justify-content:center;
    color: var(--teal-ink);
    flex: 0 0 44px;
}
.settings-card-icon svg{
    width: 24px;
    height: 24px;
    fill: currentColor;
}
.settings-card-body{
    min-width: 0;
}
.settings-card-title{
    font-weight: 900;
    color: var(--teal-ink);
    margin-bottom: 6px;
}
.settings-card-sub{
    color: var(--muted);
}

.stats-card{
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 16px;
    box-shadow: var(--shadow-md);
}
.stats-card-label{
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 6px;
}
.stats-card-value{
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--teal-ink);
}
.stats-card-sub{
    color: var(--muted);
    margin-top: 4px;
}

.stats-question{
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 16px;
    margin-bottom: 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 16px;
    box-shadow: 0 12px 24px rgba(7, 55, 62, 0.08);
}
.stats-question-title{
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--text);
}
.stats-question-note{
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 10px;
}
.stats-options{
    display: grid;
    gap: 8px;
}
.stats-option{
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    font-weight: 600;
}
.stats-option-dot{
    width: 10px;
    height: 10px;
    border-radius: 999px;
}
.stats-option-count{
    color: var(--muted);
    font-weight: 700;
}
.stats-option-percent{
    color: var(--teal-ink);
    font-weight: 800;
}
.stats-question-chart{
    display: flex;
    align-items: center;
    justify-content: center;
}
.stats-donut{
    width: 160px;
    height: 160px;
    position: relative;
    display:flex;
    align-items:center;
    justify-content:center;
    flex: 0 0 160px;
}
.stats-donut-svg{
    width: 100%;
    height: 100%;
    display:block;
    transform: rotate(-90deg);
}
.stats-donut-track,
.stats-donut-segment{
    fill: none;
    stroke-width: 16;
}
.stats-donut-track{
    stroke: #e4e7ec;
}
.stats-donut-segment{
    stroke-linecap: butt;
}
.stats-donut-total{
    position: absolute;
    inset: 0;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight: 900;
    color: var(--teal-ink);
    font-size: 1.1rem;
    text-align:center;
}
.stats-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    justify-content:flex-end;
}
.stats-share-label{
    color: var(--muted);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.78rem;
    margin-bottom: 6px;
}
.stats-share-url{
    word-break: break-all;
    font-weight: 700;
}

@media (max-width: 980px){
    .stats-question{
        grid-template-columns: 1fr;
    }
    .stats-question-chart{
        justify-content: flex-start;
    }
}

@media print{
    .admin-topbar,
    .admin-sidebar,
    .profile-menu,
    .lang-switch,
    .stats-actions,
    .btn{
        display:none !important;
    }
    body,
    .admin-shell,
    .admin-main,
    .admin-content,
    .public-shell,
    .public-container{
        background:#fff !important;
        padding:0 !important;
        margin:0 !important;
        box-shadow:none !important;
    }
    .public-card,
    .card,
    .stats-card,
    .stats-question{
        box-shadow:none !important;
    }
    .stats-donut-svg,
    .stats-option-dot{
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

.table-tools .input-group-text{
    font-weight: 800;
}
table[data-table] th[data-sort-key]{
    user-select: none;
}

/* content */
.admin-content{
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    background: var(--white);
    padding: 16px;
    overflow: auto;
    min-width: 0;
}

.admin-image-preview{
    width: 100%;
    max-width: 720px;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    display:block;
}

/* ======================================================================
   PUBLIC/AUTH LAYOUT (forms feel)
   ====================================================================== */
.public-shell{
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 10%, rgba(47,182,173,0.18), transparent 42%),
        radial-gradient(circle at 90% 0%, rgba(246,230,214,0.45), transparent 40%),
        linear-gradient(180deg, var(--sand), var(--bg));
    display:flex;
    flex-direction: column;
    align-items: stretch;
    overflow-x: hidden;
}

.public-container{
    flex: 1 1 auto;
    max-width: 1080px;
    margin: 0 auto;
    width: 100%;
    align-items: stretch;
    padding: 16px 16px 22px 16px;
    display:flex;
    flex-direction: column;
    gap: 12px;
}

.public-card{
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    padding: 16px;
    width: 100%;
}

.public-banner{
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid rgba(var(--public-accent-rgb), 0.15);
    box-shadow: var(--shadow-md);
    background: var(--sand);
    width: 100%;
    margin-bottom: 20px;
    height: 170px;
    position: relative;
}
.public-banner img{
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    position: absolute;
    inset: 0;
}

.public-banner.public-banner--contain{
    height: auto;
}
.public-banner.public-banner--contain img{
    object-fit: contain;
}
.public-banner--empty{
    background: linear-gradient(135deg, rgba(13,124,130,0.85), rgba(47,182,173,0.9));
    color: #fff;
    min-height: 170px;
    display:flex;
    align-items:flex-end;
}
.public-banner-fallback{
    padding: 24px 26px;
}
.public-banner-title{
    font-weight: 900;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    margin-bottom: 6px;
}
.public-banner-sub{
    font-weight: 600;
    opacity: 0.95;
}

.public-empty-card{
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 26px;
    box-shadow: var(--shadow-md);
    width: 100%;
}

.public-progress-card{
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 10px 12px;
    margin-bottom: 12px;
    box-shadow: 0 10px 22px rgba(12, 64, 72, 0.10);
}
.public-progress-meta{
    display:flex;
    align-items:flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.public-progress-label{
    font-weight: 900;
    color: var(--teal-ink);
}
.public-progress-hint{
    color: var(--muted);
    font-weight: 600;
    font-size: 0.92rem;
}
.public-progress-bar{
    height: 8px;
    background: rgba(var(--public-accent-rgb), 0.15);
    border-radius: 999px;
    overflow: hidden;
}
.public-progress-fill{
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--teal-light), var(--teal-dark));
    border-radius: 999px;
    transition: width .3s ease;
}
.public-step-error{
    display:none;
    margin-top: 10px;
    color: #8a2a2a;
    background: #fde6e4;
    border: 1px solid #f6b7b0;
    border-radius: 10px;
    padding: 8px 10px;
    font-weight: 700;
}

.public-step-shield{
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: transparent;
    pointer-events: auto;
    touch-action: none;
}
.is-invalid-public{
    border-color: #d33b3b !important;
    box-shadow: 0 0 0 1px rgba(211, 59, 59, 0.2);
}
.question-step.is-invalid-public .question-content{
    border-color: #d33b3b !important;
}

.question-step{
    border: 1px solid rgba(var(--public-accent-rgb), 0.12);
    box-shadow: 0 10px 20px rgba(7, 55, 62, 0.08);
}
.question-header{
    margin-bottom: 12px;
}
.question-index{
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.75rem;
    font-weight: 900;
    color: var(--teal-ink);
    margin-bottom: 6px;
}
.question-required{
    font-size: 0.75rem;
    font-weight: 800;
    color: #9a2b2b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}
.question-multi-note{
    margin-top: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted);
}
.question-media{
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(var(--public-accent-rgb), 0.18);
    background: #f0f4f6;
    width: 100%;
    height: 100%;
    min-height: 200px;
}
.question-media img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display:block;
}

.question-body{
    display: block;
}
.question-body--with-media{
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}
.question-content{
    min-width: 0;
    background: #f3f4f6;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
}

@media (max-width: 900px){
    .question-body--with-media{
        grid-template-columns: 1fr;
    }
    .question-media{
        width: 100%;
        height: 200px;
    }
}

.question-step{
    transition: opacity .25s ease, transform .25s ease;
}
.question-step.is-active{
    opacity: 1;
    transform: translateY(0);
}
.question-step.is-inactive{
    opacity: 0;
    transform: translateY(8px);
}

.answer-option{
    appearance: none;
    -webkit-appearance: none;
    display:flex;
    align-items:center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 10px;
    border-radius: 14px;
    border: 1px solid rgba(var(--public-accent-rgb), 0.16);
    background: #fff;
    box-shadow: 0 8px 18px rgba(7, 55, 62, 0.08);
    cursor: pointer;
    position: relative;
    text-align: left;
}
.answer-option-text{
    font-weight: 700;
    flex: 1 1 auto;
}
.answer-option-check{
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 2px solid rgba(var(--public-accent-rgb), 0.35);
    color: transparent;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight: 900;
    order: 2;
}
.answer-option--multi .answer-option-check{
    border-radius: 8px;
}
.answer-option.is-selected{
    border-color: rgba(var(--public-accent-rgb), 0.6);
    background: rgba(var(--public-accent-light-rgb), 0.12);
}
.answer-option.is-selected .answer-option-check{
    color: var(--public-on-accent);
    background: var(--teal-dark);
    border-color: var(--teal-dark);
}

.public-step-nav{
    display:flex;
    align-items:center;
    justify-content: space-between;
    gap: 12px;
}

.public-quiz-result{
    font-weight: 800;
    color: var(--teal-ink);
    background: rgba(var(--public-accent-light-rgb), 0.12);
    border: 1px solid rgba(var(--public-accent-rgb), 0.2);
    border-radius: 12px;
    padding: 10px 12px;
}

.quiz-info-modal{
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1000;
}
.quiz-info-modal.is-visible{
    display: flex;
}
.quiz-info-card{
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 50px rgba(0,0,0,0.25);
    padding: 18px;
    max-width: 520px;
    width: 100%;
    border: 1px solid rgba(var(--public-accent-rgb), 0.2);
}
.quiz-info-title{
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--teal-ink);
    margin-bottom: 8px;
}
.quiz-info-text{
    color: var(--text);
    font-weight: 600;
    white-space: pre-line;
    margin-bottom: 12px;
}
.quiz-info-actions{
    display: flex;
    justify-content: flex-end;
}
.public-step-nav .btn{
    min-width: 140px;
}
.public-step-left{
    min-width: 140px;
}
.public-step-right{
    margin-left: auto;
    display:flex;
    align-items:center;
    gap: 12px;
}

.public-section-title{
    font-weight: 900;
    color: var(--teal-ink);
    letter-spacing: 0.02em;
}

.is-hidden{
    display: none !important;
}

.school-picker{
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.school-suggest{
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid rgba(var(--public-accent-rgb), 0.18);
    background: rgba(var(--public-accent-light-rgb), 0.12);
    margin-bottom: 12px;
    flex-wrap: wrap;
    flex-direction: column;
}
.school-suggest-text{
    font-weight: 700;
    width: 100%;
    font-size: 1.05rem;
    line-height: 1.35;
}
.school-suggest-actions{
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}
.school-suggest-btn{
    min-width: 148px;
    min-height: 52px;
    padding: 12px 22px;
    font-size: 1.05rem;
}

.picker-block{
    border: 1px solid rgba(var(--public-accent-rgb), 0.12);
    border-radius: var(--r-md);
    background: #fff;
    padding: 14px 16px;
    box-shadow: 0 8px 16px rgba(7, 55, 62, 0.06);
}

.picker-options{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.picker-options--regions{
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.picker-btn{
    border: 1px solid rgba(var(--public-accent-rgb), 0.22);
    border-radius: 12px;
    background: #fff;
    padding: 12px 10px;
    font-weight: 700;
    color: var(--teal-ink);
    cursor: pointer;
    text-align: center;
    min-height: 44px;
    box-shadow: 0 6px 12px rgba(7, 55, 62, 0.08);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.picker-options--regions .picker-btn{
    font-size: 0.9rem;
    line-height: 1.1;
}

.picker-btn:hover{
    border-color: rgba(var(--public-accent-rgb), 0.6);
    background: rgba(var(--public-accent-light-rgb), 0.12);
    box-shadow: 0 10px 20px rgba(7, 55, 62, 0.16);
    transform: translateY(-1px);
}

.picker-btn.is-selected{
    border-color: var(--teal-dark);
    background: rgba(var(--public-accent-light-rgb), 0.18);
    box-shadow: 0 10px 22px rgba(7, 55, 62, 0.2);
}

.picker-search{
    margin-top: 8px;
}

.picker-sublist{
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed rgba(var(--public-accent-rgb), 0.2);
}

.picker-subhead{
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.picker-empty{
    padding: 12px;
    border-radius: 10px;
    background: rgba(var(--public-accent-rgb), 0.08);
    color: var(--teal-ink);
    text-align: center;
    font-weight: 700;
}

.picker-summary{
    border: 1px dashed rgba(var(--public-accent-rgb), 0.35);
    border-radius: var(--r-md);
    padding: 12px 14px;
    background: rgba(var(--public-accent-light-rgb), 0.08);
    display: grid;
    gap: 6px;
}

.picker-summary-item{
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-weight: 600;
    align-items: center;
}

.picker-summary-label{
    color: var(--muted);
    font-weight: 700;
}

.picker-summary .btn{
    margin-left: auto;
}

.picker-missing-link{
    margin-top: 12px;
    padding: 0;
    background: transparent;
    border: 0;
    color: var(--teal-ink);
    font-weight: 800;
    text-decoration: underline;
    text-align: left;
}

.picker-manual-actions{
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

@media (hover: hover) and (pointer: fine){
    .answer-option:hover{
        border-color: rgba(var(--public-accent-rgb), 0.55);
        background: rgba(var(--public-accent-light-rgb), 0.12);
        box-shadow: 0 12px 26px rgba(7, 55, 62, 0.16);
        transform: translateY(-1px);
    }

    .picker-btn:hover{
        border-color: rgba(var(--public-accent-rgb), 0.6);
        background: rgba(var(--public-accent-light-rgb), 0.12);
        box-shadow: 0 10px 20px rgba(7, 55, 62, 0.16);
        transform: translateY(-1px);
    }
}

@media (hover: none), (pointer: coarse){
    .answer-option:hover{
        border-color: rgba(var(--public-accent-rgb), 0.16);
        background: #fff;
        box-shadow: 0 8px 18px rgba(7, 55, 62, 0.08);
        transform: none;
    }

    .picker-btn:hover{
        border-color: rgba(var(--public-accent-rgb), 0.22);
        background: #fff;
        box-shadow: 0 6px 12px rgba(7, 55, 62, 0.08);
        transform: none;
    }
}

@media (max-width: 720px){
    .public-container{
        padding: 16px 14px 24px 14px;
    }
    .public-step-nav{
        flex-direction: column;
        align-items: stretch;
    }
    .public-step-nav .btn{
        width: 100%;
        min-width: 0;
    }
    .public-step-left{
        width: 100%;
        min-width: 0;
    }
    .public-step-right{
        width: 100%;
        margin-left: 0;
        flex-direction: column;
    }
    .picker-options{
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    .picker-options--regions{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .picker-btn{
        padding: 12px 10px;
    }
    .school-suggest-btn{
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
    }
}

@media (min-width: 900px){
    .public-card{
        padding: 26px;
    }
}

@media (min-width: 1080px){
    .public-banner{
        height: 170px;
    }
    .public-banner--empty{
        min-height: 170px;
    }
}

@media (max-height: 920px){
    .public-container{
        padding: 12px 12px 18px 12px;
        gap: 10px;
    }
    .public-card{
        padding: 14px;
    }
    .public-banner{
        height: 170px;
    }
    .public-banner--empty{
        min-height: 170px;
    }
    .public-progress-card{
        padding: 8px 10px;
        margin-bottom: 10px;
    }
    .answer-option{
        padding: 12px 14px;
    }
}

@media (max-width: 940px){
    .public-container{
        max-width: 900px;
        padding: 12px 12px 18px 12px;
        gap: 10px;
    }
    .public-card{
        padding: 14px;
    }
    .public-banner{
        height: 170px;
    }
    .public-banner--empty{
        min-height: 170px;
    }
    .public-progress-card{
        padding: 8px 10px;
        margin-bottom: 10px;
    }
    .answer-option{
        padding: 12px 14px;
    }
    .picker-options--regions{
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 900px) and (min-height: 1400px){
    .public-shell{
        font-size: 18px;
    }
    .public-shell .page-title{
        font-size: 2rem;
    }
    .public-shell .page-subtitle{
        font-size: 1.1rem;
    }
    .public-shell .public-section-title{
        font-size: 1.1rem;
    }
    .public-shell .question-header .fw-bold{
        font-size: 1.45rem;
    }
    .public-shell .form-label{
        font-size: 1rem;
    }
    .public-shell .form-control{
        font-size: 1.05rem;
        padding: 0.75rem 0.9rem;
    }
    .public-shell .form-check-label{
        font-size: 1.05rem;
    }
    .public-shell .btn{
        font-size: 1.05rem;
        padding: 0.7rem 1.1rem;
    }
    .answer-option{
        padding: 18px 20px;
    }
    .public-progress-label{
        font-size: 1.05rem;
    }
    .public-progress-hint{
        font-size: 0.98rem;
    }
}

/* ======================================================================
   LOGIN (no header, centered card like original)
   ====================================================================== */
.login-body{
    background:
        radial-gradient(circle at 12% 15%, rgba(47,182,173,0.2), transparent 40%),
        radial-gradient(circle at 92% 18%, rgba(246,230,214,0.6), transparent 38%),
        linear-gradient(180deg, var(--sand), var(--bg));
}

.login-wrapper{
    max-width: 420px;
    margin: 6vh auto;
    background: linear-gradient(160deg, #1c928f, var(--teal-ink));
    padding: 2.6rem 2.8rem;
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(3, 25, 36, 0.35);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.login-wrapper::after{
    content:"";
    position:absolute;
    inset: -40% -30% auto auto;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255,255,255,0.35), transparent 65%);
}

.login-logo{
    display:block;
    margin: 0 auto 2rem auto;
    height: 70px;
}

.login-title{
    font-size: 1.1rem;
    text-align:center;
    margin-bottom: 1.75rem;
    font-weight: 800;
    color: #fff;
}
.login-lang-switch{
    display:flex;
    justify-content:center;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.btn-login{
    background-color: #0a666c;
    border-color: #0a666c;
    color: #fff;
    font-weight: 900;
    width: 100%;
    border-radius: 12px;
    padding: 0.55rem 0.9rem;
}
.btn-login:hover{
    background-color: #09585d;
    border-color: #09585d;
}

.login-alert{
    background: #ffdddd;
    color: #a00;
    border-radius: 10px;
    padding: 0.75rem;
    margin-bottom: 1.25rem;
    font-weight: 800;
}

/* ======================================================================
   Bootstrap consistency (white surfaces, dark text)
   ====================================================================== */
.btn{
    border-radius: 12px;
    font-weight: 900;
}
.btn-primary{
    background: linear-gradient(180deg, var(--teal-light), var(--teal-dark));
    border: none;
}
.btn-primary:hover{
    background: linear-gradient(180deg, var(--teal-dark), var(--teal-dark));
}
.btn-outline-secondary{
    border-color: #cbd5e1 !important;
    color: var(--text) !important;
}
.btn-outline-secondary:hover{
    background: rgba(50,162,163,0.08) !important;
}

label{
    color: var(--text);
    font-weight: 900;
}

.login-wrapper label{
    color:#fff;
}

.form-control, .form-select{
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
    padding: 0.55rem 0.8rem;
}
.form-control:focus, .form-select:focus{
    box-shadow: 0 0 0 0.25rem rgba(40,190,190,0.25);
    border-color: rgba(40,190,190,0.55);
}
.public-shell .form-control:focus, .public-shell .form-select:focus{
    box-shadow: 0 0 0 0.25rem rgba(var(--public-accent-light-rgb),0.25);
    border-color: rgba(var(--public-accent-light-rgb),0.55);
}
.public-shell .btn-primary{
    color: var(--public-on-accent);
}
.form-text{ color: var(--muted) !important; }

.table{
    background: var(--white);
    border-radius: var(--r-md);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}
.table thead th{
    background: var(--teal-dark) !important;
    color: #fff !important;
    border: none !important;
}
.table td{
    color: var(--text);
    border-color: #e6edf4 !important;
}

.link-plain{
    color: inherit;
    text-decoration: none;
}
.link-plain:hover{
    text-decoration: underline;
}

.card{
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.alert{
    border-radius: var(--r-md);
}

/* Responsive: stack */
@media (max-width: 980px){
    .admin-main{
        grid-template-columns: 1fr;
    }
    .login-wrapper{
        margin: 3vh 12px;
        padding: 2rem;
    }
}
.required-mark{
    color: #9a2b2b;
    font-weight: 900;
}
