html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Yerleşim: koyu kenar menü + üst çubuk */
.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-sidebar {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
    color: #fff;
}

.app-brand-row {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.4);
}

.app-brand {
    display: block;
    flex: 1;
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    color: #fff;
    text-decoration: none;
}

/* Telefonda menü düğmesi; menü yalnızca açılınca görünür. */
.app-menu-toggle {
    margin-right: 0.75rem;
    padding: 0.35rem 0.75rem;
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    font-size: 0.9rem;
}

@media (max-width: 991.98px) {
    .app-sidebar .app-nav {
        display: none;
    }

    .app-sidebar.open .app-nav {
        display: flex;
    }
}

.app-brand:hover {
    color: #fff;
}

.app-nav {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
}

.app-nav-link {
    color: #d7d7d7;
    text-decoration: none;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.app-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.app-nav-link.active {
    background-color: rgba(255, 255, 255, 0.37);
    color: #fff;
}

.app-nav-section {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 0.75rem 0.25rem;
}

/* Açılır kapanır menü grupları */
.app-nav-group > .app-nav-link {
    display: block;
}

.app-nav-group > summary {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    list-style: none;
    cursor: pointer;
    user-select: none;
    border-radius: 4px;
    padding-bottom: 0.5rem;
}

.app-nav-group > summary::-webkit-details-marker {
    display: none;
}

.app-nav-group > summary:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.06);
}

.app-nav-group > summary::after {
    content: "▸";
    margin-left: auto;
    font-size: 0.85rem;
    transition: transform 0.15s;
}

.app-nav-group[open] > summary::after {
    transform: rotate(90deg);
}

/* Grup açıkken başlıktaki sayı gizlenir; sayı ilgili menü satırında görünür. */
.app-nav-group[open] > summary .app-nav-group-badge {
    display: none;
}

.app-nav-group + .app-nav-group {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.app-main {
    flex: 1;
    min-width: 0;
}

.app-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0;
    min-height: 3.5rem;
    padding: 0.4rem 1rem;
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
}

.app-content {
    padding: 1rem 1rem 2rem;
}

/* Telefonda program tablosu sütunları daralır (tablo kendi içinde yatay kayar). */
@media (max-width: 575.98px) {
    .schedule-grid td, .schedule-grid th {
        min-width: 7rem;
        font-size: 0.85rem;
    }
}

@media (min-width: 992px) {
    .app {
        flex-direction: row;
    }

    .app-menu-toggle {
        display: none;
    }

    .app-topbar {
        padding: 0 1.5rem;
    }

    .app-content {
        padding: 1.1rem 1.5rem 2rem;
    }

    .app-sidebar {
        width: 250px;
        flex-shrink: 0;
        height: 100vh;
        position: sticky;
        top: 0;
        overflow-y: auto;
    }

    .app-topbar {
        position: sticky;
        top: 0;
        z-index: 1;
        padding-left: 2rem;
    }

    .app-content {
        padding-left: 2rem;
    }
}

/* Haftalık program tablosu */
.schedule-grid td, .schedule-grid th {
    min-width: 9rem;
    vertical-align: top;
}

.schedule-grid .slot-editable {
    cursor: pointer;
}

.schedule-grid td[draggable=true] {
    cursor: grab;
}

.schedule-grid .slot-selected {
    outline: 3px solid #1b6ec2;
    outline-offset: -3px;
}

.schedule-grid .slot-target-ok {
    box-shadow: inset 0 0 0 3px #198754;
}

.schedule-grid .slot-target-bad {
    box-shadow: inset 0 0 0 3px #dc3545;
    opacity: 0.75;
}

.unplaced-chip {
    cursor: grab;
}

.unplaced-chip.selected {
    outline: 3px solid #1b6ec2;
}

/* Yazdırma */
/* Yalnızca çıktıda görünen bilgi (ör. hesap listesindeki giriş adresi). */
.print-only {
    display: none;
}

@media print {
    .no-print {
        display: none !important;
    }

    .print-only {
        display: block;
    }

    .app-content {
        padding: 0;
    }

    .print-page {
        break-after: page;
    }

    .schedule-grid td, .schedule-grid th {
        min-width: 0;
        font-size: 9pt;
        padding: 2px 4px;
    }

    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Duyurular: satır sonları korunur (program değişikliği bildirimleri satır satırdır). */
.announcement-body {
    white-space: pre-line;
}

.announcement-list {
    max-height: 22rem;
    overflow-y: auto;
}

/* Bursluluk: herkese açık sayfalar (mobil öncelikli) */
.exam-public {
    background-color: #f4f6f9;
}

.exam-public-header {
    background-image: linear-gradient(90deg, rgb(5, 39, 103) 0%, #3a0647 100%);
    color: #fff;
}

/* Logo en-boy oranını korur ve yanındaki başlığı sıkıştırmaz: yatay (geniş) logolar genişlikten de sınırlanır. */
.exam-logo {
    height: 2.6rem;
    width: auto;
    max-width: min(9rem, 40%);
    object-fit: contain;
    flex: 0 0 auto;
    background: #fff;
    border-radius: 4px;
    padding: 2px;
}

.exam-logo-lg {
    height: auto;
    width: auto;
    max-height: 3.5rem;
    max-width: min(11rem, 40%);
    object-fit: contain;
    flex: 0 0 auto;
}

.exam-document-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1rem;
}

.exam-document-title {
    flex: 1 1 12rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Okul arama kutusu: yazdıkça sonuçlar hemen altında listelenir. */
.exam-school {
    position: relative;
}

.exam-school-results {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 2px;
    max-height: 16rem;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 6px;
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
    padding: .25rem 0;
    list-style: none;
}

.exam-school-results li {
    padding: .5rem .75rem;
    cursor: pointer;
}

.exam-school-results li.active,
.exam-school-results li:hover {
    background: #e7f1ff;
}

.exam-school-results li.exam-school-other {
    border-top: 1px solid #dee2e6;
    color: #0a58ca;
    font-weight: 500;
}

.exam-school-results li.exam-school-empty {
    cursor: default;
    color: #6c757d;
    background: transparent;
}

.exam-school-results mark {
    padding: 0;
    background: #fff3cd;
}

.exam-hero {
    background: #fff;
    border-left: 4px solid #1b6ec2;
    border-radius: 6px;
    padding: .9rem 1rem;
}

.exam-section > legend {
    float: none;
    font-size: 1rem;
}

.exam-textbox {
    max-height: 14rem;
    overflow-y: auto;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: .6rem .75rem;
    font-size: .9rem;
}

.exam-occupancy-label {
    min-width: 6.5rem;
}

.exam-occupancy-text {
    min-width: 6.5rem;
    text-align: right;
}

/* Bot tuzağı alanı ekranda görünmez (display:none botlar tarafından atlanabildiği için ekran dışına alınır). */
.exam-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Bursluluk yönetimi */
.exam-kpi {
    border-radius: 8px;
    padding: .75rem 1rem;
    height: 100%;
}

.exam-kpi .value {
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.2;
}

.exam-matrix td, .exam-matrix th {
    text-align: center;
    white-space: nowrap;
}

.exam-matrix td:first-child, .exam-matrix th:first-child {
    text-align: left;
}

.exam-qr-video {
    width: 100%;
    max-width: 26rem;
    border-radius: 6px;
}

@media print {
    .exam-public {
        background: #fff;
    }

    .exam-document {
        border: 0;
    }
}

/* Değişiklik geçmişi: alan bazında eski → yeni */
.history-diff td {
    padding: 0 .25rem;
}
