/* ============================================================
   JetDers · Tercih Robotu — tasarım token'ları (Figma)
   ============================================================ */
:root {
    --blue: #18209C; /* ana renk */
    --blue-soft: rgba(24, 32, 156, 0.05);
    --blue-bg: #F5F5FF; /* sayfa arka planı */
    --white: #FFFFFF;
    --teal: #081A1C; /* koyu metin */
    --bluey-grey: #919EBA; /* soluk metin */
    --slate: #586473; /* input içi label */
    --gunmetal: #414C5B; /* başlık metni */
    --field-alt: #F8F9FB; /* farklı dolgulu kutular */
    --field-circle: #F2F4F8; /* radio/checkbox dolgusu */
    --periwinkle: #DEE3ED; /* kenarlık */
    --green: #75AF0A; /* System/Frog Green */
    --green-bg: #F1F7E6;
    --amber: #FF983A; /* System/Faded Orange */
    --amber-bg: #FFF4EB;
    --red: #CC2D1F; /* System/Brick */
    --red-bg: #FAEAE9;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-card: 0 8px 30px rgba(24, 32, 156, 0.06);
    --font: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--teal);
    background: var(--blue-bg);
    line-height: 1.45;
}

h1 {
    margin: 0;
}

/* ============================ Layout ============================ */
.page {
    min-height: 100vh;
    padding: 40px 135px;
}

.container {
    max-width: 1170px;
    margin: 0 auto;
}

.card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 32px 18px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.is-hidden {
    display: none !important;
}

/* ============================ Robot başlık ============================ */
.robot-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: -16px;
}

.robot-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 16px;
    color: var(--blue);
}

.play-ico {
    width: 19px;
    height: 20px;
    display: inline-block;
}

.ghost-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--bluey-grey);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

    .ghost-link:hover {
        color: var(--blue);
    }

.ico-16 {
    width: 16px;
    height: 16px;
}

.ico-info {
    width: 14px;
    height: 14px;
    color: var(--bluey-grey);
}

/* ============================ Combobox (seçilen puan türü) ============================ */
.combo {
    position: relative;
}

.combo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    border: 1px solid var(--blue);
    border-radius: 100px;
    padding: 9px 16px;
    cursor: pointer;
    font-family: var(--font);
}

.combo-ico {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.combo-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--blue);
}

.combo-chev {
    width: 18px;
    height: 18px;
    color: var(--blue);
    transition: transform .2s;
}

.combo.is-open .combo-chev {
    transform: rotate(180deg);
}

.combo-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--white);
    border: 1px solid var(--periwinkle);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 30px rgba(24,32,156,.12);
    min-width: 240px;
    display: none;
}

.combo.is-open .combo-menu {
    display: block;
}

.combo-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

    .combo-opt:hover {
        background: var(--blue-bg);
    }

    .combo-opt.is-selected {
        background: var(--blue-soft);
    }

    .combo-opt img {
        width: 24px;
        height: 24px;
        object-fit: contain;
    }

.combo-opt-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--teal);
}

.combo-opt-desc {
    font-size: 12px;
    color: var(--bluey-grey);
}

.combo-opt-body {
    display: flex;
    flex-direction: column;
}

/* ============================ Adım intro ============================ */
.step-intro {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.eyebrow {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .02em;
}

.eyebrow--blue {
    color: var(--blue);
}

.step-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--teal);
    letter-spacing: -0.01em;
}

.step-sub {
    margin: 0;
    color: var(--bluey-grey);
    font-size: 14px;
}

/* ============================ Alan grupları ============================ */
.field-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#rank-range-group {
    border: 1px solid var(--periwinkle);
    border-radius: var(--radius-md);
    background: var(--field-alt);
    padding: 16px;
}

.group-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--bluey-grey);
    letter-spacing: .02em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.group-label--mixed {
    text-transform: none;
    color: var(--teal);
}

    .group-label--mixed em {
        color: var(--bluey-grey);
        font-style: normal;
        font-weight: 400;
    }

.row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}
/* Skor satırı — dış sitedeki `.row` çakışmalarına karşı bağımsız ve sağlam */
.row--score {
    display: flex;
    flex-flow: row nowrap;
    align-items: stretch;
    gap: 12px;
    width: 100%;
}

    .row--score > .ipt {
        flex: 1 1 0;
        min-width: 0;
    }

    .row--score > .row-divider {
        flex: 0 0 auto;
    }

.row-divider {
    color: var(--bluey-grey);
    font-size: 20px;
    display: flex;
    align-items: center;
    width: auto;
}

/* ---- İç label'lı input kutusu (Figma 1:279 / 1:277) ---- */
.ipt {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-height: 72px;
    padding: 8px 16px;
    border: 1px solid var(--periwinkle);
    border-radius: var(--radius-sm);
    background: var(--white);
    transition: border-color .15s, box-shadow .15s;
}

    .ipt:focus-within {
        border-color: var(--blue);
        box-shadow: 0 0 0 3px var(--blue-soft);
    }

    .ipt.is-error {
        border-color: var(--red);
    }

        .ipt.is-error .ipt-label {
            color: var(--red);
        }

.field-error {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--red);
}

    .field-error[hidden] {
        display: none;
    }

.ipt-label {
    font-size: 12px;
    color: var(--slate);
    line-height: 1.2;
}

.ipt-input {
    width: 100%;
    border: none;
    background: none;
    outline: none;
    padding: 0;
    font-family: var(--font);
    font-size: 16px;
    color: var(--teal);
}

    .ipt-input::placeholder {
        color: var(--bluey-grey);
    }

/* tek satır (üst label yok) — Üniversite/Bölüm arama */
.ipt--single {
    justify-content: center;
}

    .ipt--single .ipt-input {
        font-size: 16px;
    }

/* select kutusu */
.ipt--select .ipt-input {
    appearance: none;
    cursor: pointer;
    padding-right: 24px;
    color: var(--bluey-grey); /* varsayılan (Tümü) seçiliyken soluk */
}

    .ipt--select .ipt-input.is-filled {
        color: var(--teal); /* gerçek bir seçim yapılınca diğer inputlarla aynı */
    }

.ipt--select::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23586473' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center;
    pointer-events: none;
}

/* sağ ikon (arama) */
.ipt--icon .ipt-input {
    padding-right: 28px;
}

.ipt-ico {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--bluey-grey);
    pointer-events: none;
}

/* farklı dolgulu kutu varyantı */
.ipt--alt {
    background: var(--field-alt);
}

/* ============================ Seçenek kartları (Adım 1) ============================ */
.option-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--blue-soft);
    border: 1px solid var(--periwinkle);
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-align: left;
    font-family: var(--font);
    transition: border-color .15s, background .15s, transform .05s;
}

    .option:hover {
        border-color: var(--blue);
    }

    .option:active {
        transform: scale(.995);
    }

    .option.is-selected {
        border-color: var(--blue);
        background: #EEEFFF;
    }

.option-ico {
    width: 50px;
    height: 50px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 8px;
}

    .option-ico img {
        width: 32px;
        height: 32px;
        object-fit: contain;
    }

.option-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.option-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--teal);
}

.option-desc {
    font-size: 13px;
    color: var(--bluey-grey);
}

.option-chevron {
    width: 20px;
    height: 20px;
    color: var(--bluey-grey);
    flex: none;
}

/* ============================ Checkbox satırı ============================ */
.check-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    /*padding: 16px;
    border: 1px solid var(--periwinkle);
    border-radius: var(--radius-md);
    background: var(--field-alt);*/
    cursor: pointer;
}

    .check-row input {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
    }

.check-mark {
    width: 22px;
    height: 22px;
    flex: none;
    border: 1px solid var(--blue);
    background: var(--field-circle);
    /*border-radius: 50%;*/
    position: relative;
    margin-top: 1px;
    transition: border-color .15s, background .15s;
}

.check-row input:checked + .check-mark {
    border-color: var(--blue);
    background: var(--blue);
}

    .check-row input:checked + .check-mark::after {
        content: "";
        position: absolute;
        inset: 0;
        margin: auto;
        width: 6px;
        height: 10px;
        border: solid var(--white);
        border-width: 0 2px 2px 0;
        transform: translateY(-1px) rotate(45deg);
    }

.check-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .check-text strong {
        font-size: 15px;
        font-weight: 600;
    }

    .check-text small {
        font-size: 13px;
        color: var(--bluey-grey);
    }

/* ============================ Butonlar ============================ */
.actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.actions--end {
    justify-content: flex-end;
}

.actions--center {
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    padding: 0 28px;
    border-radius: 100px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s, opacity .15s;
}

.btn--sm {
    height: 44px;
    padding: 0 20px;
    font-size: 14px;
}

.btn--primary {
    background: var(--blue);
    color: var(--white);
}

    .btn--primary:hover {
        background: var(--blue);
        color: var(--white);
    }

.btn--outline {
    background: var(--white);
    color: var(--blue);
    border-color: var(--blue);
}

    .btn--outline:hover {
        background: var(--white);
        color: var(--blue);
        border-color: var(--blue);
    }

/* ============================ Sonuçlar üst ============================ */
.robot-head--results {
    margin-bottom: 0;
}

.head-actions {
    display: flex;
    gap: 12px;
}

.results-top {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.results-heading {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.results-count {
    color: var(--bluey-grey);
    font-size: 18px;
    font-weight: 400;
}

.results-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.results-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--bluey-grey);
    font-size: 14px;
}

    .results-meta .dot {
        width: 4px;
        height: 4px;
        border-radius: 50%;
        background: var(--bluey-grey);
    }

.filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--blue);
    font-family: var(--font);
    font-weight: 600;
    font-size: 14px;
    text-decoration: underline;
}

.filter-caret {
    width: 16px;
    height: 16px;
    transition: transform .2s;
}

.filter-toggle.is-open .filter-caret {
    transform: rotate(180deg);
}

/* ============================ Filtre paneli ============================ */
.filter-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    background: var(--blue-bg);
    border: 1px solid var(--periwinkle);
    border-radius: var(--radius-md);
}

/* ============================ Sıralama sekmeleri ============================ */
.sort-tabs {
    display: flex;
    width: 100%;
    height: 56px;
    border: 1px solid #DEE3ED;
    border-radius: 8px;
    overflow: hidden;
}

.sort-tab {
    flex: 1;
    height: 100%;
    position: relative;
    border: none;
    background: var(--white);
    cursor: pointer;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 400;
    color: var(--bluey-grey);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    transition: color .15s;
}

    .sort-tab::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: #DEE3ED;
    }

    .sort-tab.is-active {
        color: #222943;
        font-weight: 700;
    }

        .sort-tab.is-active::before {
            background: #27C795;
        }

/* ============================ İstatistik kartları ============================ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat {
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
}

.stat-num {
    font-size: 24px;
    font-weight: 600;
    line-height: 20px;
    color: currentColor;
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    line-height: 20px;
    color: currentColor;
}

.stat--total {
    background: var(--blue-soft);
    color: var(--blue);
}

.stat--high {
    background: var(--green-bg);
    color: var(--green);
}

.stat--poss {
    background: var(--amber-bg);
    color: var(--amber);
}

.stat--risk {
    background: var(--red-bg);
    color: var(--red);
}

/* ============================ Filtre çipleri ============================ */
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.chip-list {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.chip {
    border: 1px solid var(--periwinkle);
    background: var(--white);
    color: var(--bluey-grey);
    border-radius: 100px;
    padding: 8px 16px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
}

    .chip:hover {
        border-color: var(--blue);
        color: var(--blue);
    }

    .chip.is-active {
        background: var(--blue);
        color: var(--white);
        border-color: var(--blue);
    }
.chip-row .info {
    margin-left: auto;
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    align-items: center;
    font-weight: 500;
    font-size: 12px;
    line-height: 100%;
    color: #919EBA;
}
    .chip-row .info::before {
        content: url(/icons/icon-info-gray.svg);
        width: 18px;
        height: 18px;
    }
    /* ============================ Bölüm kartları ============================ */
    .dept-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.dept {
    border: 1px solid var(--periwinkle);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--white);
}

.dept-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 100px;
}

    .badge::before {
        content: "";
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: currentColor;
    }

.badge--high {
    color: var(--green);
    background: var(--green-bg);
}

.badge--poss {
    color: var(--amber);
    background: var(--amber-bg);
}

.badge--risk {
    color: var(--red);
    background: var(--red-bg);
}

.dept-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #F8F9FB;
    border: 1px solid var(--periwinkle);
    cursor: pointer;
    border-radius: 100px;
    padding: 5px 12px;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 500;
    color: #75AF0A;
}

    .dept-add.is-added {
        color: #CC2D1F;
    }

.dept-add-ico {
    width: 16px;
    height: 16px;
    flex: none;
}

.dept-uni {
    font-size: 12px;
    color: var(--bluey-grey);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.dept-name {
    font-size: 14px;
    font-weight: 600;
    color: #414C5B;
}

.dept-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.tag {
    font-size: 12px;
    font-weight: 400;
    color: var(--blue);
}

.tag-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--blue);
    flex: none;
}

.dept-detail {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.year-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.year {
    background: var(--blue-bg);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    text-align: center;
}

    .year .yk {
        font-size: 11px;
        color: var(--bluey-grey);
    }

    .year .yv {
        font-size: 15px;
        font-weight: 700;
        color: var(--teal);
    }

    .year .ys {
        font-size: 11px;
        color: var(--bluey-grey);
        margin-top: 2px;
    }

    .year.is-base {
        background: var(--blue-soft);
    }

.quota-row {
    display: flex;
    gap: 18px;
    font-size: 13px;
    color: var(--bluey-grey);
}

    .quota-row strong {
        color: inherit;
        font-weight: 500;
    }

/* ============================ Sayfalama ============================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.page-btn {
    width: 36px;
    height: 36px;
    flex: none;
    border: 1.4px solid #F0F2F5;
    background: var(--white);
    border-radius: 50%;
    cursor: pointer;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 400;
    color: #222943;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}

    .page-btn:hover:not(:disabled):not(.is-active) {
        border-color: var(--blue);
        color: var(--blue);
    }

    .page-btn.is-active {
        background: var(--blue);
        color: var(--white);
        border-color: var(--blue);
    }

.page-btn--arrow {
    border-color: transparent;
    background: none;
    color: var(--bluey-grey);
}

    .page-btn--arrow:hover:not(:disabled) {
        color: var(--blue);
    }

.page-btn:disabled {
    opacity: .4;
    cursor: default;
}

.page-btn svg {
    width: 20px;
    height: 20px;
}

.page-ellipsis {
    width: 36px;
    height: 36px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #222943;
    font-size: 14px;
}

/* ============================================================
   Responsive — mobil
   ============================================================ */
@media (max-width: 1200px) {
    .page {
        padding: 40px 48px;
    }
}

@media (max-width: 880px) {
    .page {
        padding: 24px 16px;
    }

    .card {
        padding: 20px 16px;
        gap: 28px;
        border-radius: var(--radius-md);
    }

    .robot-head {
        flex-wrap: wrap;
    }

    .robot-head--results {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .head-actions {
        width: 100%;
        flex-direction: column;
    }

    /*    .head-actions .btn {
            flex: 1;
        }*/

    .step-title {
        font-size: 24px;
    }

    .row {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .row--score {
        flex-direction: column;
    }

    .row-divider {
        display: none;
    }

    .ipt {
        min-height: 64px;
    }

    .ipt-input {
        font-size: 15px;
    }

    .option-grid {
        grid-template-columns: 1fr;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dept-grid {
        grid-template-columns: 1fr;
    }

    .actions {
        flex-direction: column-reverse;
    }

        .actions .btn {
            width: 100%;
        }

    .results-top {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
}
