/* Priente Security Admin — /securityadmin. Sistem yazı tipleri; harici kaynak yok. */
:root {
  --bg: #f5f6f8; --surface: #fff; --text: #17191c; --muted: #5d6470; --line: #e2e5ea; --line2: #eef0f3;
  --accent: #6a3fd1; --accent-ink: #fff; --accent-soft: #efe9fc;
  --ok: #18794e; --ok-soft: #e6f4ec; --warn: #9a5b00; --warn-soft: #fdf3e1; --err: #b42318; --err-soft: #fdecea;
  --radius: 10px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111317; --surface: #1a1d23; --text: #e7e9ee; --muted: #9aa1ad; --line: #2b3039; --line2: #23272f;
    --accent: #a98bf5; --accent-ink: #0d1117; --accent-soft: #2a2144; --ok: #4cc38a; --ok-soft: #13291f;
    --warn: #f0b545; --warn-soft: #2e2512; --err: #f97066; --err-soft: #34171a; --shadow: none; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", Tahoma, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: .88em; }
code { background: var(--line2); padding: .05em .35em; border-radius: 4px; }
code.block { display: block; margin: 1px 0; width: max-content; }
code.wrap, .ua { word-break: break-all; }
h1 { font-size: 1.55rem; margin: .2rem 0 1rem; letter-spacing: -.01em; }
h2 { font-size: 1.08rem; margin: 0 0 .8rem; }
h2.sec { margin: 1.4rem 0 .6rem; }
.muted { color: var(--muted); } .small, small { font-size: .84rem; }
.skip { position: absolute; inset-inline-start: -9999px; } .skip:focus { inset-inline-start: 1rem; top: .5rem; z-index: 10; background: var(--surface); padding: .4rem .8rem; }

/* üst çubuk */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-in { max-width: 1320px; margin: 0 auto; padding: .55rem 1.25rem; display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 650; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; }
.nav { display: flex; gap: .15rem; flex-wrap: wrap; flex: 1; }
.nav a { color: var(--muted); padding: .38rem .7rem; border-radius: 8px; font-weight: 520; }
.nav a:hover { background: var(--line2); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.top-end { display: flex; gap: .5rem; margin-inline-start: auto; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 8px; font-size: .9rem; display: flex; gap: .4rem; align-items: center; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > ul { position: absolute; inset-inline-end: 0; top: calc(100% + 4px); margin: 0; padding: .3rem; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); min-width: 180px; z-index: 20; }
.menu li a, .menu li .linkish { display: block; width: 100%; text-align: start; padding: .45rem .65rem; border-radius: 6px; color: var(--text); }
.menu li a:hover, .menu li .linkish:hover { background: var(--line2); text-decoration: none; }
.menu li a[aria-current] { font-weight: 650; }

/* düzen */
.main { width: 100%; max-width: 1320px; margin: 0 auto; padding: 1.4rem 1.25rem 3rem; flex: 1; }
.foot { max-width: 1320px; width: 100%; margin: 0 auto; padding: 1rem 1.25rem 1.6rem; color: var(--muted); font-size: .82rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.head h1 { margin-bottom: .3rem; }
.crumbs { margin: 0; color: var(--muted); font-size: .9rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem 1.25rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; } .card.flush .pad, .pad { padding: 1rem 1.25rem; } .card.flush h2.pad { padding-bottom: 0; }
.card.narrow { max-width: 560px; }
.anchor { scroll-margin-top: 80px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: .9rem 1rem; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.grid2 > .card, .grid3 > .card { margin-bottom: 0; } .grid2 + *, .grid3 + * { margin-top: 1rem; }
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin: .2rem 0 1rem; position: sticky; top: 56px; z-index: 4; background: var(--bg); padding: .35rem 0; }
.tabs a { padding: .3rem .75rem; border: 1px solid var(--line); border-radius: 999px; color: var(--text); background: var(--surface); font-size: .9rem; }
.tabs a:hover { border-color: var(--accent); text-decoration: none; }

/* istatistik */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; display: flex; flex-direction: column; gap: .15rem; box-shadow: var(--shadow); }
.stat span { color: var(--muted); font-size: .82rem; } .stat b { font-size: 1.45rem; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat small { display: flex; gap: .25rem; flex-wrap: wrap; }
.health { list-style: none; padding: 0; margin: 0 0 .8rem; display: flex; gap: 1.2rem; flex-wrap: wrap; }
.health li { display: flex; align-items: center; gap: .45rem; font-weight: 520; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--err); box-shadow: 0 0 0 3px var(--err-soft); }
.up .dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.mono-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .25rem; }
meter { width: 100%; min-width: 120px; height: .8rem; }

/* tablo */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: start; padding: .6rem .75rem; border-bottom: 1px solid var(--line2); vertical-align: top; }
thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: var(--line2); white-space: nowrap; }
tbody tr:hover { background: color-mix(in srgb, var(--accent-soft) 35%, transparent); }
tbody tr:last-child td { border-bottom: 0; }
table.dense td { padding: .42rem .65rem; }
td.num, th.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.revoked, tr.expired, tr.inactive { opacity: .66; }
table.kv th { width: 45%; font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: 0; font-size: .9rem; background: none; }
table.kv td { font-variant-numeric: tabular-nums; }
.row-actions { white-space: nowrap; } .row-actions > * { margin: 0 .2rem .25rem 0; vertical-align: top; }
.empty { color: var(--muted); padding: 1.6rem 1rem; text-align: center; }
.empty .btn { margin-top: .5rem; }

/* rozetler */
.pill, .badge, .chip { display: inline-block; border-radius: 999px; font-size: .76rem; padding: .08rem .55rem; font-weight: 600; white-space: nowrap; }
.chip { background: var(--line2); color: var(--text); font-weight: 500; }
.badge { background: var(--accent-soft); color: var(--accent); }
.pill { background: var(--line2); color: var(--muted); }
.pill.active, .pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.suspended, .pill.expired, .pill.rate_limited, .pill.sending, .pill.foreign { background: var(--warn-soft); color: var(--warn); }
.pill.revoked, .pill.error, .pill.rejected, .pill.invalid { background: var(--err-soft); color: var(--err); }

/* uyarılar */
.alert { border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1rem; border: 1px solid transparent; }
.alert ul { margin: .35rem 0 0; padding-inline-start: 1.2rem; }
.alert.ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.alert.err { background: var(--err-soft); color: var(--err); border-color: color-mix(in srgb, var(--err) 25%, transparent); }
.alert.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.alert.info { background: var(--accent-soft); color: var(--accent); }
.err-text { color: var(--err); }

/* formlar */
.form { display: grid; gap: .85rem; }
.form.row, .filters { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: 1rem; }
.grow { flex: 1 1 260px; }
label { display: flex; flex-direction: column; gap: .3rem; font-weight: 550; font-size: .88rem; }
label small { font-weight: 400; color: var(--muted); }
label.check { flex-direction: row; align-items: flex-start; gap: .5rem; font-weight: 500; }
label.check span { display: flex; flex-direction: column; }
label.check input { margin-top: .2rem; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .9rem .8rem; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; min-width: 0; }
fieldset[disabled] { border: 0; padding: 0; display: block; }
legend { font-weight: 600; font-size: .85rem; padding: 0 .3rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=datetime-local], select, textarea {
  font: inherit; font-weight: 400; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .65rem; width: 100%; min-width: 0; }
input[type=file] { font: inherit; font-weight: 400; }
textarea { font-family: var(--mono); font-size: .86rem; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[aria-invalid="true"] { border-color: var(--err) !important; background: var(--err-soft) !important; }
input.code { font-family: var(--mono); font-size: 1.4rem; letter-spacing: .3em; text-align: center; max-width: 12rem; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
form.inline { display: inline-block; margin: 0; }

/* düğmeler */
.btn { font: inherit; font-size: .9rem; font-weight: 560; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .48rem .95rem; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, var(--line)); }
.btn.danger:hover { background: var(--err-soft); }
form .btn.danger[type=submit]:not(.small) { background: var(--err); color: #fff; border-color: var(--err); }
.btn.ghost { background: transparent; }
.btn.small { padding: .25rem .6rem; font-size: .8rem; }
.linkish { background: none; border: 0; font: inherit; color: var(--accent); cursor: pointer; padding: 0; }
.js-only { display: none; } .js .js-only { display: inline-flex; }
details > summary.btn { list-style: none; } details > summary.btn::-webkit-details-marker { display: none; }
details.pop { display: inline-block; position: relative; }
details.pop[open] > form { position: absolute; inset-inline-end: 0; top: calc(100% + 4px); z-index: 15; width: min(360px, 86vw); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .9rem; box-shadow: 0 10px 30px rgba(0,0,0,.16); white-space: normal; text-align: start; }
details.create { margin-top: 1rem; } details.create[open] > summary { margin-bottom: .9rem; }
.danger-zone { border-color: color-mix(in srgb, var(--err) 35%, var(--line)); }
.pager { display: flex; gap: .6rem; justify-content: flex-end; }

/* giriş */
.auth { max-width: 420px; margin: 3rem auto; }
.auth.wide { max-width: 720px; }
.auth h1 { margin-top: 0; }
.enroll { display: flex; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap; margin: 1rem 0; }
.qr { background: #fff; padding: 10px; border-radius: 10px; border: 1px solid var(--line); image-rendering: pixelated; }
.steps { margin: 0 0 1rem; padding-inline-start: 1.2rem; }
.secret { font-size: 1.05rem; letter-spacing: .06em; padding: .3rem .5rem; display: inline-block; }
.label { font-weight: 600; margin: .3rem 0; }
.copyrow { display: flex; gap: .5rem; margin: .4rem 0 1rem; } .copyrow input { font-size: .95rem; }

@media (max-width: 720px) {
  .top-in { padding: .5rem .9rem; gap: .6rem; }
  .nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .main { padding: 1rem .9rem 2rem; }
  .tabs { top: 98px; }
  details.pop[open] > form { position: fixed; inset-inline: 5vw; top: 20vh; width: auto; }
}
@media print { .top, .tabs, .row-actions, .foot, form { display: none !important; } body { background: #fff; } }

/* Security Admin eklemeleri */
.pill.published, .pill.low { background: var(--ok-soft); color: var(--ok); }
.pill.expiring, .pill.grace, .pill.medium, .pill.pending { background: var(--warn-soft); color: var(--warn); }
.pill.withdrawn, .pill.high, .pill.critical { background: var(--err-soft); color: var(--err); }
.pill.critical { background: var(--err); color: #fff; }
.pill.draft, .pill.superseded { background: var(--line2); color: var(--muted); }
.modgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .5rem .9rem; }
.modrow { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 8px; }
.modrow label.check { flex: 1; margin: 0; }
.modrow input[type=number] { width: 7rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem 1rem; margin: 0; }
legend { font-weight: 650; padding: 0 .35rem; }
pre.json { max-height: 22rem; overflow: auto; background: var(--line2); padding: .8rem; border-radius: 8px; font: .8rem/1.45 var(--mono); white-space: pre; }
pre.notes { white-space: pre-wrap; font: inherit; margin: 0; }
.adv { border-inline-start: 4px solid var(--line); }
.adv.critical, .adv.high { border-inline-start-color: var(--err); } .adv.medium { border-inline-start-color: var(--warn); } .adv.low { border-inline-start-color: var(--ok); }
.kvs { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0; } .kvs dt { color: var(--muted); } .kvs dd { margin: 0; word-break: break-word; }
