/* Türk Dünyası Gençlik Platformu — Yönetim Paneli
   Single light theme matching the foundation website (Jost, navy / turquoise / copper). */

/* ---- Fonts (variable Jost, same subsets as the website) ---- */
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/jost-latin-ext.woff2") format("woff2");
  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: "Jost";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/jost-latin.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+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #0a1b3f;
  --navy-deep: #06112a;
  --navy-2: #123f86;
  --turq: #19bfd3;
  --turq-dark: #0b8fa1;
  --turq-soft: #e3f6f9;
  --copper: #d2954a;
  --copper-soft: #fbf1e4;
  --sky: #1a55ad;
  --sky-soft: #e8effb;
  --bg: #f4f7fb;
  --card: #ffffff;
  --border: #dbe3ee;
  --border-strong: #c3cfdf;
  --text: #0e1b33;
  --muted: #55627a;
  --danger: #b42318;
  --danger-soft: #fdecec;
  --success: #0f7a4f;
  --success-soft: #e4f5ec;
  --warning: #9a5b0b;
  --warning-soft: #fdf3e2;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(10, 27, 63, .05), 0 6px 20px rgba(10, 27, 63, .06);
  --shadow-lg: 0 24px 60px rgba(6, 17, 42, .28);
  --focus: 0 0 0 3px rgba(25, 191, 211, .45);
  --sidebar-w: 264px;
  color-scheme: light;
}

*, *::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 "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 .6em; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---- Boot / login ---- */
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); }
.login {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(25, 191, 211, .18), transparent 60%), linear-gradient(160deg, var(--navy), var(--navy-deep));
}
.login-card {
  width: 100%; max-width: 420px; background: #fff; border-radius: var(--radius-lg);
  padding: 34px 30px 28px; box-shadow: var(--shadow-lg); text-align: center;
}
.login-card img { width: 88px; height: 88px; margin: 0 auto 10px; }
.login-card .kicker { color: var(--turq-dark); font-weight: 600; letter-spacing: .12em; font-size: 12px; text-transform: uppercase; }
.login-card h1 { font-size: 24px; margin: 4px 0 4px; }
.login-card p.lead { color: var(--muted); margin-bottom: 22px; }
.login-card form { text-align: left; display: grid; gap: 14px; }
.login-card .btn { width: 100%; justify-content: center; margin-top: 4px; }
.login-error { background: var(--danger-soft); color: var(--danger); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; }
.login-foot { margin-top: 18px; color: var(--muted); font-size: 13px; }

/* ---- Layout ---- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--navy), var(--navy-deep)); color: #dfe8f6;
  display: flex; flex-direction: column; padding: 20px 14px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; color: #fff; }
.brand img { width: 46px; height: 46px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-weight: 600; letter-spacing: .08em; font-size: 14px; }
.brand-text span { font-weight: 400; letter-spacing: .14em; font-size: 11px; color: var(--turq); }
.nav { display: grid; gap: 2px; }
.nav-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #7f93b8; padding: 16px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: #cbd7ea; font-weight: 500; text-decoration: none; transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: rgba(25, 191, 211, .16); color: #fff; box-shadow: inset 3px 0 0 var(--turq); }
.nav a .ico { color: var(--turq); }
.nav a .count { margin-left: auto; background: var(--copper); color: var(--navy); font-size: 12px; font-weight: 600; border-radius: 999px; padding: 0 8px; }
.sidebar-foot { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.me { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.me-name { color: #fff; font-weight: 500; line-height: 1.2; }
.me-role { font-size: 12px; color: var(--turq); }
.sidebar .btn-ghost { color: #cbd7ea; border-color: rgba(255, 255, 255, .16); width: 100%; justify-content: center; }
.sidebar .btn-ghost:hover { background: rgba(255, 255, 255, .06); }

.topbar { display: none; }
.main { flex: 1; min-width: 0; padding: 28px 32px 48px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 28px; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.crumb { font-size: 14px; color: var(--muted); margin-bottom: 6px; display: inline-flex; gap: 6px; align-items: center; }

.ico { width: 20px; height: 20px; display: inline-flex; flex-shrink: 0; }
.ico svg { width: 100%; height: 100%; }

/* ---- Cards & grid ---- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 22px; min-width: 0; }
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { font-size: 18px; }
.card-head .hint { color: var(--muted); font-size: 13px; }
.card.flush { padding: 0; }
.card.flush > .card-head { padding: 18px 22px 0; }
.grid { display: grid; gap: 18px; }
.grid > .card + .card { margin-top: 0; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.span-2 { grid-column: span 2; }
.stack { display: grid; gap: 18px; }
.section-gap { margin-top: 18px; }

/* ---- KPI tiles ---- */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent, var(--turq)); }
.kpi .label { color: var(--muted); font-size: 13px; }
.kpi .value { font-size: 28px; font-weight: 600; line-height: 1.15; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.highlight { background: linear-gradient(140deg, var(--navy), var(--navy-2)); border-color: transparent; color: #fff; }
.kpi.highlight .label, .kpi.highlight .meta { color: #b9c8e2; }
a.kpi { color: inherit; text-decoration: none; }
a.kpi:hover { border-color: var(--turq); }

.chart-box { position: relative; height: 260px; }
.chart-box.tall { height: 320px; }
.chart-box.short { height: 220px; }
.legend-note { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 10px; }
.legend-note i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; font-size: 14px;
  border-radius: 999px; padding: 9px 18px; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  background: var(--turq); color: var(--navy); transition: filter .15s, background .15s, border-color .15s; text-decoration: none; line-height: 1.3;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; filter: none; }
.btn .ico { width: 18px; height: 18px; }
.btn-secondary { background: var(--navy); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: #eef3f9; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: #efc4c0; }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.btn-copper { background: var(--copper); color: var(--navy); }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-icon { padding: 7px; border-radius: 999px; background: transparent; border-color: var(--border); color: var(--text); }
.btn-icon:hover { background: #eef3f9; }
.btn.loading { pointer-events: none; opacity: .7; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---- Forms ---- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > label, .field > .label { font-size: 13px; font-weight: 600; color: #26344f; }
.field .req { color: var(--danger); }
.field .hint { font-size: 12px; color: var(--muted); }
.field-error { font-size: 12px; color: var(--danger); }
.invalid { border-color: var(--danger) !important; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=date],
input[type=datetime-local], input[type=url], select, textarea {
  font: inherit; font-size: 15px; color: var(--text); width: 100%; min-width: 0;
  border: 1px solid var(--border-strong); border-radius: 12px; padding: 9px 12px; background: #fff;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--turq); box-shadow: var(--focus); }
select { appearance: none; padding-right: 34px; background: #fff 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 1l5 5 5-5' fill='none' stroke='%2355627a' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center; }
input[type=color] { width: 56px; height: 40px; padding: 2px; border: 1px solid var(--border-strong); border-radius: 10px; background: #fff; }
input[type=file] { font: inherit; font-size: 14px; max-width: 100%; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--turq-dark); margin: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.counter { font-size: 12px; color: var(--muted); text-align: right; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px 16px; margin: 0; min-width: 0; }
legend { font-weight: 600; padding: 0 6px; font-size: 14px; }
.form-section { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 18px; }
.form-section > h3 { font-size: 16px; margin-bottom: 4px; }
.form-section > p.hint { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.radio-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-card { border: 1px solid var(--border-strong); border-radius: 14px; padding: 10px 14px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; flex: 1 1 200px; }
.radio-card input { margin-top: 3px; accent-color: var(--turq-dark); }
.radio-card:has(input:checked) { border-color: var(--turq); background: var(--turq-soft); }
.radio-card b { display: block; font-size: 14px; }
.radio-card small { color: var(--muted); }

/* ---- Toolbar / filters ---- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.toolbar .field { flex: 1 1 160px; }
.toolbar .field.grow { flex: 2 1 240px; }
.seg { display: inline-flex; background: #e9eff7; border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { font: inherit; font-size: 13px; font-weight: 500; border: 0; background: transparent; color: var(--muted); padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed=true] { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(10, 27, 63, .12); }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid #e8eef6; vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: #f8fafd; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover, tbody tr.selected { background: #f3f9fc; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.nowrap { white-space: nowrap; }
td .sub { color: var(--muted); font-size: 12px; }
.card.flush .table-wrap { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card.flush table th:first-child, .card.flush table td:first-child { padding-left: 22px; }
.who { display: flex; gap: 10px; align-items: center; min-width: 180px; }
.who b { font-weight: 600; display: block; line-height: 1.25; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
pre.json { margin: 0; font-size: 12px; background: #f4f7fb; border-radius: 10px; padding: 8px 10px; max-width: 460px; overflow: auto; white-space: pre-wrap; word-break: break-word; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid #e8eef6; flex-wrap: wrap; font-size: 14px; color: var(--muted); }

.empty { text-align: center; color: var(--muted); padding: 36px 16px; }
.empty .ico { width: 36px; height: 36px; margin: 0 auto 8px; color: #9fb0c8; }
.loading-box { padding: 40px; text-align: center; color: var(--muted); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #d5e0ee; border-top-color: var(--turq); animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Badges, avatars, chips ---- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #edf1f7; color: var(--muted); }
.role-uye { background: #edf1f7; color: #3e4a61; }
.role-temsilci { background: var(--turq-soft); color: #08707e; }
.role-genel_merkez { background: var(--sky-soft); color: var(--sky); }
.role-genel_baskan { background: var(--copper-soft); color: #8a5517; }
.st-active, .st-approved, .st-published, .st-ok { background: var(--success-soft); color: var(--success); }
.st-suspended, .st-rejected, .st-cancelled, .st-revoked { background: var(--danger-soft); color: var(--danger); }
.st-pending, .st-draft { background: var(--warning-soft); color: var(--warning); }
.st-waitlist { background: var(--sky-soft); color: var(--sky); }
.avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; background: var(--turq-soft); color: var(--turq-dark); display: grid; place-items: center; font-weight: 600; font-size: 14px; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--turq-soft); color: #08707e; border-radius: 999px; padding: 3px 4px 3px 12px; font-size: 13px; font-weight: 500; }
.chip.static { padding-right: 12px; }
.chip button { border: 0; background: transparent; color: inherit; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; padding: 0; font-size: 16px; line-height: 1; }
.chip button:hover { background: rgba(11, 143, 161, .15); }
.swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; vertical-align: -2px; border: 1px solid rgba(0, 0, 0, .08); }

/* ---- Picker (autocomplete) ---- */
.picker { position: relative; display: grid; gap: 8px; }
.picker-results {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-lg); max-height: 280px; overflow-y: auto; padding: 4px; list-style: none; margin: 0;
}
.picker-results li button { width: 100%; text-align: left; border: 0; background: transparent; font: inherit; font-size: 14px; padding: 8px 10px; border-radius: 10px; cursor: pointer; color: var(--text); display: block; }
.picker-results li button:hover, .picker-results li button:focus-visible, .picker-results li button.active { background: var(--turq-soft); box-shadow: none; }
.picker-results li small { display: block; color: var(--muted); font-size: 12px; }
.picker-results .none { padding: 10px; color: var(--muted); font-size: 14px; }
.picker .input-wrap { position: relative; }

/* ---- Notices ---- */
.notice { display: flex; gap: 12px; align-items: flex-start; border-radius: var(--radius); padding: 12px 16px; background: var(--sky-soft); color: #19417f; font-size: 14px; margin-bottom: 16px; }
.notice.warn { background: var(--warning-soft); color: var(--warning); }
.notice.ok { background: var(--success-soft); color: var(--success); }
.notice .ico { margin-top: 1px; }
.recipient-count { display: inline-flex; align-items: center; gap: 8px; background: var(--navy); color: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 14px; }
.recipient-count b { color: var(--turq); font-size: 16px; }

/* ---- Definition lists (detail) ---- */
dl.props { display: grid; grid-template-columns: minmax(120px, 160px) 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
dl.props dt { color: var(--muted); }
dl.props dd { margin: 0; word-break: break-word; }
.detail-section + .detail-section { margin-top: 22px; }
.detail-section h3 { font-size: 15px; margin-bottom: 10px; color: var(--navy-2); }
.profile-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.profile-head h2 { font-size: 22px; }
.list-plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.list-plain li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #eef2f8; align-items: center; font-size: 14px; }
.list-plain li:last-child { border-bottom: 0; }
.list-plain .meta { color: var(--muted); font-size: 12px; }

/* ---- Modal / drawer ---- */
.backdrop { position: fixed; inset: 0; background: rgba(6, 17, 42, .55); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .15s ease-out; }
.modal { background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 560px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.modal.wide { max-width: 860px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.backdrop.drawer { place-items: stretch end; padding: 0; }
.backdrop.drawer .modal { max-width: 640px; height: 100vh; max-height: 100vh; border-radius: var(--radius-lg) 0 0 var(--radius-lg); animation: slide .2s ease-out; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: .5; } }

/* ---- Toasts ---- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: grid; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--navy); color: #fff; border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow-lg); font-size: 14px; display: flex; gap: 10px; align-items: flex-start; animation: fade .2s; }
.toast.error { background: #7d1a12; }
.toast.success { border-left: 4px solid var(--turq); }

/* ---- Events ---- */
.event-thumb { width: 64px; height: 44px; border-radius: 8px; object-fit: cover; background: #e6edf6; flex-shrink: 0; }
.event-hero { display: grid; grid-template-columns: 280px 1fr; gap: 22px; }
.event-hero img, .event-hero .ph { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); background: linear-gradient(140deg, var(--navy), var(--navy-2)); }
.stat-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.image-drop { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.image-drop .preview { width: 220px; aspect-ratio: 16 / 10; border-radius: 14px; background: #eef3f9 center / cover no-repeat; border: 1px dashed var(--border-strong); display: grid; place-items: center; color: var(--muted); font-size: 13px; overflow: hidden; }
.image-drop .preview img { width: 100%; height: 100%; object-fit: cover; }
.map { height: 320px; border-radius: 14px; border: 1px solid var(--border); z-index: 0; }
.map-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 8px; }
.bulkbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--navy); color: #fff; border-radius: 14px; padding: 10px 14px; margin: 0 22px 14px; }
.bulkbar input { flex: 1 1 200px; padding: 7px 12px; font-size: 14px; }
.toggle { position: relative; display: inline-flex; width: 42px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.toggle span { position: absolute; inset: 0; background: #cdd7e4; border-radius: 999px; transition: background .15s; }
.toggle span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.toggle input:checked + span { background: var(--turq-dark); }
.toggle input:checked + span::after { transform: translateX(18px); }
.toggle input:focus-visible + span { box-shadow: var(--focus); }

/* ---- Certificate preview ---- */
.cert {
  --c-bg: #fff; --c-ink: #0e1b33; --c-accent: #19bfd3; --c-accent-2: #0b8fa1; --c-muted: #55627a;
  position: relative; aspect-ratio: 1.414 / 1; width: 100%; max-width: 620px; border-radius: 14px; overflow: hidden;
  background: var(--c-bg); color: var(--c-ink); box-shadow: var(--shadow); container-type: inline-size; border: 1px solid var(--border);
}
.cert.t-lacivert { --c-bg: linear-gradient(150deg, #0a1b3f, #123f86); --c-ink: #fff; --c-accent: #19bfd3; --c-accent-2: #d2954a; --c-muted: #b9c8e2; }
.cert.t-bakir { --c-bg: #fffaf2; --c-ink: #3a2a14; --c-accent: #d2954a; --c-accent-2: #0a1b3f; --c-muted: #7a6650; }
.cert .frame { position: absolute; inset: 3.2cqw; border: .5cqw solid var(--c-accent); border-radius: 1.6cqw; }
.cert .frame::after { content: ""; position: absolute; inset: 1cqw; border: .2cqw solid var(--c-accent-2); border-radius: 1cqw; opacity: .6; }
.cert .inner { position: absolute; inset: 6cqw 8cqw; display: flex; flex-direction: column; align-items: center; text-align: center; }
.cert .c-logo { width: 9cqw; height: 9cqw; }
.cert .c-org { font-size: 1.9cqw; letter-spacing: .3em; text-transform: uppercase; color: var(--c-muted); margin-top: 1cqw; }
.cert .c-title { font-size: 5.4cqw; font-weight: 700; letter-spacing: .12em; color: var(--c-accent); margin-top: 1.4cqw; line-height: 1.1; }
.cert .c-sub { font-size: 2.6cqw; font-weight: 500; margin-top: .6cqw; max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cert .c-name { font-size: 4.4cqw; font-weight: 600; margin-top: 2.6cqw; border-bottom: .25cqw solid var(--c-accent-2); padding: 0 4cqw .6cqw; }
.cert .c-desc { font-size: 2cqw; color: var(--c-muted); margin-top: 1.8cqw; max-width: 85%; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cert .c-foot { margin-top: auto; width: 100%; display: flex; justify-content: space-between; align-items: flex-end; font-size: 1.8cqw; text-align: left; }
.cert .c-foot b { display: block; font-size: 2.2cqw; color: var(--c-ink); }
.cert .c-foot span { color: var(--c-muted); }
.cert .c-qr { width: 8cqw; height: 8cqw; border-radius: 1cqw; background: repeating-conic-gradient(var(--c-ink) 0 25%, transparent 0 50%) 0 0 / 2cqw 2cqw; opacity: .8; }
.template-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.template-pick label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border-strong); border-radius: 999px; padding: 6px 14px 6px 8px; cursor: pointer; font-weight: 500; font-size: 14px; }
.template-pick label:has(input:checked) { border-color: var(--turq); box-shadow: var(--focus); }
.template-pick input { position: absolute; opacity: 0; pointer-events: none; }
.template-pick i { width: 22px; height: 22px; border-radius: 50%; }

/* ---- Reports ---- */
.report { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 8px; }
.report + .report { margin-top: 12px; }
.report .top { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.report blockquote { margin: 0; background: #f6f9fc; border-left: 3px solid var(--copper); border-radius: 8px; padding: 10px 12px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.report blockquote.deleted { opacity: .55; text-decoration: line-through; }
.report .reasons { color: var(--muted); font-size: 13px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt-0 { margin-top: 0; }
.ml-auto { margin-left: auto; }
.warn-text { color: #8a5517; }
.ok-text { color: var(--success); }

/* ---- Responsive ---- */
@media (max-width: 1180px) {
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .layout { display: block; }
  .topbar {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 50; padding: 10px 16px;
    background: linear-gradient(90deg, var(--navy), var(--navy-deep)); color: #fff;
  }
  .topbar .brand { padding: 0; }
  .topbar .brand img { width: 36px; height: 36px; }
  .topbar .btn-icon { color: #fff; border-color: rgba(255, 255, 255, .2); margin-left: auto; }
  .sidebar { position: fixed; z-index: 90; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s ease-out; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(6, 17, 42, .5); z-index: 80; }
  .main { padding: 18px 16px 40px; }
  .g-2, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .event-hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .page-head h1 { font-size: 23px; }
  .card { padding: 16px; border-radius: 18px; }
  .card.flush > .card-head { padding: 16px 16px 0; }
  .card.flush table th:first-child, .card.flush table td:first-child { padding-left: 16px; }
  .pager { padding: 12px 16px; }
  .bulkbar { margin: 0 16px 12px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  dl.props { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  dl.props dd { margin-bottom: 8px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi .value { font-size: 23px; }
  .backdrop.drawer .modal { border-radius: 0; max-width: none; }
  .modal-body, .modal-head, .modal-foot { padding-left: 16px; padding-right: 16px; }
  .chart-box { height: 230px; }
  .toolbar .field { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
