:root {
    --color-bg: #f7f8fa;
    --color-surface: #ffffff;
    --color-border: #e2e5ea;
    --color-text: #1f2430;
    --color-muted: #6b7280;
    --color-primary: rgb(0, 76, 152);
    --color-primary-hover: rgb(0, 61, 122);
    --color-danger: #d64545;
    --radius: 8px;

    /* Arka plan ızgara/glow tonları — koyu lacivert/gri zemin üzerinde tonu düşük renkli ışıma */
    --grid-line: rgba(30, 41, 59, 0.055);
    --glow-navy: #2b4bdb;
    --glow-teal: #0e7490;
    --glow-indigo: #4338ca;
}

* { box-sizing: border-box; }

/* Several elements below set their own `display` (flex/inline-flex/block) at
   the same specificity as the browser's built-in `[hidden] { display: none }`
   rule; being an author style loaded after the UA stylesheet, those would
   otherwise win the cascade and keep `hidden` elements visible. This forces
   `hidden` to always win, so `el.hidden = true` in JS reliably hides things
   like filtered-out survey cards or toggled dropdowns/buttons. */
[hidden] { display: none !important; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Sabit, tıklanamaz arka plan katmanı: alt sırada renkli glow balonları, üstte ince ızgara */
.bg-decor {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bg-glow {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    filter: blur(100px);
}

.bg-glow-1 {
    width: 620px;
    height: 620px;
    top: -220px;
    left: -160px;
    background: radial-gradient(circle, var(--glow-navy), transparent 70%);
}

.bg-glow-2 {
    width: 680px;
    height: 680px;
    top: -180px;
    right: -220px;
    background: radial-gradient(circle, var(--glow-teal), transparent 70%);
}

.bg-glow-3 {
    width: 600px;
    height: 600px;
    bottom: -260px;
    left: 35%;
    background: radial-gradient(circle, var(--glow-indigo), transparent 70%);
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 32px 32px;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
}

.age-gate-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    padding: 20px;
}

.age-gate-modal {
    background: var(--color-surface);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    padding: 32px 28px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.age-gate-spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto 18px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: age-gate-spin 0.8s linear infinite;
}

@keyframes age-gate-spin {
    to { transform: rotate(360deg); }
}

.age-gate-message {
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
}

.top-bar {
    height: 35px;
    background: rgb(42, 65, 115);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 500;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.site-header .container {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    padding-top: 22px;
    padding-bottom: 22px;
}

.brand-logo {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    z-index: 1;
}

.brand-logo .logo {
    height: 72px;
    width: auto;
    display: block;
    transition: transform 0.2s ease;
}

.brand-logo:hover .logo {
    transform: scale(1.08);
}

.brand-logo-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
    max-width: 110px;
}

.brand-text {
    grid-column: 1;
    justify-self: center;
    text-align: center;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    text-decoration: none;
}

.brand-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
}

.brand-subtitle {
    font-size: 1.7rem;
    font-weight: 700;
    color: rgb(42, 65, 115);
    text-transform: uppercase;
}

.site-header nav {
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    z-index: 1;
}

.site-header nav > a {
    display: inline-block;
    margin: 0 4px;
    padding: 8px 16px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    transition: background 0.15s ease;
}

.site-header nav > a:hover { background: var(--color-primary-hover); color: #fff; }

/* Geniş ekranda logo/nav sayfa kenarlarına sabit (eski görünüm birebir korunuyor).
   900px altında - giriş yapılınca isim etiketi + bildirim zili + linkler tek
   satıra sığmayabildiği için - absolute konumlandırma bırakılıp dikey istife
   geçiliyor, böylece üst üste binme hiçbir genişlikte olmuyor. */
@media (max-width: 900px) {
    .site-header .container {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .brand-logo {
        position: static;
        transform: none;
    }

    .brand-logo .logo {
        height: 56px;
    }

    .brand-subtitle {
        font-size: 1.3rem;
    }

    .site-header nav {
        position: static;
        transform: none;
        width: 100%;
        justify-content: center;
    }

    .site-header nav > a,
    .nav-person,
    .notif-badge {
        margin: 4px;
    }
}

@media (max-width: 420px) {
    .brand-logo .logo {
        height: 44px;
    }

    .brand-subtitle {
        font-size: 1.1rem;
    }

    .site-header nav > a {
        padding: 7px 12px;
        font-size: 0.8rem;
    }
}

.nav-person {
    display: inline-block;
    margin: 0 8px;
    padding: 6px 14px;
    background: rgb(1, 186, 206);
    color: #fff;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.notif-wrap {
    position: relative;
    display: inline-flex;
}

.notif-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0 8px;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.85rem;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 8px;
    width: 280px;
    max-width: 80vw;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 20;
    overflow: hidden;
}

.notif-dropdown-title {
    padding: 10px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-muted);
    border-bottom: 1px solid var(--color-border);
}

.notif-list {
    list-style: none;
    margin: 0;
    padding: 0;
    /* ~5 satır yüksekliğinde görünür alan; fazlası kaydırarak görülür. */
    max-height: 200px;
    overflow-y: auto;
}

.notif-list li + li { border-top: 1px solid var(--color-border); }

.notif-list a {
    display: block;
    padding: 10px 14px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.88rem;
}

.notif-list a:hover {
    background: var(--color-bg);
    color: var(--color-primary);
}

.notif-dismiss {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 10px 14px;
    color: var(--color-text);
    font-size: 0.88rem;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-dismiss:hover {
    background: var(--color-bg);
}

.notif-bell {
    width: 18px;
    height: 18px;
    color: var(--color-primary);
}

.notif-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--color-danger);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
}

.score-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--color-text);
}

.score-toggle .score-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    margin: 0;
    cursor: pointer;
    position: relative;
}

.score-toggle .score-checkbox:checked {
    border-color: var(--color-primary);
    background: var(--color-primary);
}

.score-toggle .score-checkbox:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    transform: translate(-50%, -50%);
}

.anonymous-toggle-field {
    padding-bottom: 16px;
    margin-bottom: 16px !important;
    border-bottom: 1px solid var(--color-border);
}

#audience-target-fields {
    transition: opacity 0.2s ease;
}

#audience-target-fields.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.score-stats {
    display: flex;
    gap: 18px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--color-border);
    font-size: 0.85rem;
    color: var(--color-muted);
}

.score-stats strong { color: var(--color-text); }

main.container { flex: 1 0 auto; align-self: center; width: 100%; padding-top: 32px; padding-bottom: 48px; }

.site-footer {
    flex-shrink: 0;
    margin-top: 40px;
    background: rgb(42, 65, 115);
    border-top: 1px solid rgb(42, 65, 115);
    color: #dcd8cc;
    font-family: "Segoe UI", -apple-system, Roboto, Arial, sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    padding: 20px 0;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-spacing {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    white-space: nowrap;
    text-align: center;
}

.footer-spacing a {
    color: #dcd8cc;
    text-decoration: none;
}

.footer-spacing a:hover {
    color: #ffffff;
}

.footer-university { font-weight: 600; }
.footer-itdept { font-weight: 700; }

h1 { font-size: 1.75rem; margin: 0 0 8px; }
h2 { font-size: 1.3rem; margin: 0 0 12px; }

.surveys-hero {
    position: relative;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: clamp(28px, 4vw, 56px);
    margin-bottom: 32px;
    min-height: min(680px, 78vh);
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.surveys-hero:hover {
    transform: scale(1.01);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.1);
}

.surveys-hero-inner {
    position: relative;
    z-index: 1;
}

.surveys-hero-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-bottom: 28px;
}

.surveys-hero-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgb(1, 186, 206);
    margin: 0;
}

.surveys-hero-icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    color: var(--color-primary);
}

.audience-filter-bar {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 9px 16px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    width: 100%;
    max-width: 420px;
    min-width: 280px;
}

.audience-filter-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--color-muted);
}

.audience-filter-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    outline: none;
    cursor: pointer;
    caret-color: transparent;
}

.audience-filter-clear {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--color-bg);
    color: var(--color-muted);
    font-size: 0.7rem;
    cursor: pointer;
}

.audience-filter-clear:hover {
    background: var(--color-border);
    color: var(--color-text);
}

.audience-filter-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 6px;
    max-height: 260px;
    overflow-y: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 20;
    text-align: left;
}

.audience-filter-dropdown-item {
    padding: 9px 14px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
}

.audience-filter-dropdown-item:hover {
    background: var(--color-bg);
    color: var(--color-primary);
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 20px;
}

.wide-page main.container {
    max-width: 1600px;
}

.survey-answer-page {
    max-width: 1000px;
    margin: 0 auto;
}

.survey-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.survey-list-item {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 0;
    padding: 0;
    overflow: hidden;
    border: 2px solid var(--color-primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    will-change: transform;
}

.survey-list-item:hover,
.survey-list-item:focus-visible {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
    border-color: var(--color-primary);
}

.survey-list-item:active {
    transform: translateY(-1px) scale(1.005);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.survey-title-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--color-primary);
    padding: 14px 20px;
}

.survey-title-bar h2 {
    color: #fff;
    margin: 0;
    font-size: 1.1rem;
}

.audience-scope-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    cursor: help;
}

.audience-scope-tag svg {
    width: 13px;
    height: 13px;
    flex: none;
}

.survey-card-body {
    padding: 16px 20px 20px;
    text-align: center;
}

.survey-card-body p {
    text-align: left;
}

.survey-publisher {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: var(--color-primary);
    border-radius: 10px;
    padding: 6px 12px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-align: center;
}

.survey-publisher-org {
    font-weight: 500;
    opacity: 0.8;
}

.survey-list-item p { color: var(--color-muted); margin: 0; }

.survey-card-body .desc-text { text-align: center; line-height: 1.5; }

.desc-wrap .desc-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
}

.desc-toggle {
    display: block;
    margin-top: 4px;
    text-align: center;
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}
.desc-toggle:hover, .desc-toggle:focus-visible { color: var(--color-primary-hover); }

.desc-wrap.expanded .desc-text {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.survey-dates {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--color-text, #1f2937);
}

.survey-dates strong {
    font-weight: 700;
}

.survey-dates svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.85;
}

.survey-dates-lines {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.survey-date-line {
    display: block;
}

.empty-state {
    text-align: center;
    color: var(--color-muted);
    padding: 40px 0;
}

.empty-state-box {
    background: var(--color-border);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 40px 20px;
}

.empty-state-icon {
    display: block;
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    color: var(--color-muted);
}

.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}

.auth-box {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: rgb(1, 186, 206);
    border: 4px solid var(--color-primary);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 12px 40px rgba(1, 186, 206, 0.55), 0 0 0 8px rgba(1, 186, 206, 0.12);
}

.auth-role-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: rgb(42, 65, 115);
    background: #fff;
    padding: 3px 10px;
    border-radius: 999px;
}

.auth-box-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 4px;
}

.auth-box-header .auth-logo {
    height: 72px;
    width: auto;
    display: block;
}

.auth-box h1 {
    color: var(--color-primary);
    margin: 0;
}

.auth-box .alert {
    text-align: left;
}

.auth-box form.card {
    text-align: left;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.auth-box label {
    color: #fff;
}

form .field { margin-bottom: 18px; }

label { display: block; font-weight: 600; margin-bottom: 6px; }

.field-label-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.field-label-row label { flex: 1; }

.select-all-btn {
    flex-shrink: 0;
    padding: 4px 10px;
    font-size: 0.78rem;
    line-height: 1.4;
}

input[type=text], input[type=password], textarea, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
}

textarea { resize: vertical; min-height: 80px; }

/* Custom autocomplete list (see unit-stats-search.js) - explicitly light-styled instead of a
   native <datalist>, whose popup is unstylable OS/browser chrome and can render unreadably
   (e.g. black text on a black background) under some OS dark themes. */
.unit-search { position: relative; flex: 1 1 260px; min-width: 200px; }
.unit-search-list {
    position: absolute;
    z-index: 20;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 4px;
    list-style: none;
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 240px;
    overflow-y: auto;
}
.unit-search-list li {
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
}
.unit-search-list li:hover { background: var(--color-bg); }

.option-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.option-row input[type=radio], .option-row input[type=checkbox] { margin-right: 10px; width: auto; }

.question-text-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.question-text-row input[type=text] { min-width: 160px; }

.il-ilce-row { display: flex; gap: 10px; flex-wrap: wrap; }
.il-ilce-row select, .il-ilce-row input { flex: 1; min-width: 180px; }

.person-search-field { position: relative; }
.person-search-results {
    position: absolute;
    z-index: 10;
    top: 100%;
    left: 0;
    right: 0;
    margin: 4px 0 0;
    padding: 4px;
    list-style: none;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.person-search-results li { padding: 8px 10px; border-radius: 4px; cursor: pointer; }
.person-search-results li:hover { background: var(--color-border); }
.person-search-empty { color: var(--color-muted); cursor: default !important; }
.person-search-empty:hover { background: none !important; }

.option-answer-image {
    height: 64px;
    width: 64px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    flex-shrink: 0;
}

/* Radios are declared 5..1 in DOM order and flipped visually with row-reverse, so a
   later-in-DOM label (visually to the left of the hovered/checked one) can be reached
   with the "~" general sibling selector to fill in every star up to that point. */
.rating-stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rating-stars input { position: absolute; opacity: 0; width: 0; height: 0; }
.rating-stars label {
    font-size: 2rem;
    line-height: 1;
    color: var(--color-border);
    cursor: pointer;
    transition: color 0.1s ease;
}
.rating-stars input:checked ~ label,
.rating-stars label:hover,
.rating-stars label:hover ~ label {
    color: #f5b301;
}

.likert-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.likert-table th {
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--color-muted);
    text-align: center;
    padding: 0 8px 10px;
    vertical-align: bottom;
}
.likert-table td { text-align: center; padding: 4px 8px; }
.likert-table input[type=radio] {
    width: 22px;
    height: 22px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.likert-matrix-table th,
.likert-matrix-table td { border-bottom: 1px solid var(--color-border); }
.likert-matrix-table thead th { border-bottom: 2px solid var(--color-border); }
.likert-matrix-table tbody tr:hover { background: var(--color-bg-subtle, rgba(0, 0, 0, 0.03)); }
.likert-matrix-question-col,
.likert-matrix-question-cell {
    text-align: left;
    padding: 10px 12px 10px 0;
    font-weight: 500;
}

.survey-header-box {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 0;
}

.survey-header-strip {
    height: 40px;
    background: rgb(42, 65, 115);
    border-radius: 0 0 var(--radius) var(--radius);
    margin-bottom: 20px;
}

.survey-cover-image {
    display: block;
    width: 150px;
    max-width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    object-position: left top;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.survey-header-info { flex: 1 1 260px; min-width: 0; }

.survey-org-label {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
    text-align: center;
}

.survey-title-centered { text-align: center; }

.question-answer-image {
    display: block;
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    margin: 8px 0 16px;
}

.yt-embed-facade {
    position: relative;
    display: block;
    max-width: 400px;
    margin: 8px 0 16px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    line-height: 0;
}
.yt-embed-facade img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--color-border);
}
.yt-embed-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.yt-embed-play::before {
    content: "";
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
}
.yt-embed-play::after {
    content: "";
    position: absolute;
    border-style: solid;
    border-width: 10px 0 10px 17px;
    border-color: transparent transparent transparent #ffffff;
    /* Üçgeni yuvarlak butonun ortasına, göz hizasında görünecek şekilde 1px sağa kaydır. */
    transform: translateX(2px);
}
.yt-embed-frame {
    display: block;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: var(--radius);
    margin: 8px 0 16px;
}

.option-image-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    margin: 0;
    color: var(--color-primary);
    cursor: pointer;
}

.option-image-icon {
    width: 18px;
    height: 18px;
}

.option-image-filename {
    font-size: 0.8rem;
    color: var(--color-muted);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.option-image-preview {
    height: 36px;
    width: 36px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    flex-shrink: 0;
}

.option-remove-image-label {
    display: inline-flex;
    align-items: center;
    margin: 0;
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--color-muted);
    white-space: nowrap;
    cursor: pointer;
}

button, .btn {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 10px 18px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
}

button:hover, .btn:hover { background: var(--color-primary-hover); }

button:disabled {
    background: var(--color-border);
    color: var(--color-muted);
    cursor: not-allowed;
}
button:disabled:hover { background: var(--color-border); }

.btn-secondary { background: var(--color-muted); color: #fff; border: none; }
.btn-secondary:hover { background: #575e6b; }
.btn-danger { background: var(--color-danger); }
.btn-excel { background: rgb(29, 111, 66); color: #fff; border: none; }
.btn-excel:hover { background: rgb(23, 89, 53); }
.btn-gray { background: #6b7280; color: #fff; border: none; }
.btn-gray:hover { background: #575e6b; }
.btn-cyan { background: rgb(1, 186, 206); color: #fff; border: none; }
.btn-cyan:hover { background: rgb(1, 149, 165); }
.btn-indigo { background: var(--glow-indigo); color: #fff; border: none; }
.btn-indigo:hover { background: #362d9e; }
.btn-teal { background: var(--glow-teal); color: #fff; border: none; }
.btn-teal:hover { background: #0b5e73; }

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 18px;
}
.alert-error { background: #fdecec; color: var(--color-danger); border: 1px solid #f5c2c2; }
.alert-success { background: #e8f6ec; color: #1f7a3d; border: 1px solid #b9e3c6; }
.alert-info { background: #e7f1fb; color: var(--color-primary); border: 1px solid #bcd7f0; }

.question-block {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 16px;
    background-color: var(--color-surface);
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
}

.question-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px; }
.question-header > h1, .question-header > h2 { flex: 1; min-width: 0; }

table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--color-border); }

.stacked-bar {
    display: flex;
    height: 28px;
    border-radius: 6px;
    overflow: hidden;
    background: #eef0f4;
    margin-bottom: 14px;
}

.stacked-bar-segment { height: 100%; }
.stacked-bar-empty { background: #eef0f4; }

.stacked-bar-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; }

.rating-distribution { display: flex; flex-direction: column; gap: 8px; }
.rating-distribution-row { display: flex; align-items: center; gap: 10px; }
.rating-distribution-label { width: 44px; flex-shrink: 0; color: var(--color-muted); font-size: 0.85rem; }
.rating-distribution-count { width: 28px; flex-shrink: 0; text-align: right; color: var(--color-muted); font-size: 0.85rem; }

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--color-text);
}

.legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.option-google-chart {
    margin-top: 8px;
    width: 100%;
    height: 320px;
}

.question-answered-stat {
    color: var(--color-muted);
    font-size: 0.85rem;
    margin: -4px 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.question-result-split {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
}

.question-result-chart { flex: 1 1 320px; min-width: 280px; }

.question-result-respondents {
    flex: 1 1 260px;
    min-width: 240px;
    max-height: 380px;
    overflow-y: auto;
    padding-left: 16px;
    border-left: 1px solid var(--color-border);
}

.question-result-respondents h3 {
    margin: 0 0 8px;
    font-size: 0.9rem;
}

.respondent-answer-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.respondent-answer-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.85rem;
}
.respondent-answer-list li:last-child { border-bottom: none; }

.respondent-answer-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 2px;
}

.respondent-answer-date {
    color: var(--color-muted);
    font-size: 0.78rem;
    margin-left: auto;
}

.respondent-answer-text { color: var(--color-text); }

.actions-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

/* Question-type shortcut row: must stay on one line, never wrap - shrink the buttons to fit,
   and fall back to horizontal scrolling on viewports too narrow for all of them. */
.question-actions-row {
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.question-actions-row .btn-secondary {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 10px 16px;
    font-size: 0.95rem;
}

.options-actions-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

.admin-table-actions { white-space: nowrap; }
.admin-table-actions a, .admin-table-actions .link-btn { margin-right: 10px; font-size: 0.9rem; }
.admin-table-actions form { display: inline; }

.table-scroll { overflow-x: auto; }
.table-scroll table { min-width: 900px; }

.detail-toggle-btn {
    display: inline-flex;
    align-items: center;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    margin-right: 10px;
}
.detail-toggle-btn:hover { background: var(--color-primary-hover); }

.survey-detail-row td { padding: 8px; }
.survey-detail-box {
    background: #eaf1fb;
    border: 1px solid var(--color-primary);
    border-radius: var(--radius);
    padding: 14px 16px;
}
.survey-detail-box strong { display: block; margin-bottom: 6px; color: var(--color-primary); }
.survey-detail-box p { margin: 0; white-space: pre-wrap; }

.survey-detail-columns { display: flex; gap: 20px; flex-wrap: wrap; }
.survey-detail-col { flex: 1 1 260px; min-width: 0; }
.survey-detail-col:first-child { border-right: 1px solid rgba(0, 76, 152, 0.25); padding-right: 20px; }

.survey-audience-details summary { cursor: pointer; font-weight: 600; color: var(--color-primary); }
.survey-audience-details[open] summary { margin-bottom: 8px; }

.survey-audience-list {
    list-style: none;
    margin: 0;
    padding: 8px 10px;
    max-height: 220px;
    overflow-y: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}
.survey-audience-list li { padding: 4px 0; border-bottom: 1px solid var(--color-border); font-size: 0.9rem; }
.survey-audience-list li:last-child { border-bottom: none; }
.survey-audience-list li .tag { margin-left: 6px; }

.survey-publish-details summary { cursor: pointer; font-weight: 600; color: var(--color-primary); }
.survey-publish-details[open] summary { margin-bottom: 8px; }
.survey-publish-info {
    margin: 0;
    padding: 8px 10px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.9rem;
}
.survey-publish-info dt { font-weight: 600; margin-top: 8px; }
.survey-publish-info dt:first-child { margin-top: 0; }
.survey-publish-info dd { margin: 2px 0 0; word-break: break-word; }
.survey-publish-info dd.survey-publish-code { font-family: monospace; }

.action-icon-link {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    color: var(--color-primary);
}

.action-icon-link svg {
    width: 18px;
    height: 18px;
}

.link-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--color-primary);
    text-decoration: none;
    cursor: pointer;
    font: inherit;
}
.link-btn:hover { background: none; color: var(--color-primary-hover); text-decoration: underline; }

.link-btn-icon {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}
.link-btn-icon:hover { text-decoration: none; }
.link-btn-icon svg { width: 18px; height: 18px; }
.link-btn-icon:disabled { color: var(--color-muted); cursor: not-allowed; opacity: 0.5; }
.link-btn-icon:disabled:hover { text-decoration: none; }

.link-btn-danger { color: var(--color-danger); }
.link-btn-danger:hover { color: var(--color-danger); opacity: 0.75; }

.copy-link-btn { color: var(--color-primary); }
.copy-link-btn-done { color: #1f7a3d; }

.confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    padding: 20px;
}

.confirm-modal {
    background: var(--color-surface);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    padding: 24px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.confirm-modal-message {
    margin: 0 0 20px;
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.5;
}

.confirm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.confirm-modal-actions .btn,
.confirm-modal-actions button {
    padding: 8px 16px;
    font-size: 0.95rem;
}

.conditional-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.conditional-row select {
    width: auto;
    flex: 1 1 180px;
    min-width: 140px;
}

.conditional-row span {
    color: var(--color-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

.conditional-option-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.conditional-option-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.conditional-option-chip:hover {
    border-color: var(--color-primary);
}

.conditional-option-chip.is-checked {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.conditional-option-checkbox {
    margin: 0;
    width: auto;
    accent-color: var(--color-primary);
}

.captcha-field { text-align: center; }

.captcha-image {
    display: block;
    border: 1px solid #d0d0d8;
    border-radius: 4px;
    margin: 8px auto;
    max-width: 100%;
    user-select: none;
}

.captcha-field input[type="text"] {
    max-width: 120px;
    margin: 8px auto 0;
    text-align: center;
}

.tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef0f4;
    color: var(--color-muted);
}

.required-marker { color: var(--color-danger); font-weight: 700; }

.required-note {
    color: var(--color-muted);
    font-size: 0.85rem;
    margin: -4px 0 16px;
}

.survey-pagination {
    display: none;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.survey-pagination-status {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-muted);
}
.tag-active { background: #e8f6ec; color: #1f7a3d; }
.tag-inactive { background: #fdecec; color: var(--color-danger); }

.age-gate-badge {
    margin-left: 8px;
    background: rgba(0, 76, 152, 0.12);
    color: var(--color-primary);
    font-weight: 600;
    vertical-align: middle;
}

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer; 
    user-select: none;
    background: var(--color-surface);
    color: var(--color-text);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.chip input { position: absolute; opacity: 0; width: 0; height: 0; }

.chip:has(input:checked),
.chip.is-selected {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.chip:hover { border-color: var(--color-primary); }

.check-list {
    max-height: 190px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 10px 14px;
    background: var(--color-surface);
}

.person-picker {
    position: relative;
}

.person-picker-source { display: none; }

.person-picker-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.person-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 999px;
    padding: 5px 8px 5px 14px;
    font-size: 0.82rem;
    font-weight: 500;
}

.person-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 0.7rem;
    line-height: 1;
}

.person-chip-remove:hover { background: rgba(255, 255, 255, 0.4); }

.person-picker-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    max-height: 220px;
    overflow-y: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 20;
}

.person-picker-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 14px;
    font-size: 0.88rem;
    cursor: pointer;
}

.person-picker-dropdown-item:hover {
    background: var(--color-bg);
    color: var(--color-primary);
}

.role-badge {
    flex: none;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    padding: 4px 9px;
    border-radius: 999px;
    white-space: nowrap;
}

.check-list-item {
    display: block;
    font-weight: 400;
    margin-bottom: 8px;
    cursor: pointer;
}

.check-list-item:last-child { margin-bottom: 0; }
.check-list-item input { margin-right: 8px; width: auto; }

/* Giriş animasyonu: sol alttan sağ üste doğru açılan tam ekran perde */
.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    overflow: hidden;
    pointer-events: none;
}

.no-splash .splash-screen {
    display: none;
}

.splash-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300vmax;
    height: 300vmax;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    transform: translate(-50%, -50%);
    animation: splash-wipe 1.1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes splash-wipe {
    0% {
        transform: translate(-50%, -50%);
    }
    100% {
        transform: translate(30%, -170%);
    }
}

.splash-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 128px;
    width: auto;
    transform: translate(-50%, -50%) rotate(0deg);
    animation: splash-logo-spin 1.1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes splash-logo-spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
        opacity: 0;
    }
}

.splash-arrows {
    position: absolute;
    top: 50%;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.splash-arrows-left { left: 6%; align-items: flex-start; }
.splash-arrows-right { right: 6%; align-items: flex-end; }

.splash-arrow {
    width: 0;
    height: 0;
    opacity: 0;
    animation-duration: 1.1s;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
    animation-fill-mode: forwards;
}

.splash-arrow--down { border-left: solid transparent; border-right: solid transparent; border-top: solid rgba(255, 255, 255, 0.85); }
.splash-arrow--up { border-left: solid transparent; border-right: solid transparent; border-bottom: solid rgba(255, 255, 255, 0.85); }

/* Boy sırasına göre: en küçük oktan en büyüğe, aynı sırayla art arda beliriyor */
.splash-arrow.size-1 { border-left-width: 6px; border-right-width: 6px; border-top-width: 9px; border-bottom-width: 9px; animation-delay: 0s; }
.splash-arrow.size-2 { border-left-width: 8px; border-right-width: 8px; border-top-width: 12px; border-bottom-width: 12px; animation-delay: .06s; }
.splash-arrow.size-3 { border-left-width: 10px; border-right-width: 10px; border-top-width: 15px; border-bottom-width: 15px; animation-delay: .12s; }
.splash-arrow.size-4 { border-left-width: 12px; border-right-width: 12px; border-top-width: 18px; border-bottom-width: 18px; animation-delay: .18s; }
.splash-arrow.size-5 { border-left-width: 14px; border-right-width: 14px; border-top-width: 21px; border-bottom-width: 21px; animation-delay: .24s; }

.splash-arrows-left .splash-arrow { animation-name: splash-arrow-in-left; }
.splash-arrows-right .splash-arrow { animation-name: splash-arrow-in-right; }

@keyframes splash-arrow-in-left {
    0% { opacity: 0; transform: translateX(-24px); }
    25% { opacity: 1; transform: translateX(0); }
    80% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(-24px); }
}

@keyframes splash-arrow-in-right {
    0% { opacity: 0; transform: translateX(24px); }
    25% { opacity: 1; transform: translateX(0); }
    80% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(24px); }
}

@media (prefers-reduced-motion: reduce) {
    .splash-screen { display: none; }
}

/* Detaylar bileşeninin varsayılan ok işaretini kaldırır */
.custom-details > summary {
    list-style: none; /* Chrome, Safari vb. için */
}
.custom-details > summary::-webkit-details-marker {
    display: none; /* Eski tarayıcılar için */
}

/* Devamını Oku butonunun görünümü */
.read-more-summary {
    color: #0d6efd; /* Bootstrap mavi rengi (isteğe göre değiştirebilirsiniz) */
    cursor: pointer;
    font-weight: 500;
    display: inline-block;
    margin-top: 5px;
}

.read-more-summary:hover {
    text-decoration: underline;
}

/* Açıldığında yazının durumunu değiştirmek isterseniz (Opsiyonel) */
.custom-details[open] .read-more-summary {
    margin-bottom: 5px;
}
