/* ==========================================================================
   KTÜ Öğrenci Numarası Sorgulama - Ortak Tasarım (Lisansüstü Auth ile aynı sistem)
   ========================================================================== */

:root {
    --auth-primary: #0b3d91;
    --auth-primary-light: #1f61d5;
    --auth-text: #2b2f36;
    --auth-muted: #6b7280;
    --auth-border: #e2e5ea;
    --auth-bg: #eef1f6;
    --auth-card-bg: #ffffff;
    --auth-card-shadow: 0 20px 60px -15px rgba(15, 35, 95, 0.25);
    --auth-radius-lg: 24px;
    --auth-radius-md: 12px;
}

html, body {
    height: 100%;
}

body.auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--auth-text);
    background: var(--auth-bg);
    overflow-x: hidden;
    position: relative;
}

/* Arka plan katmanı: viewport'a sabit, içerik akışından tamamen bağımsız.
   Böylece sayfa uzasa/kısalsa da bloblar kaymaz veya taşma yaratmaz. */
.auth-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #eef1f7 0%, #e8ecf4 45%, #f1eee7 100%);
}

.auth-bg__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
}

.auth-bg__blob--tl-outer {
    width: 92vw;
    height: 92vw;
    max-width: 1050px;
    max-height: 1050px;
    top: -31vw;
    left: -31vw;
    background: radial-gradient(circle at 35% 35%, rgba(45, 87, 168, 0.55), rgba(45, 87, 168, 0) 70%);
}

.auth-bg__blob--tl-inner {
    width: 44vw;
    height: 44vw;
    max-width: 510px;
    max-height: 510px;
    top: -10vw;
    left: -10vw;
    background: rgba(35, 66, 138, 0.45);
    filter: blur(90px);
}

.auth-bg__blob--br-outer {
    width: 92vw;
    height: 92vw;
    max-width: 1050px;
    max-height: 1050px;
    bottom: -31vw;
    right: -31vw;
    background: radial-gradient(circle at 65% 65%, rgba(214, 163, 105, 0.45), rgba(214, 163, 105, 0) 70%);
}

.auth-bg__blob--br-inner {
    width: 41vw;
    height: 41vw;
    max-width: 430px;
    max-height: 430px;
    bottom: -9vw;
    right: -9vw;
    background: rgba(214, 163, 105, 0.4);
    filter: blur(90px);
}

/* İçerik kabuğu */
.auth-shell {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    box-sizing: border-box;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--auth-card-bg);
    border-radius: var(--auth-radius-lg);
    box-shadow: var(--auth-card-shadow);
    padding: clamp(28px, 5vw, 44px);
    box-sizing: border-box;
}

.auth-card--md {
    max-width: 560px;
}

.auth-card__logo {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.auth-card__logo img {
    width: clamp(240px, 70%, 330px);
    height: auto;
}

.auth-card__title {
    margin: 0 0 10px;
    text-align: center;
    color: var(--auth-primary);
    font-weight: 700;
    font-size: clamp(21px, 4vw, 27px);
    line-height: 1.25;
}

.auth-card__subtitle {
    margin: 0 0 28px;
    text-align: center;
    color: var(--auth-muted);
    font-size: 14.5px;
}

.auth-form {
    display: flex;
    flex-direction: column;
}

.auth-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.auth-field label,
.form-group label {
    font-size: 13.5px;
    font-weight: 600;
    color: #3a3f47;
    margin-bottom: 8px;
}

.auth-field .input-wrapper,
.form-group .input-wrapper {
    position: relative;
    width: 100%;
}

.auth-field input,
.form-group input,
.form-group select {
    width: 100%;
    padding: 13px 40px 13px 15px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-md);
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: var(--auth-text);
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field input::placeholder,
.form-group input::placeholder {
    color: #9aa1ab;
}

.auth-field input:focus,
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--auth-primary-light);
    box-shadow: 0 0 0 3px rgba(31, 97, 213, 0.15);
}

.error-message {
    display: none;
    color: #dc3545;
    font-size: 12px;
    font-weight: 500;
    margin-top: 6px;
    line-height: 1.3;
    text-align: left;
}

.auth-field.touched.invalid input,
.form-group.touched.invalid input,
.form-group.touched.invalid select {
    border-color: #dc3545 !important;
}

.auth-field.touched.invalid .error-message,
.form-group.touched.invalid .error-message {
    display: block;
}

.auth-field .check-icon,
.form-group .check-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #28a745;
    font-size: 15px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.auth-field .input-wrapper.valid .check-icon,
.form-group .input-wrapper.valid .check-icon {
    opacity: 1;
}

.auth-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2px 0 24px;
    font-size: 13.5px;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-links a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
}

.auth-links a:hover {
    color: var(--auth-primary-light);
    text-decoration: underline;
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: var(--auth-radius-md);
    background: var(--auth-primary);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.auth-submit:hover {
    background: var(--auth-primary-light);
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-submit:disabled {
    background: #aab8c2;
    cursor: not-allowed;
    transform: none;
}

/* Küçük ekranlar */
@media (max-width: 480px) {
    .auth-shell {
        padding: 24px 14px;
    }

    .auth-card {
        border-radius: 18px;
    }

    .auth-links {
        justify-content: center;
        gap: 16px;
        text-align: center;
    }
}

/* SweetAlert2 uyumu */
.swal2-popup {
    border-radius: 15px !important;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.swal2-styled.swal2-confirm {
    background-color: var(--auth-primary) !important;
}

.recaptcha-wrapper {
    margin: 12px 0 20px;
}

/* Af ile dönüş sorgusu: birden fazla program/öğrenci no satırını listeleyen tablo (SweetAlert2 içinde) */
.sonuc-tablosu {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.sonuc-tablosu th,
.sonuc-tablosu td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--auth-border);
}

.sonuc-tablosu th {
    color: var(--auth-muted);
    font-weight: 600;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.sonuc-tablosu td:last-child,
.sonuc-tablosu th:last-child {
    text-align: right;
    font-weight: 600;
    color: var(--auth-primary);
}

.sonuc-tablosu tbody tr:last-child td {
    border-bottom: none;
}

.geri-don-link {
    display: block;
    text-align: center;
    margin-top: 18px;
    font-size: 13.5px;
    color: var(--auth-muted);
}

.geri-don-link a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
}

.geri-don-link a:hover {
    text-decoration: underline;
}
