/* ==========================================================================
   RNG CMS — Yönetim paneli tasarım sistemi (Bootstrap 5.3 üzerine)
   "Red and Grey": gri baskın, logodaki vermilion yalnızca vurgu.
   ========================================================================== */

/* ---------- Yazı tipleri ---------- */
@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../../lib/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../../lib/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-display: swap;
    font-weight: 400;
    src: url("../../lib/fonts/ibm-plex-mono/files/ibm-plex-mono-latin-ext-400-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-display: swap;
    font-weight: 400;
    src: url("../../lib/fonts/ibm-plex-mono/files/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}

/* ---------- Tokenlar ---------- */
:root {
    --rg-graphite: #1d2026;
    --rg-graphite-2: #282c34;
    --rg-graphite-3: #363b45;
    /* Sol menü: kurumsal lacivert (metin kontrastları ≥4.5:1) */
    --rg-sidebar-bg: #07152b;
    --rg-sidebar-bg-end: #040c1a;
    --rg-sidebar-hover: #102344;
    --rg-sidebar-active: #15305a;
    --rg-sidebar-line: rgba(255, 255, 255, .09);
    --rg-sidebar-avatar: #1a3660;
    --rg-sidebar-text: #bccadd;
    --rg-sidebar-muted: #8a9cb8;

    --rg-canvas: #f1f2f4;
    --rg-surface: #ffffff;
    --rg-surface-2: #f8f9fa;
    --rg-line: #e1e3e7;
    --rg-line-strong: #cfd3d9;
    --rg-ink: #1a1d22;
    --rg-ink-2: #3b414b;
    --rg-muted: #5b6270;

    --rg-red: #e8330c;
    --rg-red-soft: #fde9e3;
    --rg-danger: #c0262d;
    --rg-success: #1f7a4d;
    --rg-success-soft: #e3f3ea;
    --rg-warning: #a86400;
    --rg-warning-soft: #fdf1dc;
    --rg-info: #2f6db5;
    --rg-info-soft: #e8f0fa;

    --rg-radius-sm: 6px;
    --rg-radius: 10px;
    --rg-sidebar-w: 256px;
    --rg-sidebar-w-collapsed: 68px;
    --rg-header-h: auto;
    --rg-font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --rg-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --rg-shadow-overlay: 0 12px 40px rgba(20, 23, 28, .18), 0 2px 6px rgba(20, 23, 28, .08);

    /* Bootstrap değişkenleri */
    --bs-body-font-family: var(--rg-font);
    --bs-body-font-size: .875rem;
    --bs-body-font-weight: 400;
    --bs-body-line-height: 1.55;
    --bs-body-color: var(--rg-ink);
    --bs-body-bg: var(--rg-canvas);
    --bs-secondary-color: var(--rg-muted);
    --bs-border-color: var(--rg-line);
    --bs-border-radius: var(--rg-radius-sm);
    --bs-border-radius-lg: var(--rg-radius);
    --bs-link-color: var(--rg-ink);
    --bs-link-color-rgb: 26, 29, 34;
    --bs-link-hover-color: var(--rg-red);
    --bs-link-hover-color-rgb: 232, 51, 12;
    --bs-primary: var(--rg-graphite);
    --bs-primary-rgb: 29, 32, 38;
    --bs-danger: var(--rg-danger);
    --bs-danger-rgb: 192, 38, 45;
    --bs-success: var(--rg-success);
    --bs-success-rgb: 31, 122, 77;
    --bs-focus-ring-color: rgba(232, 51, 12, .22);
    --bs-font-monospace: var(--rg-mono);
    --bs-emphasis-color: var(--rg-ink);
}

/* ---------- Temel ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--rg-font);
    font-optical-sizing: auto;
    font-weight: 400;
    background: var(--rg-canvas);
    color: var(--rg-ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 { color: var(--rg-ink); font-weight: 500; letter-spacing: -.011em; }
/* Tarayıcının "bolder" kuralı <b>/<strong>'u 700'e çıkarır; kurumsal sade görünüm için 550'de sabitle */
b, strong { font-weight: 550; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.0625rem; }
h4 { font-size: .9375rem; }
code, kbd, pre, samp, .font-monospace, .mono { font-family: var(--rg-mono); }
.mono { font-size: .8125rem; }
a { text-underline-offset: .18em; }
::selection { background: var(--rg-red-soft); color: var(--rg-ink); }

:focus-visible { outline: 2px solid var(--rg-red); outline-offset: 2px; }
.btn:focus-visible, .form-control:focus, .form-select:focus, .form-check-input:focus { outline: none; }

/* ---------- Uygulama iskeleti ---------- */
.app {
    min-height: 100vh;
    display: flex;
}
.app-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    margin-left: var(--rg-sidebar-w);
    transition: margin-left .2s ease;
}
.app-content {
    flex: 1 1 auto;
    padding: 24px 28px 40px;
}
.app-footer {
    padding: 14px 28px 20px;
    color: var(--rg-muted);
    font-size: .75rem;
}

/* ---------- Kenar menü ---------- */
.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1035;
    width: var(--rg-sidebar-w);
    background: linear-gradient(180deg, var(--rg-sidebar-bg) 0%, var(--rg-sidebar-bg-end) 100%);
    color: var(--rg-sidebar-text);
    display: flex;
    flex-direction: column;
    transition: width .2s ease, transform .2s ease;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 64px;
    padding: 0 14px 0 20px;
    border-bottom: 1px solid var(--rg-sidebar-line);
    flex: 0 0 auto;
}
.sidebar-brand-link { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.sidebar-brand-logo { height: 15px; width: auto; display: block; }
.sidebar-brand-mark {
    display: none;
    width: 30px; height: 30px;
    border-radius: 6px;
    background: var(--rg-red);
    color: #fff;
    font-weight: 600;
    font-size: .75rem;
    letter-spacing: .01em;
    align-items: center;
    justify-content: center;
}
.sidebar-brand-suffix {
    color: var(--rg-sidebar-muted);
    font-size: .75rem;
    white-space: nowrap;
}
.sidebar-toggle {
    border: 0;
    background: transparent;
    color: var(--rg-sidebar-muted);
    width: 32px; height: 32px;
    border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
}
.sidebar-toggle:hover { color: #fff; background: var(--rg-sidebar-hover); }

.sidebar-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 12px 10px 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--rg-sidebar-avatar) transparent;
}
.nav-group + .nav-group { margin-top: 18px; }
.nav-group-label {
    display: block;
    padding: 0 12px 6px;
    font-size: .75rem;
    color: var(--rg-sidebar-muted);
    white-space: nowrap;
}
.nav-item-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    margin: 1px 0;
    border-radius: 7px;
    color: var(--rg-sidebar-text);
    text-decoration: none;
    font-size: .875rem;
    line-height: 1.3;
    white-space: nowrap;
}
.nav-item-link .bi { font-size: 1.0625rem; width: 20px; text-align: center; flex: 0 0 20px; color: var(--rg-sidebar-muted); }
.nav-item-link:hover { color: #fff; background: var(--rg-sidebar-hover); }
.nav-item-link:hover .bi { color: var(--rg-sidebar-text); }
.nav-item-link.active { color: #fff; background: var(--rg-sidebar-active); font-weight: 450; }
.nav-item-link.active .bi { color: #fff; }
.nav-item-link.active::before {
    content: "";
    position: absolute;
    left: -10px; top: 7px; bottom: 7px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--rg-red);
}
.nav-item-text { overflow: hidden; text-overflow: ellipsis; }

.sidebar-user {
    flex: 0 0 auto;
    border-top: 1px solid var(--rg-sidebar-line);
    padding: 10px;
}
.sidebar-user-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--rg-sidebar-text);
    text-align: left;
}
.sidebar-user-btn:hover, .sidebar-user-btn[aria-expanded="true"] { background: var(--rg-sidebar-hover); color: #fff; }
.avatar {
    flex: 0 0 32px;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--rg-sidebar-avatar);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .75rem; font-weight: 600;
}
.sidebar-user-meta { min-width: 0; line-height: 1.25; }
.sidebar-user-name { display: block; color: #fff; font-size: .8125rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-email { display: block; color: var(--rg-sidebar-muted); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Daraltılmış menü (masaüstü) */
@media (min-width: 992px) {
    .sidebar-collapsed .app-sidebar { width: var(--rg-sidebar-w-collapsed); }
    .sidebar-collapsed .app-main { margin-left: var(--rg-sidebar-w-collapsed); }
    .sidebar-collapsed .sidebar-brand { padding: 0 10px; justify-content: center; flex-direction: column; height: auto; min-height: 64px; gap: 6px; padding-top: 12px; padding-bottom: 10px; }
    .sidebar-collapsed .sidebar-brand-logo,
    .sidebar-collapsed .sidebar-brand-suffix,
    .sidebar-collapsed .nav-group-label,
    .sidebar-collapsed .nav-item-text,
    .sidebar-collapsed .sidebar-user-meta,
    .sidebar-collapsed .sidebar-user-caret { display: none !important; }
    .sidebar-collapsed .sidebar-brand-mark { display: inline-flex; }
    .sidebar-collapsed .nav-item-link { justify-content: center; padding: 9px 0; }
    .sidebar-collapsed .nav-group + .nav-group { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rg-sidebar-line); }
    .sidebar-collapsed .sidebar-user-btn { justify-content: center; padding: 8px 0; }
    .sidebar-collapsed .sidebar-toggle .bi { transform: rotate(180deg); }
}

/* Mobil menü */
.mobile-topbar { display: none; }
.sidebar-backdrop {
    position: fixed; inset: 0;
    background: rgba(20, 23, 28, .45);
    z-index: 1034;
    opacity: 0; visibility: hidden;
    transition: opacity .2s ease, visibility .2s;
}
@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); box-shadow: var(--rg-shadow-overlay); }
    .sidebar-open .app-sidebar { transform: none; }
    .sidebar-open .sidebar-backdrop { opacity: 1; visibility: visible; }
    .app-main { margin-left: 0; }
    .sidebar-toggle-desktop { display: none !important; }
    .mobile-topbar {
        display: flex;
        align-items: center;
        gap: 12px;
        height: 56px;
        padding: 0 16px;
        background: var(--rg-sidebar-bg);
        position: sticky; top: 0; z-index: 1020;
    }
    .mobile-topbar .sidebar-toggle { color: #fff; }
    .mobile-topbar img { height: 13px; }
    .app-content { padding: 16px 16px 32px; }
    .app-footer { padding: 12px 16px 18px; }
}

/* ---------- Sayfa başlığı ---------- */
.page-header {
    background: var(--rg-surface);
    border-bottom: 1px solid var(--rg-line);
    padding: 18px 28px 16px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 24px;
    flex-wrap: wrap;
}
.page-header-text { min-width: 0; }
.page-title {
    margin: 0;
    font-size: 1.375rem;
    line-height: 1.3;
    font-weight: 500;
    letter-spacing: -.015em;
    color: var(--rg-ink);
}
.page-subtitle { margin: 6px 0 0; color: var(--rg-muted); font-size: .8125rem; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-breadcrumb {
    --bs-breadcrumb-margin-bottom: 6px;
    --bs-breadcrumb-font-size: .8125rem;
    --bs-breadcrumb-divider-color: var(--rg-line-strong);
    --bs-breadcrumb-item-active-color: var(--rg-muted);
    --bs-breadcrumb-item-padding-x: .4rem;
    --bs-breadcrumb-divider: "/";
    flex-wrap: wrap;
}
.page-breadcrumb a { color: var(--rg-muted); text-decoration: none; }
.page-breadcrumb a:hover { color: var(--rg-ink); text-decoration: underline; }
@media (max-width: 991.98px) {
    .page-header { padding: 14px 16px; }
    .page-title { font-size: 1.25rem; }
}

/* ---------- Panel (kart) ---------- */
.panel {
    background: var(--rg-surface);
    border: 1px solid var(--rg-line);
    border-radius: var(--rg-radius);
}
.panel + .panel { margin-top: 20px; }
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-bottom: 1px solid var(--rg-line);
}
.panel-title { margin: 0; font-size: .9375rem; font-weight: 500; }
.panel-subtitle { margin: 2px 0 0; color: var(--rg-muted); font-size: .8125rem; }
.panel-body { padding: 18px; }
.panel-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--rg-line);
    background: var(--rg-surface-2);
    border-radius: 0 0 var(--rg-radius) var(--rg-radius);
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.panel > .table-responsive > .table,
.panel > .table { margin-bottom: 0; }

/* Filtre/araç çubuğu */
.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 18px;
    border-bottom: 1px solid var(--rg-line);
}
.toolbar .form-control, .toolbar .form-select { width: auto; min-width: 200px; }
.toolbar-spacer { flex: 1 1 auto; }
.search-input { position: relative; }
.search-input .bi { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--rg-muted); pointer-events: none; }
.search-input .form-control { padding-left: 34px; min-width: 260px; }
@media (max-width: 575.98px) {
    .toolbar .form-control, .toolbar .form-select, .search-input, .search-input .form-control { width: 100%; min-width: 0; }
}

/* ---------- Tablolar ---------- */
.table {
    --bs-table-color: var(--rg-ink);
    --bs-table-bg: var(--rg-surface);
    --bs-table-border-color: var(--rg-line);
    --bs-table-hover-bg: #f6f7f8;
    --bs-table-striped-bg: #fafafb;
    font-size: .875rem;
    vertical-align: middle;
}
.table > :not(caption) > * > * { padding: .7rem 1rem; }
.table > thead > tr > th {
    font-weight: 450;
    font-size: .8125rem;
    color: var(--rg-muted);
    background: var(--rg-surface-2);
    border-bottom-color: var(--rg-line);
    white-space: nowrap;
}
.table > tbody > tr:last-child > * { border-bottom-width: 0; }
.table-sm > :not(caption) > * > * { padding: .45rem .75rem; }
.cell-title { font-weight: 450; color: var(--rg-ink); }
.cell-sub { display: block; color: var(--rg-muted); font-size: .8125rem; }
.cell-url { font-family: var(--rg-mono); font-size: .78rem; color: var(--rg-muted); word-break: break-all; }
.cell-actions { white-space: nowrap; text-align: right; width: 1%; }

/* ---------- Butonlar ---------- */
.btn {
    --bs-btn-font-size: .875rem;
    --bs-btn-font-weight: 450;
    --bs-btn-padding-y: .45rem;
    --bs-btn-padding-x: .9rem;
    --bs-btn-border-radius: var(--rg-radius-sm);
    --bs-btn-focus-box-shadow: 0 0 0 3px rgba(232, 51, 12, .22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-sm { --bs-btn-padding-y: .3rem; --bs-btn-padding-x: .65rem; --bs-btn-font-size: .8125rem; }
.btn-lg { --bs-btn-padding-y: .65rem; --bs-btn-padding-x: 1.25rem; --bs-btn-font-size: .9375rem; }
.btn-primary {
    --bs-btn-bg: var(--rg-graphite);
    --bs-btn-border-color: var(--rg-graphite);
    --bs-btn-hover-bg: #000;
    --bs-btn-hover-border-color: #000;
    --bs-btn-active-bg: #000;
    --bs-btn-active-border-color: #000;
    --bs-btn-disabled-bg: #6f7683;
    --bs-btn-disabled-border-color: #6f7683;
}
.btn-outline-secondary, .btn-light {
    --bs-btn-color: var(--rg-ink);
    --bs-btn-bg: var(--rg-surface);
    --bs-btn-border-color: var(--rg-line-strong);
    --bs-btn-hover-color: var(--rg-ink);
    --bs-btn-hover-bg: #f3f4f6;
    --bs-btn-hover-border-color: #b9bec6;
    --bs-btn-active-color: var(--rg-ink);
    --bs-btn-active-bg: #eceef1;
    --bs-btn-active-border-color: #b9bec6;
}
.btn-danger {
    --bs-btn-bg: var(--rg-danger);
    --bs-btn-border-color: var(--rg-danger);
    --bs-btn-hover-bg: #a11f25;
    --bs-btn-hover-border-color: #a11f25;
    --bs-btn-active-bg: #8d1a20;
    --bs-btn-active-border-color: #8d1a20;
}
.btn-outline-danger {
    --bs-btn-color: var(--rg-danger);
    --bs-btn-border-color: #e7b5b8;
    --bs-btn-hover-bg: var(--rg-danger);
    --bs-btn-hover-border-color: var(--rg-danger);
    --bs-btn-active-bg: #a11f25;
    --bs-btn-active-border-color: #a11f25;
}
.btn-success {
    --bs-btn-bg: var(--rg-success);
    --bs-btn-border-color: var(--rg-success);
    --bs-btn-hover-bg: #186240;
    --bs-btn-hover-border-color: #186240;
}

/* Satır içi ikon butonları */
.btn-icon {
    --bs-btn-padding-x: 0;
    --bs-btn-padding-y: 0;
    width: 32px; height: 32px;
    color: var(--rg-muted);
    border-radius: 7px;
    border: 1px solid transparent;
}
.btn-icon .bi { font-size: 1rem; }
.btn-icon:hover { color: var(--rg-ink); background: #eef0f3; }
.btn-icon.text-danger:hover, .btn-icon-danger:hover { color: var(--rg-danger) !important; background: #fbecec; }
.btn-icon-group { display: inline-flex; gap: 2px; align-items: center; }
.btn-icon.disabled, .btn-icon:disabled { border-color: transparent; background: transparent; }

/* ---------- Formlar ---------- */
.form-label, .app-content label:not(.form-check-label):not(.btn):not(.list-group-item) {
    font-weight: 450;
    font-size: .8125rem;
    color: var(--rg-ink-2);
    margin-bottom: .375rem;
}
.form-control, .form-select {
    --bs-border-color: var(--rg-line-strong);
    font-size: .875rem;
    border-color: var(--rg-line-strong);
    border-radius: var(--rg-radius-sm);
    padding: .5rem .75rem;
    font-weight: 400;
    color: var(--rg-ink);
    background-color: var(--rg-surface);
}
.form-select { padding-right: 2.25rem; }
.form-control-sm, .form-select-sm { padding: .3rem .6rem; font-size: .8125rem; }
.form-control::placeholder { color: #9aa0aa; }
.form-control:focus, .form-select:focus {
    border-color: #8a909b;
    box-shadow: 0 0 0 3px rgba(232, 51, 12, .16);
}
.form-control:disabled, .form-control[readonly] { background-color: var(--rg-surface-2); }
textarea.form-control { min-height: 84px; }
.form-text { color: var(--rg-muted); font-size: .78rem; }
.field-validation-error, .text-danger.field-validation-error, span.text-danger:not(:empty) { font-size: .78rem; }
.input-validation-error { border-color: var(--rg-danger) !important; }
.form-check-input { border-color: #b9bec6; }
.form-check-input:checked { background-color: var(--rg-graphite); border-color: var(--rg-graphite); }
.form-check-input:focus { border-color: #8a909b; box-shadow: 0 0 0 3px rgba(232, 51, 12, .16); }
.form-switch .form-check-input { width: 2.25em; height: 1.25em; margin-top: .1em; }
.form-switch .form-check-input:checked { background-color: var(--rg-success); border-color: var(--rg-success); }
.form-section + .form-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--rg-line); }
.form-section-title { font-size: .9375rem; font-weight: 500; margin: 0 0 4px; }
.form-section-desc { color: var(--rg-muted); font-size: .8125rem; margin: 0 0 16px; }
.form-actions {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding-top: 20px; margin-top: 8px;
    border-top: 1px solid var(--rg-line);
}
.input-group-text { background: var(--rg-surface-2); border-color: var(--rg-line-strong); color: var(--rg-muted); font-size: .8125rem; }

/* ---------- Rozetler / durum ---------- */
.badge { font-weight: 500; font-size: .75rem; padding: .3em .6em; border-radius: 999px; }
.status {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .8125rem; color: var(--rg-ink-2); white-space: nowrap;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #9aa0aa; }
.status-active::before { background: var(--rg-success); }
.status-passive::before { background: #b9bec6; }
.status-deleted::before { background: var(--rg-danger); }
.tag-soft { display: inline-block; padding: .2em .55em; border-radius: 5px; background: #eef0f3; color: var(--rg-ink-2); font-size: .75rem; }
.tag-mono { font-family: var(--rg-mono); font-size: .72rem; padding: .15em .45em; border-radius: 4px; background: #eef0f3; color: var(--rg-ink-2); }
.badge-action-create { background: var(--rg-success-soft); color: var(--rg-success); }
.badge-action-update { background: var(--rg-warning-soft); color: var(--rg-warning); }
.badge-action-delete { background: #fbe7e8; color: var(--rg-danger); }

/* ---------- Uyarılar ---------- */
.alert { border-radius: var(--rg-radius-sm); font-size: .875rem; display: flex; gap: 10px; align-items: flex-start; }
.alert > .bi { font-size: 1.05rem; line-height: 1.3; }
.alert-success { --bs-alert-bg: var(--rg-success-soft); --bs-alert-border-color: #bfe3cf; --bs-alert-color: #165c3a; }
.alert-danger { --bs-alert-bg: #fbe9ea; --bs-alert-border-color: #f0c2c5; --bs-alert-color: #8d1a20; }
.alert-warning { --bs-alert-bg: var(--rg-warning-soft); --bs-alert-border-color: #f2d7a6; --bs-alert-color: #7a4800; }
.alert .btn-close { margin-left: auto; padding: .35rem; position: static; }
.view-messages:empty { display: none; }
.view-messages { margin-bottom: 16px; }

/* ---------- Boş durum ---------- */
.empty-state { text-align: center; padding: 48px 20px; color: var(--rg-muted); }
.empty-state .bi { font-size: 1.75rem; color: var(--rg-line-strong); display: block; margin-bottom: 10px; }
.empty-state-title { color: var(--rg-ink); font-weight: 500; margin-bottom: 4px; font-size: .9375rem; }
.empty-state.is-error .bi { color: var(--rg-danger); }
.empty-state .btn .bi { display: inline; font-size: inherit; color: inherit; margin: 0; }

/* ---------- Sayfalama ---------- */
.pagination {
    --bs-pagination-font-size: .8125rem;
    --bs-pagination-color: var(--rg-ink-2);
    --bs-pagination-border-color: var(--rg-line);
    --bs-pagination-hover-bg: #f3f4f6;
    --bs-pagination-hover-color: var(--rg-ink);
    --bs-pagination-hover-border-color: var(--rg-line-strong);
    --bs-pagination-active-bg: var(--rg-graphite);
    --bs-pagination-active-border-color: var(--rg-graphite);
    --bs-pagination-focus-box-shadow: 0 0 0 3px rgba(232, 51, 12, .2);
    --bs-pagination-disabled-color: #b9bec6;
    margin: 0;
    flex-wrap: wrap;
    gap: 4px;
}
.pagination .page-link { border-radius: 6px !important; min-width: 32px; text-align: center; margin-left: 0 !important; }
.pager-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--rg-line); }
.pager-bar .pager-info { color: var(--rg-muted); font-size: .8125rem; }
.pager-bar .pagination-container { margin-left: auto; }

/* ---------- Sekmeler ---------- */
.nav-tabs {
    --bs-nav-tabs-border-color: var(--rg-line);
    --bs-nav-tabs-link-active-color: var(--rg-ink);
    --bs-nav-tabs-link-active-bg: transparent;
    --bs-nav-tabs-link-active-border-color: transparent;
    --bs-nav-link-color: var(--rg-muted);
    --bs-nav-link-hover-color: var(--rg-ink);
    --bs-nav-link-font-size: .875rem;
    gap: 4px;
    flex-wrap: wrap;
}
.nav-tabs .nav-link {
    border: 0;
    border-bottom: 2px solid transparent;
    padding: .6rem .85rem;
    margin-bottom: -1px;
    border-radius: 0;
}
.nav-tabs .nav-link:hover { border-bottom-color: var(--rg-line-strong); }
.nav-tabs .nav-link.active { border-bottom-color: var(--rg-red); font-weight: 450; }
.tab-content > .tab-pane { padding-top: 18px; }

/* ---------- Dropdown / modal ---------- */
.dropdown-menu {
    --bs-dropdown-font-size: .875rem;
    --bs-dropdown-border-color: var(--rg-line);
    --bs-dropdown-link-active-bg: var(--rg-graphite);
    --bs-dropdown-border-radius: 8px;
    box-shadow: var(--rg-shadow-overlay);
    padding: 6px;
}
.dropdown-item { border-radius: 5px; padding: .45rem .7rem; display: flex; align-items: center; gap: 8px; }
.dropdown-item .bi { color: var(--rg-muted); }
.modal-content { border: 0; border-radius: 12px; box-shadow: var(--rg-shadow-overlay); }
.modal-header { padding: 16px 20px; border-bottom-color: var(--rg-line); }
.modal-title { font-size: 1rem; font-weight: 500; }
.modal-body { padding: 20px; }
.modal-footer { padding: 12px 20px; border-top-color: var(--rg-line); background: var(--rg-surface-2); border-radius: 0 0 12px 12px; }
.tooltip { --bs-tooltip-font-size: .75rem; --bs-tooltip-bg: var(--rg-graphite); }

/* ---------- Yan panel (düğüm düzenleyici) ---------- */
.side-panel {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    z-index: 1045;
    width: min(880px, 100vw);
    background: var(--rg-surface);
    box-shadow: var(--rg-shadow-overlay);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .25s ease, visibility .25s;
}
.side-panel.show { transform: none; visibility: visible; }
.side-panel-header {
    flex: 0 0 auto;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--rg-line);
}
.side-panel-title { margin: 0; font-size: 1.0625rem; font-weight: 500; letter-spacing: -.011em; }
.side-panel-body { flex: 1 1 auto; overflow-y: auto; padding: 20px; position: relative; }
.side-panel-backdrop {
    position: fixed; inset: 0; z-index: 1044;
    background: rgba(20, 23, 28, .4);
    opacity: 0; visibility: hidden;
    transition: opacity .25s ease, visibility .25s;
}
.side-panel-backdrop.show { opacity: 1; visibility: visible; }
body.side-panel-open { overflow: hidden; }
.side-panel .form-actions {
    position: sticky; bottom: -20px;
    margin: 24px -20px -20px;
    padding: 14px 20px;
    background: var(--rg-surface);
    border-top: 1px solid var(--rg-line);
    z-index: 5;
}

/* Form alt çubuğu: kısayol ipucu ve kaydedilmemiş değişiklik göstergesi (düğüm düzenleyici) */
.form-actions-hint { color: var(--rg-muted); font-size: .75rem; }
.form-actions-hint kbd {
    display: inline-block;
    padding: 1px 5px;
    border: 1px solid var(--rg-line-strong);
    border-bottom-width: 2px;
    border-radius: 4px;
    background: var(--rg-surface-2);
    color: var(--rg-ink-2);
    font-size: .6875rem;
    line-height: 1.4;
    box-shadow: none;
}
.dirty-indicator {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--rg-warning);
    font-size: .8125rem;
}
.dirty-indicator::before {
    content: "";
    width: 7px; height: 7px;
    border-radius: 50%;
    background: currentColor;
}
/* Gösterge görünürken sağa yaslanan o olur; "Kapat" hemen yanına gelir */
.dirty-indicator:not([hidden]) + .btn.ms-auto { margin-left: 0 !important; }

/* ---------- Yükleniyor katmanı ---------- */
.is-blocked { position: relative; }
.block-overlay {
    position: absolute; inset: 0; z-index: 50;
    background: rgba(255, 255, 255, .65);
    display: flex; align-items: center; justify-content: center;
    border-radius: inherit;
}
.block-overlay-page { position: fixed; z-index: 2000; background: rgba(241, 242, 244, .6); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--rg-line-strong); border-top-color: var(--rg-red); animation: rg-spin .7s linear infinite; }
@keyframes rg-spin { to { transform: rotate(360deg); } }

/* ---------- Bildirimler (toast) ---------- */
/* Sağ altta: sayfa başlığındaki işlem butonlarının üstünü kapatmasın */
.toast-stack { position: fixed; bottom: 16px; right: 16px; z-index: 2100; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.toast { --bs-toast-font-size: .875rem; --bs-toast-border-color: var(--rg-line); --bs-toast-border-radius: 8px; box-shadow: var(--rg-shadow-overlay); }
.toast .toast-body { display: flex; gap: 10px; align-items: flex-start; }
.toast-success .toast-icon { color: var(--rg-success); }
.toast-danger .toast-icon { color: var(--rg-danger); }
.toast-warning .toast-icon { color: var(--rg-warning); }
.toast-info .toast-icon { color: var(--rg-ink-2); }

/* ---------- Dosya/görsel önizleme ---------- */
.app-content img[for], .side-panel img[for] { max-width: 220px; max-height: 160px; object-fit: contain; border-radius: 6px; border: 1px solid var(--rg-line); background: repeating-conic-gradient(#f3f4f6 0 25%, #fff 0 50%) 0 0/14px 14px; margin-top: 8px; }
.app-content img[for][src=""], .side-panel img[for][src=""], .app-content img[for]:not([src]), .side-panel img[for]:not([src]) { display: none; }

/* ---------- Select2 (bootstrap-5 teması üzerine) ----------
   Hedef: normal .form-control / .form-select ile aynı yükseklik, yazı boyutu, renk ve odak halkası. */
.select2-container--bootstrap-5 .select2-selection {
    min-height: 39px;
    border-color: var(--rg-line-strong);
    border-radius: var(--rg-radius-sm);
    background-color: var(--rg-surface);
    color: var(--rg-ink);
    font-family: var(--rg-font);
    font-size: .875rem;
    font-weight: 400;
}
.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: #8a909b;
    box-shadow: 0 0 0 3px rgba(232, 51, 12, .16);
}
/* Açıkken kutu ile liste birbirine yapışmasın; liste ayrı bir menü gibi dursun */
.select2-container--bootstrap-5.select2-container--open.select2-container--below .select2-selection,
.select2-container--bootstrap-5.select2-container--open.select2-container--above .select2-selection {
    border-color: #8a909b;
    border-radius: var(--rg-radius-sm);
}

/* Tek seçim: metin dikeyde ortalı, sağda ok + temizle */
.select2-container--bootstrap-5 .select2-selection--single {
    display: flex;
    align-items: center;
    padding: .5rem 2.25rem .5rem .75rem;
}
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    width: 100%;
    padding: 0;
    color: var(--rg-ink);
    line-height: 1.5;
}
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder,
.select2-container--bootstrap-5 .select2-selection--multiple .select2-search__field::placeholder { color: #9aa0aa; }
.select2-container--bootstrap-5 .select2-selection__clear {
    width: .625rem;
    height: .625rem;
    background-size: .625rem auto;
    opacity: .45;
}
.select2-container--bootstrap-5 .select2-selection__clear:hover { opacity: .9; }
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear { right: 2.25rem; }

/* Çoklu seçim: etiketler ve arama alanı aynı satırda akar */
.select2-container--bootstrap-5 .select2-selection--multiple {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: .3125rem 2.25rem .3125rem .375rem;
}
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    padding: 0;
}
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: .125rem .5rem .125rem .4375rem;
    border: 1px solid var(--rg-line);
    border-radius: 5px;
    background: #eef0f3;
    color: var(--rg-ink);
    font-size: .8125rem;
    line-height: 1.5;
}
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__remove {
    width: .5rem;
    height: .5rem;
    margin: 0;
    background-size: .5rem auto;
    opacity: .5;
}
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__remove:hover { opacity: 1; }
.select2-container--bootstrap-5 .select2-selection--multiple .select2-search--inline { display: inline-flex; flex: 1 1 80px; min-width: 80px; }
.select2-container--bootstrap-5 .select2-selection--multiple .select2-search--inline .select2-search__field {
    height: 1.625rem;
    margin: 0;
    padding-left: .375rem;
    font-family: var(--rg-font);
    font-size: .875rem;
    line-height: 1.625rem;
    color: var(--rg-ink);
}

/* Açılan liste */
.select2-container--bootstrap-5 .select2-dropdown {
    border: 1px solid var(--rg-line);
    border-radius: 8px;
    box-shadow: var(--rg-shadow-overlay);
    font-family: var(--rg-font);
    font-size: .875rem;
    overflow: hidden;
    z-index: 2050;
}
.select2-container--bootstrap-5 .select2-dropdown.select2-dropdown--below { margin-top: 4px; border-top: 1px solid var(--rg-line); border-radius: 8px; }
.select2-container--bootstrap-5 .select2-dropdown.select2-dropdown--above { margin-top: -4px; border-bottom: 1px solid var(--rg-line); border-radius: 8px; }
.select2-container--bootstrap-5 .select2-dropdown .select2-search { padding: .5rem .5rem .25rem; }
.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field {
    padding: .375rem .625rem;
    border-color: var(--rg-line-strong);
    border-radius: var(--rg-radius-sm);
    font-family: var(--rg-font);
    font-size: .875rem;
    color: var(--rg-ink);
}
.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field:focus {
    border-color: #8a909b;
    box-shadow: 0 0 0 3px rgba(232, 51, 12, .16);
}
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options { padding: .25rem; }
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option {
    padding: .4375rem .625rem;
    border-radius: 5px;
    color: var(--rg-ink);
    font-size: .875rem;
    line-height: 1.45;
}
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--highlighted { background-color: #f1f2f4; color: var(--rg-ink); }
/* Seçili seçenek: koyu blok yerine düğüm ağacındaki seçimle aynı açık ton + sağda onay işareti */
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--selected {
    position: relative;
    padding-right: 2rem;
    background-color: #fdf2ee;
    color: var(--rg-ink);
}
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--selected.select2-results__option--highlighted { background-color: #fbe6de; }
/* Not: select2 4.1'de aria-selected klavyeyle vurgulanan öğeyi gösterir; seçili öğe sadece --selected sınıfıyla bulunur */
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--selected::after {
    content: "\F272";
    font-family: "bootstrap-icons";
    position: absolute;
    right: .625rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--rg-red);
    font-size: .875rem;
}
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__message { color: var(--rg-muted); }
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[role=group] .select2-results__group { padding: .5rem .625rem .25rem; color: var(--rg-muted); font-size: .75rem; font-weight: 450; }

/* ---------- Bağlantı alanı (şablonlarda class="link-input"; bkz. admin/js/link-input.js) ---------- */
.link-field { display: flex; flex-direction: column; gap: 6px; }
.link-field-modes { align-self: flex-start; }
.link-field-modes .btn { --bs-btn-padding-y: .2rem; --bs-btn-padding-x: .6rem; --bs-btn-font-size: .78rem; }
.link-field-modes .btn .bi { color: var(--rg-muted); }
.link-field-modes .btn.active { background: var(--rg-graphite); border-color: var(--rg-graphite); color: #fff; }
.link-field-modes .btn.active .bi { color: #fff; }
.link-field-row { display: flex; gap: 8px; }
.link-field-select { flex: 1 1 auto; min-width: 0; }
.link-field-suffix { flex: 0 0 150px; width: 150px; font-family: var(--rg-mono); font-size: .8125rem; }
.link-field-info { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; min-height: 18px; color: var(--rg-muted); font-size: .78rem; }
.link-field-info .bi { color: var(--rg-info); }
.link-field-url { font-family: var(--rg-mono); font-size: .75rem; color: var(--rg-ink-2); word-break: break-all; }
.link-field-info.is-warning .bi { color: var(--rg-warning); }
.link-field-warning { color: var(--rg-warning); }
.link-field-option-url { display: block; font-family: var(--rg-mono); font-size: .72rem; color: var(--rg-muted); word-break: break-all; }
.select2-results__option--highlighted .link-field-option-url { color: var(--rg-ink-2); }
/* Modlara göre görünürlük: sayfa modunda asıl input gizli (değeri taşımaya devam eder), manuel modda sayfa seçici gizli */
.link-field[data-mode="page"] > input.link-input { display: none; }
.link-field[data-mode="manual"] > .link-field-page { display: none; }
@media (max-width: 575.98px) {
    .link-field-row { flex-direction: column; }
    .link-field-suffix { flex-basis: auto; width: 100%; }
}

/* ---------- Şablon formu: "Alan ekle" aracı (bkz. admin/js/template-fields.js) ---------- */
.tf-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0 10px; }
.tf-toolbar-actions { display: flex; gap: 8px; }
.tf-status { color: var(--rg-muted); font-size: .8125rem; }
.tf-status.is-warning { color: var(--rg-danger); }
.tf-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 520px; }
.tf-catalog { border-right: 1px solid var(--rg-line); background: var(--rg-surface-2); padding: 10px 8px; overflow-y: auto; max-height: calc(100vh - 220px); }
.tf-group + .tf-group { margin-top: 10px; }
.tf-group-title { padding: 4px 10px; font-size: .72rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--rg-muted); }
.tf-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px; border: 0; border-radius: var(--rg-radius-sm); background: transparent; color: var(--rg-ink-2); font-size: .84375rem; text-align: left; }
.tf-item .bi { flex: none; width: 16px; color: var(--rg-muted); }
.tf-item:hover { background: #eceef1; color: var(--rg-ink); }
.tf-item.active { background: var(--rg-surface); color: var(--rg-ink); box-shadow: inset 0 0 0 1px var(--rg-line), 0 1px 2px rgba(20, 23, 28, .05); }
.tf-item.active .bi { color: var(--rg-red); }
.tf-config { padding: 20px 24px; min-width: 0; }
.tf-config-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.tf-config-head > .bi { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 8px; background: var(--rg-red-soft); color: var(--rg-red); font-size: 1.05rem; }
.tf-config-title { margin: 0; font-size: 1rem; font-weight: 500; }
.tf-config-desc { margin: 2px 0 0; color: var(--rg-muted); font-size: .8125rem; }
.tf-names { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 16px 0 14px; min-height: 22px; font-size: .8125rem; }
.tf-names-label { color: var(--rg-muted); }
.tf-name { padding: 2px 7px; border-radius: 5px; background: var(--rg-success-soft); color: var(--rg-success); font-family: var(--rg-mono); font-size: .75rem; }
.tf-name.is-conflict { background: #fbe7e8; color: var(--rg-danger); }
.tf-names-error { flex-basis: 100%; color: var(--rg-danger); }
.tf-code-label { font-size: .78rem; color: var(--rg-muted); margin-bottom: 4px; }
.tf-code { margin: 0; max-height: 260px; overflow: auto; padding: 12px 14px; border: 1px solid var(--rg-line); border-radius: 8px; background: var(--rg-surface-2); font-family: var(--rg-mono); font-size: .75rem; line-height: 1.55; color: var(--rg-ink-2); white-space: pre; }
.tf-footer-hint { margin-right: auto; color: var(--rg-muted); font-size: .78rem; }
.tf-footer-hint [data-tf-where] { color: var(--rg-ink-2); font-weight: 500; }
.CodeMirror .tf-inserted { background: var(--rg-success-soft); }
@media (max-width: 767.98px) {
    .tf-layout { grid-template-columns: 1fr; }
    .tf-catalog { border-right: 0; border-bottom: 1px solid var(--rg-line); max-height: 220px; }
    .tf-footer-hint { display: none; }
}

/* Şablon formlarındaki yardımcı öğeler (düğüm formunda görünür) */
.form-section-title { margin: 1.75rem 0 1rem; padding-bottom: 8px; border-bottom: 1px solid var(--rg-line); font-size: .9375rem; font-weight: 500; color: var(--rg-ink); }
.form-section-title:first-child { margin-top: .25rem; }
/* Henüz yüklenmemiş görsel/dosya önizlemesi boş kutu olarak görünmesin */
.form-group img[for][src=""], .m-form__group img[for][src=""], .form-group img[for]:not([src]), .m-form__group img[for]:not([src]) { display: none; }
.form-group img[for], .m-form__group img[for] { display: block; max-width: 100%; height: auto; margin-top: 8px; border-radius: 6px; border: 1px solid var(--rg-line); }
.form-group a[for], .m-form__group a[for] { display: inline-block; margin-top: 6px; font-size: .8125rem; word-break: break-all; }
.form-group a[for]:empty, .m-form__group a[for]:empty { display: none; }
.form-group .form-control-color, .m-form__group .form-control-color { width: 4rem; }
.form-group > .checkbox-inline, .m-form__group > .checkbox-inline { display: flex; margin-top: 8px; }

/* ---------- Bilgi balonu (alan açıklamaları; bkz. admin.js infoTip) ---------- */
.info-tip { display: inline-grid; place-items: center; width: 18px; height: 18px; margin: 0 0 0 2px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--rg-muted); font-size: .8125rem; line-height: 1; vertical-align: 1px; cursor: help; }
.info-tip:hover, .info-tip[aria-expanded="true"] { color: var(--rg-info); }
.info-tip:focus-visible { outline: 2px solid var(--rg-info); outline-offset: 1px; }
.info-tip-popover { --bs-popover-max-width: 320px; --bs-popover-font-size: .8125rem; --bs-popover-body-padding-x: 12px; --bs-popover-body-padding-y: 10px; --bs-popover-border-color: var(--rg-line); --bs-popover-body-color: var(--rg-ink-2); box-shadow: var(--rg-shadow-overlay); line-height: 1.5; z-index: 2070; }
.info-tip-popover a { color: var(--rg-info); }

/* Form içinde alan grubu başlığı (ör. düğüm panelindeki "Dil eşleşmeleri") */
.form-section-label { display: flex; align-items: center; gap: 6px; padding-top: 14px; border-top: 1px solid var(--rg-line); font-size: .8125rem; font-weight: 600; color: var(--rg-ink); }

/* ---------- Flatpickr ---------- */
.flatpickr-calendar { font-family: var(--rg-font); box-shadow: var(--rg-shadow-overlay); border-radius: 8px; z-index: 2060 !important; }
.flatpickr-day.selected, .flatpickr-day.selected:hover { background: var(--rg-graphite); border-color: var(--rg-graphite); }
.flatpickr-day.today { border-color: var(--rg-red); }

/* ---------- Summernote ---------- */
.note-editor.note-frame { border-color: var(--rg-line-strong) !important; border-radius: var(--rg-radius-sm); }
.note-editor .note-toolbar { background: var(--rg-surface-2); border-bottom: 1px solid var(--rg-line) !important; border-radius: var(--rg-radius-sm) var(--rg-radius-sm) 0 0; }
.note-editor .note-btn { font-size: .8125rem; }
.note-editor .note-editing-area .note-editable { font-family: var(--rg-font); font-size: .875rem; }
/* Yazım alanı beyaz: gri zemin alanı salt okunur gibi gösteriyordu (Summernote kapsayıcısı .card zeminini alıyor) */
.note-editor.note-frame,
.note-editor.note-frame .note-editing-area,
.note-editor.note-frame .note-editing-area .note-editable { background-color: var(--rg-surface); color: var(--rg-ink); }
.note-editor.note-frame.codeview .note-editing-area .note-codable { background-color: var(--rg-graphite); color: #e6e8eb; }
.note-editor .note-statusbar { background: var(--rg-surface-2) !important; border-top: 1px solid var(--rg-line) !important; }
.note-editable h2 { font-size: 1.25rem; font-weight: 500; margin: 1em 0 .5em; }
.note-editable h3 { font-size: 1.0625rem; font-weight: 500; margin: 1em 0 .5em; }
.note-editable h4 { font-size: .9375rem; font-weight: 500; margin: 1em 0 .5em; }
.note-editable blockquote { margin: 0 0 1em; padding: 2px 0 2px 14px; border-left: 3px solid var(--rg-line-strong); color: var(--rg-ink-2); }
.note-editable table { width: 100%; border-collapse: collapse; margin-bottom: 1em; }
.note-editable td, .note-editable th { border: 1px solid var(--rg-line); padding: 6px 8px; }
.note-modal .modal-dialog { z-index: 2070; }

/* ---------- Etiket girişi (jquery-tagsinput) ---------- */
div.tagsinput { border: 1px solid var(--rg-line-strong) !important; border-radius: var(--rg-radius-sm); background: var(--rg-surface) !important; padding: 5px 6px !important; min-height: 42px !important; height: auto !important; }
div.tagsinput span.tag { background: #eef0f3 !important; border: 1px solid var(--rg-line) !important; color: var(--rg-ink) !important; border-radius: 5px; font-family: var(--rg-font) !important; font-size: .8125rem !important; padding: 2px 6px !important; margin: 2px 4px 2px 0 !important; }
div.tagsinput span.tag a { color: var(--rg-muted) !important; }
div.tagsinput input { font-family: var(--rg-font) !important; font-size: .8125rem !important; color: var(--rg-ink) !important; margin: 2px 0 !important; padding: 2px !important; }

/* ---------- Giriş ekranı ---------- */
.auth-body { background: linear-gradient(180deg, var(--rg-sidebar-bg) 0%, var(--rg-sidebar-bg-end) 100%); min-height: 100vh; display: flex; }
.auth-shell { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 480px); min-height: 100vh; }
.auth-brand {
    position: relative;
    padding: 48px 56px;
    display: flex; flex-direction: column; justify-content: space-between;
    color: var(--rg-sidebar-text);
    overflow: hidden;
}
.auth-brand-logo { height: 22px; width: auto; align-self: flex-start; }
.auth-brand-statement {
    font-size: clamp(1.75rem, 2.6vw, 2.25rem);
    line-height: 1.25;
    font-weight: 300;
    letter-spacing: -.02em;
    color: #fff;
    max-width: 20ch;
    margin: 0;
}
.auth-brand-foot { font-size: .8125rem; color: var(--rg-sidebar-muted); }
.auth-card { background: var(--rg-surface); display: flex; flex-direction: column; justify-content: center; padding: 48px 48px; }
.auth-card h1 { font-size: 1.375rem; font-weight: 500; letter-spacing: -.015em; margin-bottom: 6px; }
.auth-card .lead { font-size: .875rem; color: var(--rg-muted); margin-bottom: 28px; }
@media (max-width: 860px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { padding: 28px 24px; min-height: 0; }
    .auth-brand-statement { display: none; }
    .auth-brand-foot { display: none; }
    .auth-card { padding: 32px 24px 48px; border-radius: 16px 16px 0 0; }
}

/* ---------- Yardımcılar ---------- */
.text-muted { color: var(--rg-muted) !important; }
.fw-medium { font-weight: 500 !important; }
.gap-row { row-gap: 1rem; }
.min-w-0 { min-width: 0; }
.drag-handle { cursor: grab; color: #9aa0aa; }
.drag-handle:active { cursor: grabbing; }
.sortable-ghost { opacity: .45; background: var(--rg-red-soft) !important; }
.code-editor .CodeMirror { height: 420px; border: 1px solid var(--rg-line-strong); border-radius: var(--rg-radius-sm); font-family: var(--rg-mono); font-size: .8125rem; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }

/* ---------- Düğüm ağacı ---------- */
/* Üst blok: filtre çubuğu + seçim çubuğu, sayfa kaydırılırken üstte sabit kalır */
.tree-head {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--rg-surface);
    border-bottom: 1px solid var(--rg-line);
    border-radius: var(--rg-radius) var(--rg-radius) 0 0;
}
@media (max-width: 991.98px) {
    .tree-head { top: 56px; }
}
.tree-filterbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 12px 10px 18px;
    border-bottom: 1px solid var(--rg-line);
}
.tree-filterbar .form-select.tree-language { width: auto; min-width: 84px; }
.tree-search { flex: 0 1 340px; }
.tree-search .form-control { min-width: 0; width: 100%; padding-right: 34px; }
.tree-search .form-control::-webkit-search-cancel-button { margin-right: 22px; }
.tree-search-kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.tree-search .form-control:focus ~ .tree-search-kbd,
.tree-search .form-control:not(:placeholder-shown) ~ .tree-search-kbd { display: none; }
.tree-filterbar .btn-check:checked + .btn-outline-secondary {
    background: var(--rg-graphite);
    border-color: var(--rg-graphite);
    color: #fff;
}
.tree-filterbar .btn-check:checked + .btn-outline-secondary .bi { color: #fff; }
.tree-filterbar .btn-outline-secondary .bi { color: var(--rg-muted); }
.tree-result-info { color: var(--rg-muted); font-size: .8125rem; white-space: nowrap; }
.tree-result-info:empty { display: none; }
@media (max-width: 767.98px) {
    .tree-search { flex: 1 1 100%; order: -1; }
}

/* Klavye ipuçları */
.tree-search-kbd, .node-toolbar kbd, .tree-menu kbd {
    display: inline-block;
    min-width: 20px;
    padding: 1px 5px;
    border: 1px solid var(--rg-line-strong);
    border-bottom-width: 2px;
    border-radius: 4px;
    background: var(--rg-surface-2);
    color: var(--rg-muted);
    font-family: var(--rg-mono);
    font-size: .6875rem;
    line-height: 1.4;
    text-align: center;
    box-shadow: none;
}

/* Seçim çubuğu */
.node-toolbar {
    display: flex;
    align-items: center;
    min-height: 58px;
    padding: 8px 12px 8px 18px;
}
.node-toolbar-empty { color: var(--rg-muted); font-size: .8125rem; display: flex; align-items: center; gap: 8px; line-height: 1.7; }
.node-toolbar-selected { display: none; flex: 1; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; min-width: 0; }
.node-toolbar.has-selection .node-toolbar-empty { display: none; }
.node-toolbar.has-selection .node-toolbar-selected { display: flex; }
.node-toolbar-info { display: flex; flex-direction: column; gap: 1px; }
.node-toolbar-trail {
    display: flex; flex-wrap: wrap; align-items: center;
    list-style: none; margin: 0; padding: 0;
    font-size: .75rem; color: var(--rg-muted);
}
.node-toolbar-trail:empty { display: none; }
.node-toolbar-trail li + li::before { content: "›"; padding: 0 6px; color: var(--rg-line-strong); }
.node-toolbar-trail button { border: 0; padding: 0; background: none; color: inherit; font: inherit; }
.node-toolbar-trail button:hover { color: var(--rg-ink); text-decoration: underline; text-underline-offset: .18em; }
.node-toolbar-title {
    border: 0; padding: 0; background: none;
    font-weight: 450; font-size: .9375rem; color: var(--rg-ink); text-align: left;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48ch;
}
.node-toolbar-title:hover { text-decoration: underline; text-underline-offset: .18em; }
.node-toolbar-actions { display: flex; align-items: center; gap: 6px; }

/* İşlem menüsü (araç çubuğu "⋯" ve sağ tık) */
.tree-menu { min-width: 236px; }
.tree-menu .dropdown-item { gap: 10px; }
.tree-menu .dropdown-item > span { flex: 1 1 auto; }
.tree-menu .dropdown-item kbd { margin-left: 12px; }
.tree-menu .dropdown-item.text-danger .bi { color: var(--rg-danger); }
.tree-menu .dropdown-item:disabled { opacity: .45; }
.tree-context-menu { position: fixed; z-index: 1060; margin: 0; }

/* Ağaç */
#node-tree-container { position: relative; padding: 10px 10px 16px; }
.node-tree.jstree-default .jstree-node { margin-left: 22px; min-height: 30px; line-height: 30px; }
.node-tree.jstree-default > .jstree-container-ul > .jstree-node { margin-left: 0; }
/* jstree kök listeyi inline-block yapıp içeriğe göre genişletiyor; panel genişliğinde kalsın */
.node-tree > .jstree-container-ul { display: block; }
.node-tree.jstree-default .jstree-anchor {
    height: 30px;
    line-height: 30px;
    padding: 0 10px 0 4px;
    color: var(--rg-ink);
    font-size: .84375rem;
    letter-spacing: -.003em;
    border-radius: 6px;
    /* Uzun url/path panelden taşmasın */
    max-width: calc(100% - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: top;
}
.node-tree.jstree-default .jstree-wholerow { height: 30px; border-radius: 6px; }
/* Satır vurgusu tüm genişliği değil, düğümün kendi girintisinden itibaren kaplar
   (alt listeler position: relative olduğu için 22px = düğümün kendi ok sütunu) */
.node-tree.jstree-default .jstree-children > .jstree-node > .jstree-wholerow { left: 22px; width: auto; right: 0; }
.node-tree.jstree-default .jstree-wholerow-hovered { background: #f4f5f6; }
/* Seçim: markanın kırmızısından çok açık bir ton + ince çerçeve; üzerine gelme (nötr gri) ile karışmaz */
.node-tree.jstree-default .jstree-wholerow-clicked { background: #fdf2ee; box-shadow: inset 0 0 0 1px #f6d6cb; }
.node-tree.jstree-default .jstree-hovered,
.node-tree.jstree-default .jstree-clicked { background: transparent; box-shadow: none; }
.node-tree.jstree-default .jstree-ocl { width: 22px; height: 30px; line-height: 30px; }
.node-tree.jstree-default .jstree-icon.jstree-themeicon { width: 22px; height: 30px; line-height: 30px; font-size: .875rem; color: var(--rg-ink-2); background: none; }
/* Modül (sayfa olmayan) kayıtlar mavi, sayfalar yeşil; pasifler aşağıdaki kuralla gri kalır */
.node-tree .jstree-node.data-layer > .jstree-anchor > .jstree-themeicon { color: var(--rg-info); }
/* Sayfalar modüllerden kolay ayırt edilsin (pasif sayfalar aşağıdaki kuralla gri kalır) */
.node-tree .jstree-node.data-page > .jstree-anchor > .jstree-themeicon { color: var(--rg-success); }
/* Pasif kayıtlar: sadece ikon "Pasif" etiketiyle aynı amber tonda; başlık normal renkte kalır */
.node-tree .jstree-node.passive > .jstree-anchor > .jstree-themeicon { color: var(--rg-warning); }
/* Başlık 13.5px/400 (ince, sade); url ve path geri planda ama ≥4.5:1 kontrastla okunur */
.node-tree .tree-title { font-weight: 400; color: var(--rg-ink); }
.node-tree .tree-meta { margin-left: 8px; font-family: var(--rg-mono); font-size: .6875rem; color: #6f7683; }
.node-tree .tree-path { padding: 0 5px; border: 1px solid var(--rg-line); border-radius: 4px; background: transparent; }
.node-tree .tree-badge { margin-left: 8px; font-size: .65625rem; padding: 1px 6px; border-radius: 999px; background: var(--rg-warning-soft); color: var(--rg-warning); }
/* Kapalı dalda alt düğüm sayısı */
.node-tree .tree-count {
    display: inline-block;
    margin-left: 8px;
    min-width: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #eef0f3;
    color: var(--rg-muted);
    font-size: .65625rem;
    line-height: 16px;
    text-align: center;
    vertical-align: 1px;
}
.node-tree .jstree-open > .jstree-anchor .tree-count { display: none; }
.node-tree .jstree-ocl { color: var(--rg-muted); }
.node-tree .jstree-anchor:focus-visible { outline-offset: -2px; }

/* Seviye kılavuz çizgileri */
.node-tree .jstree-node > .jstree-children { position: relative; }
.node-tree .jstree-node > .jstree-children::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 10px;
    border-left: 1px solid var(--rg-line);
    pointer-events: none;
    z-index: 1;
}

/* jstree'nin png ok ikonları yerine bootstrap-icons */
.node-tree.jstree-default .jstree-open > .jstree-ocl,
.node-tree.jstree-default .jstree-closed > .jstree-ocl { background: none; text-align: center; }
.node-tree.jstree-default .jstree-closed > .jstree-ocl::before { content: "\F285"; font-family: "bootstrap-icons"; font-size: .6875rem; display: inline-block; line-height: 30px; vertical-align: top; }
.node-tree.jstree-default .jstree-open > .jstree-ocl::before { content: "\F282"; font-family: "bootstrap-icons"; font-size: .6875rem; display: inline-block; line-height: 30px; vertical-align: top; }

/* Sürükleme tutamağı: satırın ikonu üzerine gelince tutamağa dönüşür (dil kökleri hariç) */
#node-tree-container:not(.has-filter) .node-tree .jstree-children .jstree-anchor:hover > .jstree-themeicon { cursor: grab; color: var(--rg-ink); }
#node-tree-container:not(.has-filter) .node-tree .jstree-children .jstree-anchor:hover > .jstree-themeicon::before { content: "\F3FE"; }
.rg-tree-dragging, .rg-tree-dragging * { cursor: grabbing !important; }
#jstree-dnd.jstree-default { font-family: var(--rg-font); font-size: .8125rem; background: var(--rg-surface); border: 1px solid var(--rg-line); border-radius: 6px; padding: 4px 10px; box-shadow: var(--rg-shadow-overlay); }
#jstree-dnd.jstree-default .tree-meta, #jstree-dnd.jstree-default .tree-count { display: none; }
#jstree-marker { border-left-color: var(--rg-red); }

/* Arama / filtre sonuçları */
.node-tree.jstree-default .jstree-search { font-style: normal; font-weight: inherit; color: inherit; }
/* Metin aramasında sadece bağlam için görünen üst düğümler soluk (tip/pasif filtresinde soluklaştırma yok) */
.has-query .node-tree .jstree-anchor:not(.jstree-search) { color: var(--rg-muted); }
.has-query .node-tree .jstree-search .tree-title { background: var(--rg-warning-soft); border-radius: 3px; box-shadow: 0 0 0 2px var(--rg-warning-soft); }
/* Sadece içerikte eşleşenler: başlık vurgulanmaz (başlıkta geçmiyor), yerine "İçerikte" etiketi */
.has-query .node-tree .jstree-node.content-match > .jstree-search .tree-title { background: none; box-shadow: none; }
.has-query .node-tree .jstree-node.content-match > .jstree-anchor .tree-title::after {
    content: "İçerikte";
    display: inline-block;
    margin-left: 8px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--rg-info-soft);
    color: var(--rg-info);
    font-size: .65625rem;
    line-height: 16px;
    vertical-align: 1px;
}
/* Seçili düğümün içerikte geçtiği yer (araç çubuğunda) */
.node-toolbar-snippet {
    max-width: 90ch;
    margin-top: 2px;
    overflow: hidden;
    color: var(--rg-muted);
    font-size: .75rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.node-toolbar-snippet .bi { color: var(--rg-info); }
.node-toolbar-snippet mark { padding: 0 1px; border-radius: 2px; background: var(--rg-warning-soft); color: var(--rg-ink); }

/* Satır üzerindeki kısa yol butonları */
.tree-row-actions {
    position: absolute;
    right: 10px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 4px 0 24px;
    border-radius: 0 6px 6px 0;
    background: linear-gradient(to right, rgba(244, 245, 246, 0), #f4f5f6 20px);
}
.tree-row-actions.is-selected { background: linear-gradient(to right, rgba(253, 242, 238, 0), #fdf2ee 20px); }
.tree-row-actions .btn-icon { width: 26px; height: 26px; }
.tree-row-actions .btn-icon:hover { background: #e4e6ea; }

/* Bildirimde işlem butonu (örn. "Geri al") */
.toast .toast-action { flex: 0 0 auto; --bs-btn-padding-y: .15rem; --bs-btn-padding-x: .55rem; --bs-btn-font-size: .8125rem; margin-top: -2px; }

/* Şablon formu içindeki bölüm başlıkları (FormHtml'de h5 olarak geliyor) */
#form-template-form h5 {
    margin: 26px 0 14px;
    padding-bottom: 8px;
    font-size: .9375rem;
    font-weight: 500;
    color: var(--rg-ink);
    border-bottom: 1px solid var(--rg-line);
}
#form-template-form > h5:first-child, #form-template-form .tab-pane > h5:first-child { margin-top: 4px; }

/* Sektör çoklu seçimi (eski özel bileşen; şablonlarda #multiSelectBox ile kullanılıyor) */
.multi-select-container { position: relative; }
.multi-select-box { min-height: 40px; padding: 6px 12px; border: 1px solid var(--rg-line-strong); border-radius: var(--rg-radius-sm); background: var(--rg-surface); cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.multi-select-box.open { border-color: #8a909b; box-shadow: 0 0 0 3px rgba(232, 51, 12, .16); }
.selected-items { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.selected-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; background: #eef0f3; color: var(--rg-ink); border-radius: 5px; font-size: .75rem; }
.remove-tag { background: none; border: 0; color: var(--rg-muted); padding: 0; line-height: 1; }
.dropdown-arrow { margin-left: 8px; transition: transform .2s; }
.dropdown-arrow.rotated { transform: rotate(180deg); }
.multi-select-dropdown { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--rg-surface); border: 1px solid var(--rg-line); border-radius: 8px; max-height: 240px; overflow-y: auto; z-index: 1000; display: none; box-shadow: var(--rg-shadow-overlay); }
.multi-select-dropdown.show { display: block; }
.dropdown-option { padding: 8px 12px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.dropdown-option:hover { background: #f3f4f6; }
.dropdown-option.selected { background: #eceef1; }
.clear-all-btn { padding: 8px 12px; border-top: 1px solid var(--rg-line); cursor: pointer; text-align: center; font-size: .75rem; color: var(--rg-danger); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- Medya alanı (şablonlardaki "_file" alanları; bkz. admin/js/media-field.js) ---------- */
.media-field { position: relative; }
.media-field-card {
    display: flex; align-items: center; gap: 14px;
    padding: 10px;
    border: 1px solid var(--rg-line);
    border-radius: var(--rg-radius-sm);
    background: var(--rg-surface);
    transition: border-color .15s ease, background-color .15s ease;
}
.media-field.is-empty .media-field-card { border-style: dashed; border-color: var(--rg-line-strong); background: var(--rg-surface-2); }
.media-field.is-changed .media-field-card { border-color: var(--rg-info); background: var(--rg-info-soft); }
.media-field.is-removed .media-field-card { border-color: var(--rg-danger); background: #fdf0f0; }
.media-field.is-removed .media-field-preview img { opacity: .4; filter: grayscale(1); }
.media-field.is-removed .media-field-name { text-decoration: line-through; color: var(--rg-muted); }

.media-field-preview {
    flex: 0 0 auto;
    width: 112px; height: 84px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px;
    overflow: hidden;
    /* Şeffaf görseller (logo, svg) seçilebilir görünsün diye dama deseni */
    background-color: var(--rg-surface-2);
    background-image: linear-gradient(45deg, #eceef1 25%, transparent 25%), linear-gradient(-45deg, #eceef1 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #eceef1 75%), linear-gradient(-45deg, transparent 75%, #eceef1 75%);
    background-size: 14px 14px;
    background-position: 0 0, 0 7px, 7px -7px, -7px 0;
    border: 1px solid var(--rg-line);
}
.media-field-preview img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.media-field-preview .bi { font-size: 1.75rem; color: var(--rg-muted); }
.media-field.is-empty .media-field-preview,
.media-field-preview.is-file,
.media-field-preview.is-missing { background-image: none; }
.media-field-preview.is-missing .bi { color: var(--rg-warning); }

.media-field-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.media-field-name { font-size: .875rem; font-weight: 500; color: var(--rg-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-field-name a { color: inherit; text-decoration: none; }
.media-field-name a:hover { text-decoration: underline; }
.media-field-meta { font-size: .75rem; color: var(--rg-muted); }
.media-field-badge { display: inline-block; padding: 0 6px; border-radius: 999px; background: var(--rg-surface); color: var(--rg-info); border: 1px solid currentColor; font-size: .6875rem; line-height: 1.5; }
.media-field-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.media-field-actions .btn-link { --bs-btn-padding-x: .35rem; text-decoration: none; }

.media-field-drop-hint {
    position: absolute; inset: 0;
    display: none; align-items: center; justify-content: center; gap: 8px;
    border: 2px dashed var(--rg-info);
    border-radius: var(--rg-radius-sm);
    background: rgba(232, 240, 250, .92);
    color: var(--rg-info);
    font-weight: 500;
    pointer-events: none;
}
.media-field.is-dragover .media-field-drop-hint { display: flex; }
.media-field-alt { margin-top: 10px; }
.media-field-alt .form-label { font-size: .8125rem; color: var(--rg-ink-2); margin-bottom: 4px; }

@media (max-width: 575.98px) {
    .media-field-card { align-items: flex-start; }
    .media-field-preview { width: 72px; height: 56px; }
}

/* Ortam kütüphanesi seçici */
.media-library .modal-content { height: min(760px, calc(100vh - 3.5rem)); }
.media-library-toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 10px 20px;
    border-bottom: 1px solid var(--rg-line);
}
.media-library-trail { display: flex; align-items: center; gap: 6px; font-size: .8125rem; min-width: 0; flex-wrap: wrap; }
.media-library-trail .bi { font-size: .7rem; color: var(--rg-muted); }
.media-library-trail .btn-link { font-size: .8125rem; text-decoration: none; }
.media-library-search { position: relative; width: min(280px, 100%); }
.media-library-search .bi { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--rg-muted); font-size: .8rem; }
.media-library-search .form-control { padding-left: 30px; }
.media-library-folders { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.media-library-folders:empty { display: none; }
.media-folder {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--rg-line);
    border-radius: 999px;
    background: var(--rg-surface);
    font-size: .8125rem;
    color: var(--rg-ink-2);
}
.media-folder:hover { border-color: var(--rg-line-strong); background: var(--rg-surface-2); }
.media-folder .bi { color: var(--rg-muted); }
.media-library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.media-tile {
    display: flex; flex-direction: column; gap: 6px;
    padding: 6px;
    border: 1px solid var(--rg-line);
    border-radius: 8px;
    background: var(--rg-surface);
    text-align: left;
    min-width: 0;
}
.media-tile:hover { border-color: var(--rg-line-strong); }
.media-tile:focus-visible { outline: 2px solid var(--rg-info); outline-offset: 2px; }
.media-tile.is-selected { border-color: var(--rg-info); box-shadow: 0 0 0 2px var(--rg-info); }
.media-tile-thumb {
    aspect-ratio: 4 / 3;
    display: flex; align-items: center; justify-content: center;
    border-radius: 5px;
    background: var(--rg-surface-2);
    overflow: hidden;
}
.media-tile-thumb img { width: 100%; height: 100%; object-fit: contain; }
.media-tile-thumb .bi { font-size: 1.75rem; color: var(--rg-muted); }
.media-tile-name { font-size: .75rem; color: var(--rg-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-library-loading { padding: 32px; text-align: center; color: var(--rg-muted); font-size: .8125rem; }
.media-library-more { margin-top: 16px; }
.media-field-warning { color: var(--rg-warning); }
.media-field-danger { color: var(--rg-danger); }

/* ---------- SEO bölümü (Views/Template/TemplateForm.cshtml) ---------- */
.seo-section { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--rg-line); }
.seo-section .form-section-title { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; padding: 0; border: 0; }
.font-monospace::placeholder { font-family: var(--rg-font); }
.seo-section .form-section-title .bi { color: var(--rg-muted); font-size: .875rem; }
.seo-preview {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid var(--rg-line);
    border-radius: var(--rg-radius-sm);
    background: var(--rg-surface-2);
    font-family: Arial, system-ui, sans-serif;
    max-width: 640px;
}
.seo-preview-url { font-size: .8125rem; color: #4d5156; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seo-preview-title { font-size: 1.1875rem; line-height: 1.3; color: #1a0dab; margin-bottom: 4px; }
.seo-preview-desc { font-size: .875rem; line-height: 1.45; color: #4d5156; }
.seo-preview-desc.is-empty { font-style: italic; color: var(--rg-muted); }
.seo-counter { margin-top: 4px; font-size: .75rem; color: var(--rg-muted); text-align: right; }
.seo-counter.is-over { color: var(--rg-warning); }
.field-warning { color: var(--rg-warning); }
.seo-section .form-switch .info-tip { margin-left: 4px; }
.seo-section.is-first { margin-top: 0; padding-top: 0; border-top: 0; }
.page-breadcrumb .breadcrumb-group { color: var(--rg-muted); }
.dropdown-item-danger, .dropdown-item-danger .bi { color: var(--rg-danger) !important; }
.dropdown-item-danger:hover, .dropdown-item-danger:focus { background: #fbecec; }
.cell-actions .dropdown { display: inline-flex; }

/* ---------- Form başvuru listeleri filtre çubuğu (Views/Shared/Partials/_FormListFilter.cshtml) ---------- */
.form-list-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; width: 100%; }
.form-list-filter .search-input { flex: 1 1 260px; }
.form-list-filter .search-input .form-control { width: 100%; }
.toolbar .form-list-filter-dates .form-control { min-width: 0; width: 150px; }
.form-list-filter-dates { display: inline-flex; align-items: center; gap: 6px; }
.form-list-filter-count { margin-left: auto; font-size: .8125rem; color: var(--rg-muted); }
@media (max-width: 767.98px) {
    .form-list-filter > * { flex: 1 1 100%; }
    .form-list-filter-dates .form-control { flex: 1 1 0; width: auto; }
    .form-list-filter-count { margin-left: 0; }
}
.cell-url-inline { font-family: var(--rg-mono); font-size: .75rem; overflow-wrap: anywhere; }

/* ---------- Anasayfa panosu (Views/Home/Index.cshtml) ---------- */
.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-tile {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 16px 18px;
    background: var(--rg-surface);
    border: 1px solid var(--rg-line);
    border-radius: var(--rg-radius);
    color: var(--rg-ink);
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.stat-tile:hover { border-color: var(--rg-line-strong); box-shadow: 0 2px 8px rgba(20, 23, 28, .06); color: var(--rg-ink); }
.stat-tile-icon {
    flex: 0 0 auto; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; background: var(--rg-surface-2); color: var(--rg-muted);
}
.stat-tile-body { display: flex; flex-direction: column; min-width: 0; }
.stat-tile-label { font-size: .8125rem; color: var(--rg-muted); }
.stat-tile-value { font-size: 1.5rem; font-weight: 500; line-height: 1.25; }
.stat-tile-value small { font-size: .8125rem; font-weight: 400; color: var(--rg-muted); }
.stat-tile-sub { font-size: .75rem; color: var(--rg-muted); }

.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; margin-bottom: 20px; }
.dashboard-grid > .panel { margin: 0 !important; }
.dashboard-list { list-style: none; margin: 0; padding: 4px 0; }
.dashboard-list a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 20px; color: var(--rg-ink); text-decoration: none; }
.dashboard-list a:hover { background: var(--rg-surface-2); }
.dashboard-list-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-list-meta { flex: 0 0 auto; font-size: .78rem; color: var(--rg-muted); }

.dashboard-attention { padding: 4px 0 8px; }
.attention-group { padding: 10px 20px; }
.attention-group + .attention-group { border-top: 1px solid var(--rg-line); }
.attention-title { display: flex; align-items: center; gap: 8px; font-size: .8125rem; font-weight: 500; color: var(--rg-ink-2); margin-bottom: 6px; }
.attention-title .bi { color: var(--rg-muted); }
.attention-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: .875rem; color: var(--rg-ink); text-decoration: none; }
a.attention-row:hover { color: var(--rg-ink); text-decoration: underline; }
.attention-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: .8125rem; color: var(--rg-info); text-decoration: none; }
.attention-link:hover { text-decoration: underline; }
.empty-state-compact { padding: 20px; }
