/* ============================================
   Content Management Page Styles
   Neumorphic Design
   ============================================ */

.content-management-page .page-header {
    background: var(--bg-primary);
    padding: 1rem 1.35rem;
    border-radius: 16px;
    margin-bottom: 0;
}

.content-page-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-align: left;
}

.content-page-hero__text {
    min-width: 0;
}

.content-page-hero h2,
.content-page-hero p {
    text-align: left;
}

@media (max-width: 640px) {
    .content-page-hero {
        flex-direction: column;
        align-items: flex-start;
    }
}

.content-management-page .content-table-shell {
    width: 100%;
    max-width: 100%;
    overflow: visible;
    padding: 0.35rem 0.75rem;
    box-sizing: border-box;
    /* Sütun kademeleri sayfa genişliğine değil, kabuğun genişliğine bağlıdır (kenar çubuğu açık/kapalı fark etmez) */
    container: cmtable / inline-size;
}

.content-management-page .content-table-shell.table-responsive {
    overflow-x: visible;
    overflow-y: visible;
}

.content-management-page .content-table-shell .dataTables_wrapper {
    overflow: visible;
}

.content-management-page .content-table-shell .neu-dt-scroll,
.content-management-page .content-table-shell .dataTables_scroll,
.content-management-page .content-table-shell .dataTables_scrollBody {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

/* ---- Liste: 7 sütun (Seç · Başlık · Kategori · Görüntülenme · Yayın · Tarih · İşlemler) ----
   Sütun genişliği otomatik: kabuk genişledikçe artan yer sütunlara içerik genişlikleriyle orantılı bölüşülür (yalnız Başlık değil, hepsi dengeli büyür).
   Yüzde KULLANILMAZ (auto tabloda yüzde toplam genişliği şişirir); sütunlar min-width + nowrap ile korunur.
   Kademeler (kabuk genişliği): ≥1250 hepsi · 1080-1249 Kategori başlığın altına iner · ≤1079 Tarih de iner · <940 işlem düğmeleri 4'lü iki satır.
   (Tarih kademesi 940'tan 1080'e çıkarıldı: 8 düğmelik işlem sütunu 337 px; Tarih görünürken tablo 1366 px'lik ekranda yatay kayıyordu.)
   Telefon (≤768) kart düzeni aşağıda. */
#contentsTable {
    width: 100% !important;
    min-width: 0;
    border-spacing: 0 0.35rem;
}

#contentsTable col {
    width: auto !important;
}

#contentsTable th,
#contentsTable td {
    overflow-wrap: break-word;
    word-break: normal;
    vertical-align: middle;
}

#contentsTable tbody td {
    padding: 0.6rem 0.65rem;
}

#contentsTable thead th {
    padding: 0.75rem 0.65rem;
    white-space: nowrap;
}

/* Sıralama oku sağda mutlak konumlanır: yazının üstüne binmesin diye sağda yer ayrılır */
#contentsTable thead th.sorting,
#contentsTable thead th.sorting_asc,
#contentsTable thead th.sorting_desc {
    padding-right: 1.9rem;
}

#contentsTable th:nth-child(1),
#contentsTable td:nth-child(1) {
    width: 2.75rem;
    min-width: 2.75rem;
    max-width: 3rem;
    text-align: center;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

#contentsTable .content-select-label {
    display: inline-flex;
    margin: 0;
    justify-content: center;
}

#contentsTable thead .content-select-label .neu-checkbox-custom {
    box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.18), inset -1px -1px 3px rgba(255, 255, 255, 0.35);
}

/* "Form ile düzenle" formu görünür alana getirir; üstteki sabit çubuğun altında kalmasın */
#addContentSection {
    scroll-margin-top: 5rem;
}

/* Başlık: sola yaslı (başlık sütunu da aynı hizada), en çok 2 satır */
#contentsTable th.cm-col-title,
#contentsTable td.cm-col-title {
    min-width: 13rem;
    white-space: normal;
}

/* Sola yaslı sütunların başlığı da sola yaslı (telefon kartında); masaüstü tablosunda aşağıda ortalanır */
#contentsTable thead th.cm-col-title,
#contentsTable thead th.cm-col-cat,
#contentsTable thead th.cm-col-date,
#contentsTable tbody td.cm-col-title,
#contentsTable tbody td.cm-col-cat,
#contentsTable tbody td.cm-col-date {
    text-align: left !important;
}

/* Masaüstü tablosu: tüm sütunlar (başlık hücreleri dahil) ortalı. Geniş ekranda Başlık ile Kategori arasındaki
   boşluk böylece iki yana bölünür; sıralama oku solda kaldığı için başlık metni hafif sola kaymasın diye sol dolgu eşitlenir. */
@media (min-width: 769px) {
    #contentsTable thead th,
    #contentsTable thead th.cm-col-title,
    #contentsTable thead th.cm-col-cat,
    #contentsTable thead th.cm-col-date,
    #contentsTable tbody td,
    #contentsTable tbody td.cm-col-title,
    #contentsTable tbody td.cm-col-cat,
    #contentsTable tbody td.cm-col-date {
        text-align: center !important;
    }

    #contentsTable thead th.sorting,
    #contentsTable thead th.sorting_asc,
    #contentsTable thead th.sorting_desc {
        padding-left: 1.9rem;
    }

    #contentsTable .content-title-meta {
        justify-content: center;
    }

    #contentsTable .cm-cat-cell,
    #contentsTable .cm-date-cell {
        align-items: center;
        text-align: center;
    }
}

/* Başlık normal blok olarak sarılır (satır sınırlayan -webkit-box tablo sütununu tek satırlık genişliğe şişiriyordu) */
.content-title {
    display: block;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

/* Başlığın altındaki satır: etiketler her zaman; Kategori / Tarih dar kabukta buraya iner */
.content-title-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.6rem;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 500;
    line-height: 1.35;
}

.cm-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.cm-meta--cat,
.cm-meta--date {
    display: none;
}

#contentsTable th.cm-col-cat,
#contentsTable td.cm-col-cat {
    min-width: 8rem;
    text-align: left;
    white-space: nowrap;
}

.cm-cat-cell {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.18rem;
    max-width: 13rem;
    text-align: left;
}

.cm-cat {
    font-weight: 600;
}

.cm-course {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    max-width: 100%;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.cm-course i {
    flex: 0 0 auto;
    font-size: 0.72rem;
}

.cm-course span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#contentsTable th.cm-col-views,
#contentsTable td.cm-col-views {
    min-width: 5.75rem;
    white-space: nowrap;
}

#contentsTable th.cm-col-pub,
#contentsTable td.cm-col-pub {
    min-width: 8.5rem;
    white-space: nowrap;
}

#contentsTable th.cm-col-date,
#contentsTable td.cm-col-date {
    min-width: 8.5rem;
    text-align: left;
    white-space: nowrap;
}

.cm-date-cell {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    max-width: 11rem;
    text-align: left;
}

.cm-date {
    font-variant-numeric: tabular-nums;
}

.cm-by {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    max-width: 100%;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.cm-by i {
    flex: 0 0 auto;
    font-size: 0.68rem;
}

.cm-by span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#contentsTable th.cm-col-actions,
#contentsTable td.cm-col-actions {
    white-space: nowrap;
}

.content-tags,
.cm-meta--tags {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex: 0 0 auto;
    flex-wrap: wrap;
}

/* Başlığın altında etiketler kendi satırını alır; sığanlar görünür, sığmayanlar "+N" olur (content-management.js fitContentTags) */
#contentsTable .cm-meta--tags {
    flex: 1 1 100%;
    min-width: 0;
    justify-content: flex-start;
}

@media (min-width: 769px) {
    #contentsTable .cm-meta--tags {
        justify-content: center;
    }
}

.cm-tag.is-clipped {
    display: none !important;
}

.content-tags .neu-badge,
.cm-meta--tags .neu-badge {
    white-space: nowrap;
    font-size: 0.7rem;
    padding: 0.08rem 0.45rem;
}

.content-tags__more,
.content-tags__rest {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Yayın durumu: anahtar + planlı yayın rozeti yan yana */
#contentsTable td[data-label="Yayın Durumu"] .content-schedule-badge {
    margin: 0 0 0 0.5rem;
    vertical-align: middle;
}

#contentsTable .content-view-stats {
    flex-wrap: nowrap;
    white-space: nowrap;
}

@media (min-width: 769px) {
    @container cmtable (max-width: 1249px) {
        #contentsTable .cm-col-cat {
            display: none;
        }

        #contentsTable .cm-meta--cat {
            display: inline-flex;
        }
    }

    @container cmtable (max-width: 1079px) {
        #contentsTable .cm-col-date {
            display: none;
        }

        #contentsTable .cm-meta--date {
            display: inline-flex;
        }
    }

    @container cmtable (max-width: 939px) {
        #contentsTable td.cm-col-actions .action-buttons {
            display: grid;
            grid-template-columns: repeat(4, 32px);
        }
    }
}

.content-bulk-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.content-bulk-bar[hidden] {
    display: none !important;
}

#contentsTable td[data-label="Yayın Durumu"] {
    justify-content: space-between !important;
}

#contentsTable td[data-label="Yayın Durumu"] .content-publish-switch {
    margin-left: auto;
}

.content-publish-caption {
    display: none;
}

.content-mobile-selectbar {
    display: none;
}

.content-management-page .content-page-hero {
    flex-wrap: wrap;
}

.content-management-page .content-page-hero .neu-button {
    flex: 0 0 auto;
    margin-left: auto;
}

.content-management-page .neu-card.neu-card--surface {
    margin-bottom: 0;
    border-radius: 20px;
}

.content-management-page .neu-card .card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.content-management-page .neu-card .card-body {
    padding: 1.15rem 1.25rem;
}

/* ============================================
   Form Inputs (Neumorphic)
   ============================================ */

.neu-input {
    background: var(--bg-primary);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    color: var(--text-primary);
    box-shadow: 
        inset 4px 4px 8px var(--shadow-dark),
        inset -4px -4px 8px var(--shadow-light);
    outline: none;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 1rem;
}

.neu-input:focus {
    box-shadow: 
        inset 6px 6px 12px var(--shadow-dark),
        inset -6px -6px 12px var(--shadow-light);
}

.neu-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

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

select.neu-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

/* ============================================
   Buttons (Neumorphic)
   ============================================ */

.neu-btn {
    background: var(--bg-primary);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    box-shadow: 
        6px 6px 12px var(--shadow-dark),
        -6px -6px 12px var(--shadow-light);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.neu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        8px 8px 16px var(--shadow-dark),
        -8px -8px 16px var(--shadow-light);
}

/* .neu-btn:active artık neumorphic-library.css'te birleştirildi */

.neu-btn-primary {
    background: linear-gradient(145deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 
        6px 6px 12px var(--shadow-dark),
        -6px -6px 12px var(--shadow-light);
}

.neu-btn-primary:hover {
    color: white;
}

.neu-btn-secondary {
    background: var(--bg-secondary);
}

.neu-btn-success {
    background: var(--bg-primary);
    color: var(--accent-success);
}

/* ============================================
   Text Styles
   ============================================ */

.neu-text-primary {
    color: var(--text-primary);
}

.neu-text-secondary {
    color: var(--text-secondary);
}

/* ============================================
   Badge
   ============================================ */

.neu-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--bg-primary);
    color: var(--accent-primary);
    box-shadow: 
        inset 2px 2px 4px var(--shadow-dark),
        inset -2px -2px 4px var(--shadow-light);
    display: inline-block;
    margin-right: 0.25rem;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .content-management-page .page-header {
        padding: 1rem 1rem !important;
    }

    .content-management-page .neu-card .card-body {
        padding: 1rem;
        overflow: visible;
    }

    .content-management-page .content-table-shell,
    .content-management-page .content-table-shell.table-responsive,
    .content-management-page .content-table-shell .neu-dt-scroll,
    .content-management-page .content-table-shell .dataTables_scroll,
    .content-management-page .content-table-shell .dataTables_scrollBody,
    .content-management-page .dataTables_wrapper {
        overflow: visible !important;
    }

    .content-mobile-selectbar {
        display: flex;
        align-items: center;
        margin: 0.15rem 0.15rem 0.65rem;
        padding: 0.45rem 0.7rem;
        border-radius: 12px;
        background: var(--bg-primary);
        box-shadow: var(--neu-shadow-sm, 3px 3px 8px var(--shadow-dark), -2px -2px 6px var(--shadow-light));
    }

    .content-mobile-selectbar__text {
        font-size: 0.78rem;
        font-weight: 650;
        color: var(--text-secondary);
    }

    .content-mobile-selectbar .neu-checkbox-custom {
        width: 18px;
        height: 18px;
    }

    #contentsTable tbody tr {
        padding-right: 0.15rem;
    }

    #contentsTable tbody td:first-child:not(.dataTables_empty) {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        position: absolute !important;
        top: 0.55rem;
        right: 0.55rem;
        left: auto !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        font-size: inherit !important;
        font-weight: inherit !important;
        text-align: right !important;
        z-index: 2;
    }

    #contentsTable tbody td:first-child .neu-checkbox-custom {
        width: 18px;
        height: 18px;
        border-radius: 6px;
    }

    #contentsTable tbody td:first-child:not(.dataTables_empty)::before {
        display: none !important;
    }

    #contentsTable tbody td[data-label="Başlık"] {
        display: flex !important;
        flex-direction: column;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        text-align: left !important;
        padding-top: 0.1rem !important;
        padding-right: 1.65rem !important;
        padding-bottom: 0.5rem !important;
        border-bottom: 1px solid color-mix(in srgb, var(--text-primary) 8%, transparent) !important;
        font-size: 0.98rem !important;
        font-weight: 700 !important;
        gap: 0.25rem;
    }

    #contentsTable .content-publish-caption {
        display: block;
        margin-right: auto;
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: var(--text-secondary);
        text-align: left;
    }

    #contentsTable td[data-label="Yayın Durumu"]::before {
        display: none !important;
    }

    #contentsTable tbody td[data-label="İşlemler"] {
        overflow: visible !important;
        padding-top: 0.35rem !important;
        padding-bottom: 0.15rem !important;
    }

    #contentsTable tbody td[data-label="Başlık"]::before {
        display: block !important;
        font-size: 0.68rem !important;
        font-weight: 700 !important;
        margin-right: 0 !important;
    }

    #contentsTable tbody tr.inactive-content-row {
        box-shadow:
            var(--neu-shadow-sm),
            inset 4px 0 0 #e0a106 !important;
    }

    .neu-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .d-flex.gap-2 {
        flex-wrap: wrap;
    }
}

/* ============================================
   Light Theme Text Readability Fixes
   (Sabit Bootstrap grileri yerine tema belirteçleri: açık temada aynı okunurluk, koyu temaya da uyar)
   ============================================ */

/* Bootstrap text-muted class override for light theme */
body:not(.dark-mode) .text-muted,
body[data-theme="light"] .text-muted,
body.light-theme .text-muted {
    color: var(--text-secondary) !important;
    opacity: 1 !important;
}

/* Content count text */
body:not(.dark-mode) .text-muted.small,
body[data-theme="light"] .text-muted.small,
body.light-theme .text-muted.small {
    color: var(--text-secondary) !important;
    font-weight: 500;
}

/* Small hint texts */
body:not(.dark-mode) small.text-muted,
body[data-theme="light"] small.text-muted,
body.light-theme small.text-muted {
    color: var(--text-secondary) !important;
    opacity: 0.9 !important;
}

/* Neu switch label text */
body:not(.dark-mode) .neu-switch-label,
body[data-theme="light"] .neu-switch-label,
body.light-theme .neu-switch-label {
    color: var(--text-primary, #212529) !important;
}

/* Form labels and text */
body:not(.dark-mode) .neu-text-primary,
body[data-theme="light"] .neu-text-primary,
body.light-theme .neu-text-primary {
    color: var(--text-primary) !important;
}

body:not(.dark-mode) .neu-text-secondary,
body[data-theme="light"] .neu-text-secondary,
body.light-theme .neu-text-secondary {
    color: var(--text-secondary) !important;
}

/* Card body text */
body:not(.dark-mode) .neu-card .card-body,
body[data-theme="light"] .neu-card .card-body,
body.light-theme .neu-card .card-body {
    color: var(--text-primary);
}

/* Page header text */
body:not(.dark-mode) .page-header h2,
body[data-theme="light"] .page-header h2,
body.light-theme .page-header h2 {
    color: var(--text-primary) !important;
}

body:not(.dark-mode) .page-header p,
body[data-theme="light"] .page-header p,
body.light-theme .page-header p {
    color: var(--text-secondary) !important;
}

/* ============================================
   Dark Mode Support
   ============================================ */

/* ============================================
   Pasif İçerik Satırları
   ============================================ */

.inactive-content-row {
    opacity: 0.72;
}

.inactive-content-row td {
    color: var(--text-secondary);
    background: rgba(128, 128, 128, 0.1);
}

.inactive-content-row td:first-child {
    box-shadow: inset 3px 0 0 #e0a106;
}

.inactive-content-row:hover {
    opacity: 0.8 !important;
    background: rgba(128, 128, 128, 0.15) !important;
}

.inactive-content-row:hover td {
    opacity: 0.9 !important;
}

body.dark-mode .inactive-content-row {
    background: rgba(128, 128, 128, 0.15) !important;
}

body.dark-mode .inactive-content-row:hover {
    background: rgba(128, 128, 128, 0.2) !important;
}

body.dark-mode .inactive-content-row td {
    color: rgba(255, 255, 255, 0.5) !important;
}

body.dark-mode .inactive-content-row:hover td {
    color: rgba(255, 255, 255, 0.7) !important;
}

#contentsTable thead th.content-th-views {
    text-align: center;
    white-space: nowrap;
}

.content-view-th {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
}

/* Başlık satırı mavi zemin — ikonlar tbody ile aynı accent değil, beyaz */
#contentsTable thead th.content-th-views .content-view-th i {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95) !important;
    opacity: 1;
}

#contentsTable thead th.content-th-views .content-view-stats__sep {
    color: rgba(255, 255, 255, 0.78);
    opacity: 1;
    font-weight: 600;
}

#contentsTable thead th.content-th-views.sorting:hover .content-view-th i,
#contentsTable thead th.content-th-views.sorting_asc:hover .content-view-th i,
#contentsTable thead th.content-th-views.sorting_desc:hover .content-view-th i {
    color: #fff !important;
}

body.dark-mode #contentsTable thead th.content-th-views .content-view-th i,
.dark-mode #contentsTable thead th.content-th-views .content-view-th i,
[data-theme="dark"] #contentsTable thead th.content-th-views .content-view-th i {
    color: rgba(255, 255, 255, 0.95) !important;
}

body.dark-mode #contentsTable thead th.content-th-views .content-view-stats__sep,
.dark-mode #contentsTable thead th.content-th-views .content-view-stats__sep,
[data-theme="dark"] #contentsTable thead th.content-th-views .content-view-stats__sep {
    color: rgba(255, 255, 255, 0.78);
}

.content-view-stats {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.2rem 0.35rem;
    font-size: 0.85rem;
    line-height: 1.3;
}

.content-view-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    cursor: help;
}

.content-view-stat i {
    font-size: 0.78rem;
    color: var(--accent-primary, #17a2b8);
    opacity: 0.95;
}

.content-view-stat span {
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
}

#contentsTable tbody .content-view-stats__sep {
    opacity: 0.45;
    font-weight: 600;
    user-select: none;
    color: var(--text-secondary);
}

/* ============================================
   URL / Etiket Column Styles
   ============================================ *//* Telefon kartı (≤768): Kategori / Tarih ayrı satır olmaz, başlığın altındaki özet satırına iner;
   kartta başlık + özet, görüntülenme, yayın durumu ve işlemler kalır */
@media (max-width: 768px) {
    #contentsTable tbody td.cm-col-cat,
    #contentsTable tbody td.cm-col-date {
        display: none !important;
    }

    #contentsTable .cm-meta--cat,
    #contentsTable .cm-meta--date {
        display: inline-flex;
    }

    #contentsTable .content-title-meta {
        gap: 0.2rem 0.7rem;
        margin-top: 0.3rem;
        line-height: 1.4;
    }

    #contentsTable .cm-meta {
        max-width: 100%;
    }

    #contentsTable .cm-meta--tags {
        flex-wrap: wrap;
        order: 5;
        flex-basis: 100%;
    }

    #contentsTable tbody td {
        padding-top: 0.25rem;
        padding-bottom: 0.25rem;
    }
}
/* Planlı yayın rozeti: yayın zamanı gelmemiş içerik (ziyaretçiye görünmez) */
.content-schedule-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
    color: color-mix(in srgb, #d97706 70%, var(--text-primary));
    background: color-mix(in srgb, #f59e0b 14%, var(--bg-primary));
    box-shadow: inset 1px 1px 3px var(--shadow-dark), inset -1px -1px 3px var(--shadow-light);
}
/* ============================================
   Yeni/düzenle formu: başlık şeridi, kapak önizlemesi, kısa özet
   ============================================ */

.cm-form-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    padding: 1.15rem 1.5rem 0.35rem;
}

.cm-form-head__title {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.cm-form-head__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--accent-primary);
    background: var(--bg-primary);
    box-shadow: var(--neu-shadow-xs);
}

/* Kapak görseli: adres alanı + yanında küçük önizleme */
.cm-thumb-field {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cm-thumb-field .neu-input {
    flex: 1 1 auto;
    min-width: 0;
}

.cm-thumb-preview {
    position: relative;
    flex: 0 0 auto;
    width: 72px;
    height: 46px;
    border-radius: 10px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    box-shadow: var(--neu-inset-sm);
    color: var(--text-muted);
}

.cm-thumb-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cm-thumb-preview img[hidden],
.cm-thumb-preview:not(.is-empty):not(.is-error) .cm-thumb-preview__icon {
    display: none;
}

.cm-thumb-preview.is-loading {
    animation: cm-thumb-pulse 1.1s ease-in-out infinite;
}

.cm-thumb-preview.is-error {
    color: var(--accent-primary);
}

@keyframes cm-thumb-pulse {
    50% { opacity: 0.55; }
}

/* Kısa özet: yazdıkça uzar (destekleyen tarayıcıda), en fazla ~7 satır */
.cm-summary {
    field-sizing: content;
    min-height: 80px;
    max-height: 190px;
}

/* ============================================
   Toplu düzenle penceresi
   ============================================ */
.cm-bulk__lead {
    margin: 0 0 0.9rem;
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.cm-bulk__lead i {
    margin-right: 0.35rem;
    color: var(--accent-primary);
}

.cm-bulk__row {
    display: grid;
    grid-template-columns: 9.5rem minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.cm-bulk__row .neu-checkbox-label {
    margin: 0;
}

@media (max-width: 520px) {
    .cm-bulk__row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.4rem;
    }
}


/* ============================================
   Yapay zeka paneli (yalnız yönetici): komut + ders akışından haftalık içerik
   ============================================ */
.content-management-page .content-page-hero .content-page-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.content-management-page .content-page-hero .content-page-hero__actions .neu-button {
    margin-left: 0;
}

/* Akordeon başlığı: kapalıyken tek satır; tamamı düğme */
.cm-ai__head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    padding: 0.9rem 1.5rem;
    margin: 0;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    text-align: left;
    cursor: pointer;
    border-radius: inherit;
}

.cm-ai__head:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent-primary) 60%, transparent);
    outline-offset: -4px;
}

.cm-ai__head-text {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
    flex: 1 1 auto;
}

.cm-ai__head-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
}

.cm-ai__head-text small {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.35;
}

.cm-ai__chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--accent-primary);
    background: var(--bg-primary);
    box-shadow: var(--neu-shadow-xs);
    transition: transform 0.28s ease;
}

.cm-ai--open .cm-ai__chevron {
    transform: rotate(180deg);
}

.cm-ai--open .cm-ai__head-text small {
    display: none;
}

/* Gövde: grid satırı 0fr → 1fr ile yumuşak aç/kapa */
.cm-ai__collapse {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.28s ease;
}

.cm-ai--open .cm-ai__collapse {
    grid-template-rows: 1fr;
}

.cm-ai__clip {
    min-height: 0;
    overflow: hidden;
}

.cm-ai--settled .cm-ai__clip {
    overflow: visible;
}

@media (prefers-reduced-motion: reduce) {
    .cm-ai__collapse,
    .cm-ai__chevron {
        transition: none;
    }
}

.cm-ai__body {
    display: grid;
    gap: 1rem;
    padding: 0.25rem 1.5rem 1.6rem;
}

.cm-ai__tabs {
    justify-self: start;
    max-width: 100%;
}

.cm-ai__pane {
    display: grid;
    gap: 0.9rem;
}

.cm-ai__pane[hidden] {
    display: none;
}

.cm-ai__hint {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.55;
}

.cm-ai__examples {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.cm-ai__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.cm-ai__spacer {
    flex: 1 1 auto;
}

.cm-ai__selected,
.cm-ai__note {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.cm-ai__selected[hidden] {
    display: none;
}

.cm-ai__selected i {
    color: var(--accent-primary);
}

.cm-ai__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 1rem 1.1rem;
}

.cm-ai__field {
    display: grid;
    gap: 0.4rem;
    align-content: start;
    min-width: 0;
}

.cm-ai__field--wide {
    grid-column: span 2;
}

.cm-ai__field--full {
    grid-column: 1 / -1;
}

@media (max-width: 640px) {
    .cm-ai__field--wide {
        grid-column: 1 / -1;
    }

    .cm-ai__body {
        padding: 0.5rem 1rem 1.2rem;
    }
}

.cm-ai__cover {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cm-ai__cover .neu-input {
    flex: 1 1 auto;
    min-width: 0;
}

.cm-ai .cm-ai__flow {
    min-height: 11rem;
    line-height: 1.55;
    resize: vertical;
}

.cm-ai__result {
    padding: 1rem 1.15rem;
    border-radius: 16px;
    background: var(--bg-primary);
    box-shadow: var(--neu-shadow-inset);
}

.cm-ai__result[hidden] {
    display: none;
}

.cm-ai__busy {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    color: var(--text-secondary);
}

.cm-ai__error {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    color: var(--danger, #e53e3e);
}

.cm-ai__error a {
    color: inherit;
    text-decoration: underline;
}

.cm-ai__result .ai-plan__lines {
    max-height: 22rem;
    overflow-y: auto;
}

/* Geniş ekran: kapalıyken tek şerit olan yapay zeka kartı ile filtre kartı yan yana (iki alçak tam satır boşa gitmesin).
   Yalnız yönetici (yapay zeka bölümü varsa); yeni içerik formu ve liste tam genişlikte kalır. */
@media (min-width: 1700px) {
    .content-management-page:has(> #cmAiSection) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: start;
    }

    .content-management-page:has(> #cmAiSection) > * {
        grid-column: 1 / -1;
    }

    .content-management-page:has(> #cmAiSection) > #cmAiSection {
        grid-column: 1;
        grid-row: 2;
    }

    .content-management-page:has(> #cmAiSection) > .cm-filter-row {
        grid-column: 2;
        grid-row: 2;
    }
}
