/* ==========================================================================
   Medresem Plus — arayüz
   Tek tasarım dili: renkler, boşluklar ve bileşenler bu dosyada tanımlı.
   ========================================================================== */

:root {
    /* Renkler */
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-2: #f9fafb;
    --text: #111827;
    --text-2: #374151;
    --muted: #6b7280;
    --subtle: #9ca3af;
    --border: #e5e7eb;
    --border-strong: #d1d5db;

    --primary: #d9620b;
    --primary-hover: #b8520a;
    --primary-soft: #fff3e8;
    --primary-ring: rgba(217, 98, 11, .2);

    --danger: #b42318;
    --danger-hover: #912018;
    --danger-soft: #fef3f2;
    --success: #067647;
    --success-soft: #ecfdf3;
    --warning: #b54708;
    --warning-soft: #fffaeb;
    --info: #175cd3;
    --info-soft: #eff8ff;

    /* Dolgulu zeminlerin üstündeki yazı (buton, seçili Evet/Hayır) */
    --on-primary: #fff;
    --on-danger: #fff;
    --on-success: #fff;
    --success-hover: #05603a;

    /* Yumuşak zeminlerin kenarlıkları */
    --primary-border: #fcd5b0;
    --danger-border: #fecdca;
    --success-border: #abefc6;
    --warning-border: #fedf89;
    --info-border: #b2ddff;

    /* Nötr rozet, sayaç, ölçek */
    --chip-bg: #f2f4f7;
    --chip-text: #344054;
    --chip-border: #e4e7ec;
    --count-warning-bg: #fef0c7;
    --row-hover: #fafbfc;
    --meter-bg: #eef0f3;
    --segment-active: var(--surface);
    --topbar-bg: rgba(255, 255, 255, .92);
    --backdrop: rgba(17, 24, 39, .35);
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

    /* Ölçüler */
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
    --shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, .16);
    --sidebar-w: 248px;
    --control-h: 40px;

    color-scheme: light;
}

/* Karanlık tema. <html data-theme="dark"> sayfa çizilmeden önce
   layout'taki küçük betikle ayarlanır (tercih bu cihazda saklanır).
   Yazı renkleri yüzeye karşı en az WCAG AA (4.5:1) kontrastta seçildi. */
:root[data-theme="dark"] {
    --bg: #0d1117;
    --surface: #161b22;
    --surface-2: #1c232c;
    --text: #e6edf3;
    --text-2: #c5ced8;
    --muted: #9ba6b2;
    --subtle: #808b97;
    --border: #2a323d;
    --border-strong: #3b4552;

    --primary: #ff9a4d;
    --primary-hover: #ffb57d;
    --primary-soft: #33210f;
    --primary-ring: rgba(255, 154, 77, .3);

    --danger: #ff8a80;
    --danger-hover: #ffaaa2;
    --danger-soft: #2f1a1a;
    --success: #4fd18f;
    --success-soft: #11291f;
    --warning: #fbbf4a;
    --warning-soft: #2c2312;
    --info: #79bcff;
    --info-soft: #12253b;

    --on-primary: #2b1300;
    --on-danger: #2b0b08;
    --on-success: #062716;
    --success-hover: #74dea8;

    --primary-border: #6b3b14;
    --danger-border: #6a2b27;
    --success-border: #1f5a3e;
    --warning-border: #66491a;
    --info-border: #234d7a;

    --chip-bg: #232b35;
    --chip-text: #c5ced8;
    --chip-border: #343e4a;
    --count-warning-bg: #3a2c10;
    --row-hover: #1a2029;
    --meter-bg: #2a323d;
    --segment-active: #36414e;
    --topbar-bg: rgba(22, 27, 34, .88);
    --backdrop: rgba(0, 0, 0, .55);
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%239ba6b2' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 3px rgba(0, 0, 0, .45), 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lg: 0 12px 32px -8px rgba(0, 0, 0, .7);

    color-scheme: dark;
}
:root[data-theme="dark"] .rank-1 { background: #3a2c10; color: #fbbf4a; }
:root[data-theme="dark"] .rank-2 { background: #2a323d; color: #d6dde5; }
:root[data-theme="dark"] .rank-3 { background: #3a2418; color: #f5a676; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

h1, h2, h3 { color: var(--text); letter-spacing: -.01em; line-height: 1.3; }
h1 { font-size: 1.5rem; font-weight: 650; margin: 0; }
h2 { font-size: 1.05rem; font-weight: 600; margin: 0 0 .75rem; }
h3 { font-size: .95rem; font-weight: 600; margin: 0; }
p { margin: 0 0 .75rem; }

.icon { width: 18px; height: 18px; flex: none; }

/* Yardımcılar */
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ok-text { color: var(--success); font-weight: 600; }
.danger-text { color: var(--danger); font-weight: 600; }
.stack > * + * { margin-top: 1rem; }
.narrow { max-width: 640px; }
[hidden] { display: none !important; }

/* ==========================================================================
   Yerleşim: admin (yan menü)
   ========================================================================== */

.shell { min-height: 100vh; }

.sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 40;
    width: var(--sidebar-w);
    display: flex; flex-direction: column;
    background: var(--surface);
    border-right: 1px solid var(--border);
}
.sidebar-brand {
    display: flex; align-items: center; gap: .65rem;
    height: 64px; padding: 0 1.25rem;
    font-weight: 650; color: var(--text); letter-spacing: -.01em;
    border-bottom: 1px solid var(--border);
}
.sidebar-brand:hover { text-decoration: none; }
.logo { width: 30px; height: 30px; flex: none; display: block; object-fit: contain; }
.logo-link { display: block; width: fit-content; margin: 0 auto; }
.sidebar-brand span:last-child { line-height: 1.2; font-size: .95rem; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 1rem .75rem; display: flex; flex-direction: column; gap: 2px; }
.sidebar-label { padding: .75rem .75rem .35rem; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--subtle); }
.sidebar-nav a {
    display: flex; align-items: center; gap: .7rem;
    padding: .55rem .75rem; border-radius: var(--radius-sm);
    color: var(--text-2); font-weight: 500;
}
.sidebar-nav a .icon { color: var(--subtle); }
.sidebar-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.sidebar-nav a:hover .icon { color: var(--muted); }
.sidebar-nav a.active { background: var(--primary-soft); color: var(--primary); }
.sidebar-nav a.active .icon { color: var(--primary); }
.sidebar-nav a .count { margin-left: auto; }

.sidebar-foot { padding: .75rem; border-top: 1px solid var(--border); }

.user-chip { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.user-chip .avatar { flex: none; }
.user-chip-text { min-width: 0; flex: 1; line-height: 1.3; }
.user-chip-text strong { display: block; font-size: .875rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip-text span { display: block; font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip form { margin: 0; }

.avatar {
    width: 34px; height: 34px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--primary-soft); color: var(--primary);
    font-size: .8rem; font-weight: 650;
}
.avatar-lg { width: 48px; height: 48px; font-size: 1rem; }

.main { margin-left: var(--sidebar-w); min-width: 0; }
.main-inner { max-width: 1160px; margin: 0 auto; padding: 2rem 2.5rem 4rem; }

.mobile-bar { display: none; }
.sidebar-backdrop { display: none; }

@media (max-width: 960px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
    .shell.nav-open .sidebar { transform: none; }
    .shell.nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 30; background: var(--backdrop); }
    .main { margin-left: 0; }
    .main-inner { padding: 1.25rem 16px 3rem; }
    .mobile-bar {
        position: sticky; top: 0; z-index: 20;
        display: flex; align-items: center; gap: .5rem;
        height: 56px; padding: 0 .5rem;
        background: var(--surface); border-bottom: 1px solid var(--border);
    }
    .mobile-bar .sidebar-brand { border: 0; height: auto; padding: 0 .25rem; }
}

/* ==========================================================================
   Yerleşim: kullanıcı (üst menü)
   ========================================================================== */

.topbar { position: sticky; top: 0; z-index: 20; background: var(--topbar-bg); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1000px; margin: 0 auto; height: 64px; padding: 0 16px; display: flex; align-items: center; gap: 1.5rem; }
.topbar .sidebar-brand { border: 0; padding: 0; height: auto; }
.topnav { display: flex; gap: .25rem; margin-left: auto; }
.topnav a, .topnav button {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    color: var(--muted);
}
.topnav button { border: 0; background: transparent; padding: 0; cursor: pointer; }
.topnav a .icon, .topnav button .icon { width: 20px; height: 20px; }
.topnav a:hover, .topnav button:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.topnav button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-ring); }

/* Tema düğmesi: açık temada ay, karanlık temada güneş görünür. */
.theme-sun, [data-theme="dark"] .theme-moon { display: none; }
[data-theme="dark"] .theme-sun { display: block; }
.topnav a.active { color: var(--primary); background: var(--primary-soft); }

.container { max-width: 1000px; margin: 0 auto; padding: 2rem 16px 4rem; }

@media (max-width: 720px) {
    .topbar-inner { gap: .75rem; height: 56px; }
    .topbar .sidebar-brand span:last-child { display: none; }
    .container { padding: 1.25rem 16px 3rem; }
}

/* ==========================================================================
   Sayfa başlığı
   ========================================================================== */

.page-header {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.page-header > div:first-child { min-width: 0; }
.page-sub { margin: .3rem 0 0; color: var(--muted); }
.page-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.page-actions form { margin: 0; }

.breadcrumb { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin: 0 0 .5rem; font-size: .85rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .icon { width: 14px; height: 14px; color: var(--subtle); }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 2rem 0 .75rem; }
.section-title h2 { margin: 0; }

/* ==========================================================================
   Kart
   ========================================================================== */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}
.card + .card, .card + form, form + .card { margin-top: 1rem; }

.card-header {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap;
    margin: -1.5rem -1.5rem 1.25rem; padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.card-header h2 { margin: 0; }
.card-header .card-sub { margin: .15rem 0 0; font-size: .85rem; color: var(--muted); }
.card-header form { margin: 0; }
.card-header:last-child { margin-bottom: -1.5rem; border-bottom: 0; }

.card-footer {
    display: flex; align-items: center; justify-content: flex-end; gap: .5rem; flex-wrap: wrap;
    margin: 1.25rem -1.5rem -1.5rem; padding: .9rem 1.5rem;
    background: var(--surface-2); border-top: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
}
.card-footer > .muted:first-child { margin-right: auto; }
.card-footer form { margin: 0; }

.card-danger { border-color: var(--danger-border); }
.split-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.split-row h3 { margin-bottom: .2rem; }
.card-danger .split-row h3 { color: var(--danger); }
.title-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.card + .stats { margin-top: 1rem; }
.split-row p { margin: 0; }

/* Kart içi tablo kenarlara yaslanır */
.card > .table-wrap { margin-left: -1.5rem; margin-right: -1.5rem; }
.card > .table-wrap:last-child { margin-bottom: -1.5rem; }
.card > .table-wrap:first-child { margin-top: -1.5rem; }
.card-header + .table-wrap, .card-header + .list { margin-top: -1.25rem !important; }
.card > .table-wrap th:first-child,.card > .table-wrap td:first-child { padding-left: 1.5rem; }
.card > .table-wrap th:last-child, .card > .table-wrap td:last-child { padding-right: 1.5rem; }
.card > .table-wrap:last-child tbody tr:last-child td { border-bottom: 0; }
.card > .table-wrap:first-child thead th:first-child { border-top-left-radius: var(--radius); }
.card > .table-wrap:first-child thead th:last-child { border-top-right-radius: var(--radius); }

/* ==========================================================================
   Butonlar
   ========================================================================== */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    height: var(--control-h); padding: 0 1rem;
    border-radius: var(--radius-sm); border: 1px solid var(--primary);
    background: var(--primary); color: var(--on-primary);
    font: inherit; font-size: .9rem; font-weight: 550; line-height: 1;
    white-space: nowrap; cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn .icon { width: 16px; height: 16px; }
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); text-decoration: none; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--primary-ring); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-secondary, .btn-light { background: var(--surface); color: var(--text-2); border-color: var(--border-strong); }
.btn-secondary:hover, .btn-light:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }

.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; color: var(--text); }

.btn-danger { background: var(--danger); border-color: var(--danger); color: var(--on-danger); }
.btn-danger:hover { background: var(--danger-hover); border-color: var(--danger-hover); }
.btn-danger-soft { background: var(--surface); color: var(--danger); border-color: var(--border-strong); }
.btn-danger-soft:hover { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger); }

.btn-success { background: var(--success); border-color: var(--success); color: var(--on-success); }
.btn-success:hover { background: var(--success-hover); border-color: var(--success-hover); }

.btn-sm { height: 32px; padding: 0 .75rem; font-size: .85rem; }
.btn-lg { height: 46px; padding: 0 1.4rem; font-size: .95rem; }
.btn-block { display: flex; width: 100%; }

.icon-btn {
    width: 34px; height: 34px; display: inline-grid; place-items: center;
    border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn .icon { width: 17px; height: 17px; }
.icon-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.icon-btn.icon-danger:hover:not(:disabled) { background: var(--danger-soft); color: var(--danger); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.icon-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-ring); }

.btn-group { display: inline-flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.btn-group form { margin: 0; }

/* ==========================================================================
   Form
   ========================================================================== */

.field { margin-bottom: 1.15rem; }
label { display: block; font-weight: 550; font-size: .875rem; color: var(--text-2); margin-bottom: .4rem; }
.optional { color: var(--subtle); font-weight: 400; }

input[type=text], input[type=email], input[type=password], input[type=number], input[type=search],
input[type=date], input[type=datetime-local], input[type=time], select, textarea {
    display: block; width: 100%;
    height: var(--control-h); padding: 0 .8rem;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text);
    font: inherit; font-size: .925rem;
    box-shadow: var(--shadow-sm);
    transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: .65rem .8rem; resize: vertical; min-height: 5rem; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: var(--subtle); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
input:disabled { background: var(--surface-2); color: var(--muted); }
select {
    appearance: none; -webkit-appearance: none;
    padding-right: 2.25rem; cursor: pointer;
    background: var(--surface) var(--select-arrow) no-repeat right .85rem center;
}
input[type=checkbox] { width: 1rem; height: 1rem; accent-color: var(--primary); margin: 0; }

.checkbox { display: flex; align-items: center; gap: .55rem; font-weight: 400; color: var(--text-2); cursor: pointer; }
.password-input { position: relative; }
.password-input input { padding-right: 2.75rem; }
.password-toggle {
    position: absolute; top: 0; right: 0; height: var(--control-h); width: 2.6rem;
    display: flex; align-items: center; justify-content: center;
    background: none; border: 0; color: var(--muted); cursor: pointer;
}
.password-toggle:hover { color: var(--text); }
.password-toggle .icon-hide, .password-toggle.is-visible .icon-show { display: none; }
.password-toggle.is-visible .icon-hide { display: block; }
.error { color: var(--danger); font-size: .825rem; margin-top: .35rem; }
.field-error input, input.is-invalid { border-color: var(--danger); }
.hint { color: var(--muted); font-size: .825rem; margin: .4rem 0 0; }

.grid-2, .grid-3 { display: grid; gap: 0 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

.form-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: 1.5rem; }

.form-row { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; padding: 1.5rem 0; border-top: 1px solid var(--border); }
.form-row:first-of-type { border-top: 0; padding-top: 0; }
.form-row:has(+ .card-footer), .form-row:last-child { padding-bottom: 0; }
.form-row-label h3 { margin-bottom: .25rem; }
.form-row-label p { color: var(--muted); font-size: .85rem; margin: 0; }
.form-row .field:last-child { margin-bottom: 0; }
.field-sm { max-width: 220px; }
.field-md { max-width: 420px; }
.form-row > .segmented, .form-row > .checkbox { justify-self: start; }
.card-compact .form-row { align-items: center; padding: 1.15rem 0; }
.card-compact .form-row:first-of-type { padding-top: 0; }
.card-compact .form-row:has(+ .card-footer), .card-compact .form-row:last-child { padding-bottom: 0; }
@media (max-width: 720px) { .form-row { grid-template-columns: 1fr; gap: .75rem; } }

.search-input { position: relative; flex: 1 1 260px; max-width: 360px; }
.search-input .icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--subtle); pointer-events: none; }
.search-input input { padding-left: 2.25rem; }

.select-inline { width: auto; min-width: 12rem; }
.select-sm { height: 32px; font-size: .85rem; padding-left: .65rem; }
.input-row { display: flex; gap: .5rem; }
.input-row input { flex: 1; min-width: 0; }

.time-range { display: flex; align-items: center; gap: .75rem; }
.time-range input.days-input { width: 5rem; }
.time-range input { width: 8.5rem; text-align: center; font-variant-numeric: tabular-nums; }
.time-range-sep { color: var(--muted); }

/* ==========================================================================
   Araç çubuğu, sekmeler, rozetler
   ========================================================================== */

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar form { margin: 0; display: flex; gap: .5rem; flex: 1 1 auto; }
form.toolbar { margin: 0; flex: 1; justify-content: flex-start; flex-wrap: nowrap; }
form.toolbar .search-input { min-width: 0; }

.tabs { display: flex; gap: 1.5rem; box-shadow: inset 0 -1px 0 var(--border); margin-bottom: 1.25rem; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .7rem 0;
    color: var(--muted); font-weight: 500; white-space: nowrap;
    border-bottom: 2px solid transparent;
}
.card + .tabs { margin-top: 1.5rem; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }
.tabs a.active .count { background: var(--primary-soft); color: var(--primary); }

.badge {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .15rem .55rem; border-radius: 999px;
    font-size: .75rem; font-weight: 550; line-height: 1.4; white-space: nowrap;
    background: var(--chip-bg); color: var(--chip-text); border: 1px solid var(--chip-border);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge-plain::before { display: none; }
.badge-success { background: var(--success-soft); color: var(--success); border-color: var(--success-border); }
.badge-warning { background: var(--warning-soft); color: var(--warning); border-color: var(--warning-border); }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }
.badge-info { background: var(--info-soft); color: var(--info); border-color: var(--info-border); }
.badge-primary { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-border); }

.count {
    display: inline-grid; place-items: center;
    min-width: 1.35rem; height: 1.35rem; padding: 0 .4rem; border-radius: 999px;
    font-size: .72rem; font-weight: 600; font-variant-numeric: tabular-nums;
    background: var(--chip-bg); color: var(--muted);
}
.count-warning { background: var(--count-warning-bg); color: var(--warning); }
.tabs a.active .count-warning { background: var(--count-warning-bg); color: var(--warning); }

.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--chip-bg); border-radius: var(--radius-sm); }
.segmented form { margin: 0; }
.segmented button, .segmented a {
    height: 30px; padding: 0 .8rem; border: 0; border-radius: 6px;
    background: transparent; color: var(--muted);
    font: inherit; font-size: .825rem; font-weight: 550; cursor: pointer;
}
.segmented button, .segmented a { display: inline-flex; align-items: center; gap: .4rem; }
.segmented a:hover { text-decoration: none; }
.team-switch { margin-bottom: 1rem; }
.segmented button .icon { width: 15px; height: 15px; }
.segmented button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-ring); }
.segmented button:hover, .segmented a:hover { color: var(--text); }
.segmented button.active, .segmented a.active { background: var(--segment-active); color: var(--text); box-shadow: var(--shadow); }

/* ==========================================================================
   Tablo
   ========================================================================== */

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: left; padding: .8rem .75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
thead th {
    background: var(--surface-2);
    font-size: .75rem; font-weight: 600; color: var(--muted); letter-spacing: .03em; text-transform: uppercase;
    padding-top: .6rem; padding-bottom: .6rem;
}
tbody tr { transition: background .1s; }
tbody tr:hover { background: var(--row-hover); }
td.actions { white-space: nowrap; text-align: right; }
td.actions form { display: inline; }
td.actions .btn-group { justify-content: flex-end; }
.cell-title { font-weight: 600; color: var(--text); }
a.cell-title:hover { color: var(--primary); }
.cell-sub { display: block; font-size: .825rem; color: var(--muted); margin-top: .1rem; }
tr.inactive td { opacity: .55; }
.cell-label { display: none; color: var(--muted); }

table.fixed-cols { table-layout: fixed; }
table.fixed-cols td { overflow-wrap: anywhere; }

.person { display: flex; align-items: center; gap: .7rem; }
.person .avatar { width: 32px; height: 32px; font-size: .75rem; }
.person .avatar-lg { width: 46px; height: 46px; font-size: .95rem; }
.person-text { min-width: 0; }
.person-text .cell-sub { overflow-wrap: anywhere; }
.person-line { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }

@media (max-width: 720px) {
    table.fixed-cols { table-layout: auto; }
    table.responsive thead { display: none; }
    table.responsive tr { display: block; padding: .85rem 1.25rem; border-bottom: 1px solid var(--border); }
    table.responsive td { display: block; border: 0; padding: .15rem 0 !important; }
    table.responsive td.actions { text-align: left; white-space: normal; padding-top: .6rem !important; }
    table.responsive td.actions .btn-group { justify-content: flex-start; }
    .card > .table-wrap:last-child table.responsive tbody tr:last-child { border-bottom: 0; }
    .cell-label { display: inline; }
    /* Puan/sonuç sütunu satırın sağında durur */
    table.side-score tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1rem; align-items: center; }
    table.side-score td { grid-column: 1; }
    table.side-score td.cell-side { grid-column: 2; grid-row: 1 / span 3; text-align: right; }
    table.side-score td.actions { grid-column: 1 / -1; }
}

/* ==========================================================================
   Uyarılar, boş durum, sayfalama
   ========================================================================== */

.alert {
    display: flex; gap: .65rem; align-items: flex-start;
    padding: .8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem;
    border: 1px solid; font-size: .9rem;
}
.alert .icon { margin-top: 1px; }
.card + .alert { margin-top: 1rem; }
.alert-success { background: var(--success-soft); color: var(--success); border-color: var(--success-border); }
.alert-error { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }
.alert-info { background: var(--info-soft); color: var(--info); border-color: var(--info-border); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: var(--warning-border); }

/* Bildirimler: sayfanın üstünde yüzer, birkaç saniye sonra kaybolur. */
.toasts {
    position: fixed; top: 1rem; right: 1rem; z-index: 100;
    display: grid; gap: .5rem; width: min(380px, calc(100vw - 2rem));
}
.toast {
    margin: 0; box-shadow: 0 8px 24px rgba(16, 24, 40, .12); align-items: center;
    animation: toast-in .25s ease-out; transition: opacity .3s, transform .3s;
}
.toast > div { flex: 1; }
.toast-hide { opacity: 0; transform: translateY(-8px); }
.toast-close {
    border: 0; background: none; color: inherit; cursor: pointer;
    font-size: 1.2rem; line-height: 1; padding: 0 .15rem; opacity: .6;
}
.toast-close:hover { opacity: 1; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty-icon {
    width: 44px; height: 44px; margin: 0 auto .85rem; border-radius: 50%;
    display: grid; place-items: center; background: var(--chip-bg); color: var(--muted);
}
.empty-icon .icon { width: 20px; height: 20px; }
.empty h3 { color: var(--text); margin-bottom: .25rem; }
.empty p { margin: 0 auto; max-width: 420px; font-size: .9rem; }
.empty .btn { margin-top: 1.1rem; }

.pagination { margin-top: 1rem; }
.pagination nav ul, ul.pagination { display: flex; gap: .5rem; justify-content: flex-end; list-style: none; margin: 0; padding: 0; }
.pagination li > a, .pagination li > span {
    display: inline-flex; align-items: center; height: 32px; padding: 0 .8rem;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text-2); font-size: .85rem; font-weight: 500;
}
.pagination li > a:hover { background: var(--surface-2); text-decoration: none; }
.pagination li.disabled > span { color: var(--subtle); background: var(--surface-2); }
.card > .pagination { margin: 0 -1.5rem -1.5rem; padding: .75rem 1.5rem; border-top: 1px solid var(--border); }

/* ==========================================================================
   İstatistik ve bilgi listeleri
   ========================================================================== */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stats > .card { margin: 0; }
@media (max-width: 720px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
    .stat { padding: 1rem; }
    .stat .value { font-size: 1.5rem; }
}
.stat { padding: 1.15rem 1.25rem; }
.stat .label { color: var(--muted); font-size: .825rem; font-weight: 500; }
.stat .value { margin-top: .35rem; font-size: 1.75rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: .9rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem 1.5rem; margin: 0; }
.facts dt { color: var(--muted); font-size: .8rem; font-weight: 500; margin-bottom: .15rem; }
.facts dd { margin: 0; font-weight: 550; color: var(--text); }

.rank {
    display: inline-grid; place-items: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--chip-bg); color: var(--text-2); font-size: .8rem; font-weight: 650; font-variant-numeric: tabular-nums;
}
.rank-1 { background: #fef0c7; color: #93370d; }
.rank-2 { background: #eaecf0; color: #344054; }
.rank-3 { background: #fbe5d6; color: #8a3a12; }

.meter { height: 6px; background: var(--meter-bg); border-radius: 999px; overflow: hidden; min-width: 80px; margin-bottom: .3rem; }
.meter-bar { height: 100%; background: var(--primary); border-radius: 999px; }
.meter-bar.low { background: var(--danger); }
.meter-cell { display: flex; align-items: center; gap: .65rem; }
.meter-cell .meter { flex: 1; margin: 0; max-width: 180px; }
.card-note {
    margin: 0 -1.5rem -1.5rem; padding: .85rem 1.5rem;
    background: var(--surface-2); border-top: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
}
.card-note.inline-icon { display: flex; }
.section-intro { margin-bottom: 1rem; }
.tab-panel > details.card + details.card { margin-top: .75rem; }

details.card { padding: 0; }
details.card summary {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
    padding: 1rem 1.5rem; cursor: pointer; list-style: none;
}
details.card summary::-webkit-details-marker { display: none; }
details.card summary::before {
    content: ""; width: 7px; height: 7px; flex: none; margin-right: .25rem;
    border-right: 2px solid var(--subtle); border-bottom: 2px solid var(--subtle);
    transform: rotate(-45deg); transition: transform .15s;
}
details.card[open] summary::before { transform: rotate(45deg); }
details.card[open] summary { border-bottom: 1px solid var(--border); }
details.card .question-stats td { padding-left: 1.5rem; padding-right: 1.5rem; }
details.card .question-stats tr:last-child td { border-bottom: 0; }
.question-stats td { vertical-align: top; }
.question-stats .q-no { width: 3rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.question-stats .q-meter { width: 240px; }
@media (max-width: 720px) {
    .question-stats tr { display: block; padding: .75rem 1.25rem; border-bottom: 1px solid var(--border); }
    .question-stats td { display: block; border: 0; padding: .1rem 0 !important; width: auto !important; }
}

/* Satır menüsü (Yetki ▾ gibi): tıklayınca açılır */
.row-menu { position: relative; }
.row-menu summary { list-style: none; cursor: pointer; }
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu summary .icon { width: 12px; height: 12px; opacity: .7; }
.row-menu summary:hover, .row-menu[open] summary { border-color: var(--primary); }
.row-menu-menu {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 15rem; padding: .35rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
}
.row-menu-menu p { margin: 0; padding: .35rem .6rem .45rem; font-size: .75rem; color: var(--muted); white-space: normal; }
.row-menu-menu button {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem; width: 100%;
    padding: .45rem .6rem; border: 0; border-radius: 6px; background: none; color: var(--text);
    font: inherit; font-size: .85rem; text-align: left; cursor: pointer;
}
.row-menu-menu button:hover:not(:disabled) { background: var(--primary-soft); color: var(--primary); }
.row-menu-menu button:disabled { cursor: default; color: var(--primary); font-weight: 600; }
.row-menu-menu button .icon { width: 14px; height: 14px; }
.row-menu-menu hr { margin: .35rem 0; border: 0; border-top: 1px solid var(--border); }
.row-menu-menu button.danger { color: var(--danger); justify-content: flex-start; }
.row-menu-menu button.danger:hover { background: var(--danger-soft); color: var(--danger); }
.row-menu summary.btn .icon { width: 14px; height: 14px; }
/* Satır menüsü tablonun dışına taşabilsin (kaydırma kutusu kesmesin) */
.table-wrap-menu { overflow: visible; }

/* ==========================================================================
   Giriş / kayıt sayfaları
   ========================================================================== */

.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 16px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-title { text-align: center; margin-bottom: 1.75rem; }
.auth-title .logo { width: 44px; height: 44px; margin: 0 auto 1rem; }
.auth-title .brand-name { display: block; font-size: .85rem; font-weight: 550; color: var(--muted); margin-bottom: .35rem; }
.auth-title h1 { font-size: 1.4rem; }
.auth-box .card { padding: 1.75rem; box-shadow: var(--shadow); }
.auth-box .btn-block { margin-top: .5rem; height: 42px; }
.auth-links { text-align: center; margin-top: 1.25rem; font-size: .9rem; color: var(--muted); display: grid; gap: .35rem; }
.auth-links a { font-weight: 550; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; }
.field-head a { font-size: .825rem; font-weight: 500; }
.auth-success { text-align: center; }
.auth-success .empty-icon { background: var(--success-soft); color: var(--success); }
.link-button { background: none; border: 0; padding: 0; font: inherit; font-weight: 550; color: var(--primary); cursor: pointer; }
.link-button:hover { text-decoration: underline; }

/* ==========================================================================
   Pencere (dialog)
   ========================================================================== */
.modal {
    width: min(520px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem);
    padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface); color: var(--text); box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
}
.modal::backdrop { background: rgba(0, 0, 0, .5); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.modal-head h2 { margin: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* Aç/kapa anahtarı: <label class="switch"><input type="checkbox"></label> */
.switch { display: inline-flex; cursor: pointer; margin: 0; }
.switch input {
    appearance: none; -webkit-appearance: none; margin: 0; cursor: pointer;
    width: 40px; height: 22px; border-radius: 999px; position: relative;
    background: var(--border); transition: background .15s;
}
.switch input::after {
    content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
    border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s;
}
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-ring); }

/* Bildirimler: hatırlatma kartları */
.reminder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.reminder { display: flex; flex-direction: column; }
.reminder-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.reminder-head h3 { margin: 0 0 .15rem; }
.reminder-message { margin: 1rem 0; color: var(--text-2); white-space: pre-line; }
.reminder-meta { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: .35rem; color: var(--muted); font-size: .825rem; }
.reminder-meta li { display: flex; align-items: center; gap: .45rem; }
.reminder-meta .icon { width: 14px; height: 14px; flex: none; }
.reminder-off h3, .reminder-off .reminder-message { opacity: .55; }
.reminder .card-footer { margin-top: 1.25rem; }
.reminder .card-footer form { margin-right: auto; }

/* ==========================================================================
   Medresem: ilerleme halkası, görev listesi, bildirimler
   ========================================================================== */
.ring { position: relative; flex: none; display: grid; place-items: center; }
.ring-lg { width: 132px; height: 132px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 11; }
.ring-track { stroke: var(--meter-bg); }
.ring-bar { stroke: var(--primary); stroke-linecap: round; stroke-dasharray: calc(var(--p) * 1) 100; transition: stroke-dasharray .5s ease; }
.ring[style*="--p: 0"] .ring-bar, .ring[style*="--p:0"] .ring-bar { stroke-linecap: butt; }
.ring-value { position: absolute; font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--text); }
.ring-value small { font-size: .95rem; font-weight: 600; color: var(--muted); margin-left: 1px; }

.progress-hero { display: flex; align-items: center; gap: 1.75rem; padding: 1.5rem 1.75rem; margin-bottom: 1.75rem;
    background: linear-gradient(135deg, var(--primary-soft), var(--surface) 70%); border-color: var(--primary-border); }
.progress-hero-text h1 { margin: .15rem 0 .35rem; }
.progress-hero-text p { margin: 0; }
.progress-hero-text p + p { margin-top: .2rem; }
.progress-kicker { font-size: .75rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); }
@media (max-width: 560px) {
    .progress-hero { padding: 1.25rem; }
}

.level + .level { margin-top: 2rem; }
.level .section-title { justify-content: space-between; }
.level .section-title h2 { display: flex; align-items: center; gap: .5rem; }

.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.task { display: flex; gap: 1rem; padding: 1.1rem 1.25rem; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: border-color .2s, background .2s; scroll-margin-top: 80px; }
.task-check-form { margin: 0; }
.task-check { width: 30px; height: 30px; flex: none; display: grid; place-items: center; margin-top: .05rem; padding: 0;
    border: 2px solid var(--border-strong); border-radius: 50%; background: var(--surface); color: transparent; cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .15s; }
.task-check .icon { width: 16px; height: 16px; stroke-width: 3; }
.task-check:hover { border-color: var(--primary); color: var(--primary); }
.task-check:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--primary-ring); }
.task-check:disabled { opacity: .6; cursor: wait; }
.task-body { min-width: 0; flex: 1; }
.task-title { margin: 0; font-size: 1.15rem; line-height: 1.4; }
.task-desc { margin: .45rem 0 0; color: var(--text-2); font-size: 1.05rem; line-height: 1.6; }
.task-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.task-links .btn { max-width: 100%; }
.task-done-at { display: flex; align-items: center; gap: .3rem; margin: .6rem 0 0; color: var(--success); font-weight: 550; }
.task-done-at[hidden] { display: none; }
.task-done-at .icon { width: 14px; height: 14px; }
.task.is-done { border-color: var(--primary-border); background: var(--primary-soft); }
.task.is-done .task-check { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.task.is-done .task-title { color: var(--text-2); }
.task.just-done .task-check { animation: pop .3s ease; }
@keyframes pop { 50% { transform: scale(1.18); } }
@media (max-width: 560px) {
    .task { padding: 1rem; gap: .85rem; }
}

.person-link { color: inherit; text-decoration: none; }
.person-link:hover .cell-title { color: var(--primary); }

.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; align-items: center; gap: .75rem; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.check-list li:last-child { border-bottom: 0; }
.check-mark { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--border-strong); }
.check-mark .icon { width: 13px; height: 13px; stroke-width: 3; }
.check-list li.is-done .check-mark { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.check-title { flex: 1; min-width: 0; }
.check-list li:not(.is-done) .check-title { color: var(--muted); }

.order-cell { width: 1%; }
.order-btns { display: flex; gap: .15rem; margin: 0; }
.order-btns .icon-btn:disabled { opacity: .3; cursor: default; }

.link-rows { display: grid; gap: .5rem; margin-bottom: .6rem; }
.link-rows:empty { display: none; }
.link-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: .5rem; align-items: center; }
@media (max-width: 560px) {
    .link-row { grid-template-columns: minmax(0, 1fr) auto; }
    .link-row input[type=url] { grid-column: 1; grid-row: 2; }
    .link-row button { grid-row: 1 / span 2; grid-column: 2; }
}

.bell-link { position: relative; }
.bell-dot { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
    background: var(--primary); color: var(--on-primary); font-size: .65rem; font-weight: 700; line-height: 17px; text-align: center; }

.notice-list { list-style: none; margin: 0; padding: 0; }
.notice { display: flex; align-items: flex-start; gap: .85rem; padding: .9rem 0; border-bottom: 1px solid var(--border); }
.notice:last-child { border-bottom: 0; }
.notice-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--chip-bg); color: var(--muted); }
.notice-icon .icon { width: 16px; height: 16px; }
.notice.is-unread .notice-icon { background: var(--primary-soft); color: var(--primary); }
.notice-body { flex: 1; min-width: 0; }
.notice-body p { margin: .2rem 0 .25rem; color: var(--text-2); font-size: .9rem; }

/* ==========================================================================
   Admin: görev listesi ve büyük düzenleme penceresi
   ========================================================================== */
.card-flush { padding: 0; overflow: hidden; }
.card-pad { padding: 1.25rem 1.5rem; margin: 0; }

.admin-task-list { list-style: none; margin: 0; padding: 0; }
.admin-task { display: flex; align-items: flex-start; gap: .75rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); scroll-margin-top: 80px; }
.admin-task:last-child { border-bottom: 0; }
.admin-task:hover { background: var(--surface-2); }
.admin-task .order-btns { flex-direction: column; margin-top: -.15rem; }
.admin-task > .icon-btn { flex: none; }
.admin-task-body { flex: 1; min-width: 0; display: block; color: inherit; text-decoration: none; cursor: pointer; }
.admin-task-body:hover { text-decoration: none; }
.admin-task-body:hover .admin-task-title { color: var(--primary); }
.admin-task-title { display: block; font-size: 1.05rem; font-weight: 600; line-height: 1.4; color: var(--text); }
.admin-task-desc {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
    margin-top: .3rem; font-size: .95rem; line-height: 1.55; color: var(--text-2); white-space: pre-line;
}
.admin-task-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; margin-top: .45rem; font-size: .825rem; color: var(--muted); }
.admin-task.inactive .admin-task-title, .admin-task.inactive .admin-task-desc { opacity: .55; }

.modal-lg { width: min(860px, calc(100vw - 2rem)); padding: 0; display: none; }
.modal-lg[open] { display: flex; flex-direction: column; }
.modal-lg .modal-head { margin: 0; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); }
.modal-lg .modal-head .badge { margin-top: .4rem; }
.modal-lg .modal-form { flex: 1; overflow-y: auto; padding: 0 1.5rem; }
.modal-lg .modal-actions { margin: 0; padding: .9rem 1.5rem; background: var(--surface-2); border-top: 1px solid var(--border); }
.modal-lg textarea { min-height: 12rem; }
.modal-lg .form-row { grid-template-columns: 1fr; gap: .75rem; padding: 1.25rem 0; }
.modal-lg .form-row:first-of-type { padding-top: 1.25rem; }
.modal-lg .form-row:last-child { padding-bottom: 1.25rem; }
.modal-lg .form-row-label { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.modal-lg .form-row-label h3 { margin: 0; }
.modal-lg .field-md { max-width: none; }
.footer-start { display: flex; gap: .5rem; margin-right: auto; flex-wrap: wrap; }
@media (max-width: 560px) {
    .modal-lg .modal-actions { justify-content: stretch; }
    .footer-start { width: 100%; }
}

/* Bildirim gönder penceresi (Bildirimler sayfası, admin) */
.modal .field:last-child { margin-bottom: 0; }

/* Araç çubuğu: arama ve sıralama yan yana */
.toolbar-inline { justify-content: flex-start; flex-wrap: nowrap; margin-bottom: 0; }
.toolbar-inline .search-input { flex: 1 1 auto; min-width: 0; }
.toolbar-inline form { flex: none; }
.toolbar-inline .select-inline { min-width: 0; }

/* ==========================================================================
   Kullanıcı paneli: doğrusal ilerleme çubuğu ve seviye sayıları
   ========================================================================== */
.progress-hero-text { flex: 1; min-width: 0; }
.progress-line { display: flex; align-items: center; gap: .9rem; margin: 1rem 0 .5rem; }
.progress-track { flex: 1; height: 14px; background: var(--meter-bg); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: calc(var(--p) * 1%); background: var(--primary); border-radius: 999px; transition: width .5s ease; }
.progress-percent { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1; }
.progress-percent small { font-size: .9rem; font-weight: 600; color: var(--muted); margin-left: 1px; }
.level-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(78px, 1fr)); gap: .5rem; margin-top: 1rem; }
.level-stat { padding: .6rem .85rem; border: 1px solid var(--border); border-radius: calc(var(--radius) - 2px); background: var(--surface); }
.level-stat-name { display: block; font-size: .8rem; font-weight: 550; color: var(--muted); }
.level-stat-value { display: block; margin-top: .1rem; font-size: 1.2rem; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--text); }
.level-stat-value small { font-size: .85rem; font-weight: 500; color: var(--muted); }
.level-stat.is-complete { border-color: var(--primary-border); }
.level-stat.is-complete .level-stat-value { color: var(--primary); }
