/* AksoyluKasa yönetim paneli — sitedeki koyu indigo + zümrüt palet. */
:root {
  --bg: #12142A; --bg-2: #0B0C1A; --surface: #171A38; --surface-2: #1C2145; --border: #2E3455;
  --text: #FFFFFF; --text-2: #D3D6EE; --muted: #9BA1C9; --faint: #6B70A0;
  --accent: #10B981; --accent-2: #34D399; --info: #818CF8; --warn: #F59E0B; --danger: #F87171;
  --radius: 12px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text-2); font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
h1 { color: var(--text); font-size: 24px; margin: 0 0 20px; }
h2 { color: var(--text); font-size: 18px; margin: 0; }
input, select, textarea {
  width: 100%; margin-top: 6px; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-2); color: var(--text); font: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
label { display: block; font-size: 13px; color: var(--muted); }

.btn { background: var(--accent); color: #fff; border: 0; border-radius: 9px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { background: #0EA371; }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text-2); }
.btn.sm { padding: 5px 10px; font-size: 13px; font-weight: 500; }
.btn.danger { background: transparent; border: 1px solid rgba(248, 113, 113, .4); color: var(--danger); }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
.link:hover { color: var(--text); }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--text); }
.logo { width: 32px; height: 32px; display: block; flex-shrink: 0; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at top, #1C2145, var(--bg-2)); }
.login-card { width: min(360px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px; display: grid; gap: 16px; }
.error { color: var(--danger); margin: 0; min-height: 1.5em; font-size: 14px; }

/* Kaydırma çubukları: ince, temaya uygun, yalnızca üzerine gelince belirginleşir */
* { scrollbar-width: thin; scrollbar-color: #2E3455 transparent; }
*:hover { scrollbar-color: #454C78 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: #2E3455; border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #4B5280; border: 2px solid transparent; background-clip: padding-box; }
.side { scrollbar-width: none; }
.side::-webkit-scrollbar { display: none; }

/* İkonlu satır düğmeleri */
.ib { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--border);
  background: transparent; color: var(--muted); cursor: pointer; padding: 0; transition: background .12s, color .12s, border-color .12s; }
.ib .ic { width: 16px; height: 16px; }
.ib:hover { color: var(--text); background: var(--surface-2); border-color: #454C78; }
.ib.primary { color: var(--accent-2); }
.ib.primary:hover { background: rgba(16, 185, 129, .15); border-color: rgba(52, 211, 153, .5); }
.ib.warn { color: var(--warn); }
.ib.warn:hover { background: rgba(245, 158, 11, .14); border-color: rgba(245, 158, 11, .5); }
.ib.danger { color: var(--danger); }
.ib.danger:hover { background: rgba(248, 113, 113, .14); border-color: rgba(248, 113, 113, .5); }
.ib:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.sm .ic { width: 14px; height: 14px; margin-right: 5px; vertical-align: -2px; }
.btn.solid-danger { background: #DC2626; }
.btn.solid-danger:hover { background: #B91C1C; }

/* Onay penceresi */
.ask-dialog { width: min(440px, calc(100% - 32px)); padding: 22px; }
.ask-dialog[open] { animation: ask-in .14s ease-out; }
@keyframes ask-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.ask-body { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.ask-body h2 { font-size: 17px; margin: 2px 0 6px; }
.ask-body p { margin: 0; color: var(--text-2); font-size: 14px; word-break: break-word; }
.ask-body .ask-detail { margin-top: 8px; color: var(--muted); font-size: 13px; }
.ask-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.ask-icon .ic { width: 22px; height: 22px; }
.ask-icon.danger { background: rgba(248, 113, 113, .15); color: var(--danger); }
.ask-icon.warn { background: rgba(245, 158, 11, .15); color: var(--warn); }
.ask-icon.primary { background: rgba(16, 185, 129, .15); color: var(--accent-2); }

/* İkonlar */
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.btn .ic { width: 16px; height: 16px; margin-right: 4px; vertical-align: -3px; }
.icon-btn { background: none; border: 1px solid transparent; color: var(--muted); border-radius: 8px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn:hover { color: var(--text); background: var(--surface); border-color: var(--border); }

/* Menü (daraltılabilir) */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; transition: grid-template-columns .18s ease; }
.side { background: var(--bg-2); border-right: 1px solid var(--border); padding: 16px 12px; display: flex; flex-direction: column; gap: 20px;
  position: sticky; top: 0; height: 100vh; overflow: hidden auto; }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; }
.side-top .brand { min-width: 0; padding-left: 4px; }
.side nav { display: grid; gap: 3px; }
.side nav a { color: var(--muted); text-decoration: none; padding: 9px 12px; border-radius: 9px; display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.side nav a:hover { color: var(--text); background: var(--surface); }
.side nav a.on { color: var(--text); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.side nav a.on .ic { color: var(--accent-2); }
.nav-sep { margin: 14px 12px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); white-space: nowrap; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--border); padding-top: 12px; }
.me { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; text-decoration: none; color: var(--text-2); padding: 4px; border-radius: 9px; }
.me:hover { background: var(--surface); }
.me .lbl { display: grid; min-width: 0; line-height: 1.25; }
.me b { color: var(--text); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me small { color: var(--faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff;
  background: linear-gradient(135deg, #6366F1, #10B981); }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
#side-toggle .ic { transition: transform .18s ease; }
body.side-collapsed .shell { grid-template-columns: 68px 1fr; }
body.side-collapsed .side .lbl, body.side-collapsed .nav-sep { display: none; }
body.side-collapsed .side-top { flex-direction: column; }
body.side-collapsed .side-top .brand { padding: 0; }
.side-top .brand { cursor: pointer; border-radius: 9px; }
.side-top .brand:hover .logo { filter: brightness(1.12); }
.side-top .brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
body.side-collapsed #side-toggle { display: none; }
body.side-collapsed .side nav a { justify-content: center; padding: 10px; }
body.side-collapsed .nav-sep { display: block; height: 1px; background: var(--border); margin: 10px 6px; }
body.side-collapsed .side-foot { flex-direction: column; }
body.side-collapsed .me { flex: none; padding: 0; }

.main { padding: 28px; min-width: 0; }
.head { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; }
.head h1 { margin: 0; }

/* Arama / filtre araç çubuğu */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { position: relative; flex: 1 1 320px; max-width: 520px; margin: 0; }
.toolbar .search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.toolbar .search input { margin: 0; padding-left: 38px; height: 40px; }
.toolbar select { height: 40px; margin: 0; width: auto; min-width: 160px; }
.head .btn { display: inline-flex; align-items: center; height: 40px; }

.hint { display: flex; gap: 10px; align-items: flex-start; background: rgba(129, 140, 248, .08); border: 1px solid rgba(129, 140, 248, .25); color: var(--text-2);
  border-radius: var(--radius); padding: 12px 14px; margin: 0 0 16px; font-size: 14px; }
.hint .ic { color: var(--info); margin-top: 2px; }

/* Panel kutucukları: solid renkler */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-bottom: 22px; }
.tile { border-radius: 14px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; text-decoration: none; color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25); transition: transform .12s ease, filter .12s ease; }
.tile:hover { transform: translateY(-2px); filter: brightness(1.08); }
.tile-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); flex: none; }
.tile-ic .ic { width: 24px; height: 24px; }
.tile-txt { display: grid; min-width: 0; }
.tile small { color: rgba(255, 255, 255, .85); font-size: 13px; line-height: 1.3; }
.tile b { color: #fff; font-size: 28px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.c-indigo { background: #4F46E5; } .c-emerald { background: #059669; } .c-teal { background: #0D9488; } .c-orange { background: #EA580C; }
.c-violet { background: #7C3AED; } .c-sky { background: #0284C7; } .c-pink { background: #DB2777; } .c-amber { background: #D97706; }
.c-blue { background: #2563EB; } .c-cyan { background: #0891B2; } .c-slate { background: #475569; } .c-red { background: #DC2626; }

/* Panel kartları */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 16px; }
.panel-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; min-width: 0; }
.pc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pc-head > .ic { color: var(--accent-2); }
.pc-head h2 { font-size: 15px; flex: 1; }
.pc-head h2 small { color: var(--faint); font-weight: 400; }
.pc-link { font-size: 13px; color: var(--accent-2); text-decoration: none; }
.pc-link:hover { text-decoration: underline; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.feed-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; width: 100%; background: none; border: 0; color: inherit; font: inherit; text-align: left; }
button.feed-row { cursor: pointer; }
button.feed-row:hover { background: var(--surface-2); }
.feed-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; }
.feed-ic .ic { width: 17px; height: 17px; }
.feed-main { flex: 1; min-width: 0; display: grid; font-size: 14px; }
.feed-main b { color: var(--text); font-weight: 600; }
.feed-main > b, .feed-main > small, .feed-main > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-main small, .feed-side small { color: var(--faint); font-size: 12px; }
.feed-side { display: grid; justify-items: end; gap: 2px; flex: none; text-align: right; }
.feed-empty { color: var(--faint); font-size: 14px; padding: 14px 8px; text-align: center; margin: 0; }
.pill { color: #fff; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 99px; }
.bars { display: grid; gap: 10px; padding: 4px 2px; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 80px; align-items: center; gap: 10px; font-size: 14px; }
.bar-lbl { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 10px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: #6366F1; border-radius: 99px; }
.bar-fill.latest { background: #10B981; }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; }
.bar-val small { color: var(--faint); }

/* Kullanıcılar / profil */
.user-cell { display: flex; align-items: center; gap: 10px; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.card-title { display: flex; align-items: center; gap: 10px; }
.card-title .ic { color: var(--accent-2); }
a.btn { text-decoration: none; display: inline-block; }

/* Sayfalama */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 12px 2px 0; font-size: 13px; color: var(--muted); }
.pager:empty { display: none; }
.pager b { color: var(--text); }
.pg-btns { display: flex; gap: 4px; align-items: center; }
.pg { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: inherit; cursor: pointer; }
.pg:hover:not(:disabled) { border-color: var(--accent); color: var(--text); }
.pg.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.pg:disabled { opacity: .4; cursor: default; }
.pg-gap { padding: 0 4px; color: var(--faint); }
.pg-size { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.pg-size select { width: auto; margin: 0; padding: 5px 8px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.actions { display: flex; justify-content: flex-end; gap: 10px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.wrap { white-space: normal; min-width: 200px; max-width: 320px; }
td small { color: var(--faint); display: block; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.empty { text-align: center; color: var(--faint); padding: 28px; }

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--faint); }
.dot.on { background: var(--accent-2); box-shadow: 0 0 0 3px rgba(52, 211, 153, .2); }
.badge { font-size: 12px; padding: 2px 9px; border-radius: 99px; border: 1px solid; }
.badge.active { color: var(--accent-2); border-color: rgba(52, 211, 153, .35); background: rgba(16, 185, 129, .1); }
.badge.pending { color: var(--info); border-color: rgba(129, 140, 248, .35); background: rgba(129, 140, 248, .1); }
.badge.expired { color: var(--warn); border-color: rgba(245, 158, 11, .35); background: rgba(245, 158, 11, .1); }
.badge.limit { color: #FB923C; border-color: rgba(251, 146, 60, .4); background: rgba(251, 146, 60, .1); }
.badge.revoked { color: var(--danger); border-color: rgba(248, 113, 113, .35); background: rgba(248, 113, 113, .1); }

dialog { background: var(--surface); color: var(--text-2); border: 1px solid var(--border); border-radius: 16px; padding: 24px; width: min(560px, calc(100% - 32px)); }
.wide-dialog { width: min(760px, calc(100% - 32px)); }
h3 { color: var(--accent-2); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; margin: 6px 0 -4px; }
.head-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.head-tools input { max-width: 340px; margin: 0; }
.keybox { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 10px; background: var(--bg-2); }
.keybox code { color: var(--accent-2); font: 600 15px/1.4 Consolas, "Cascadia Mono", monospace; letter-spacing: .04em; margin-right: auto; }
.muted { color: var(--muted); font-size: 14px; }
.seats { font-variant-numeric: tabular-nums; }
.seats.over { color: #FB923C; font-weight: 600; }
.tile.t7 { background: linear-gradient(135deg, #3B2A12, #171A38); }
a.cell-link, button.cell-link { color: var(--text); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-align: left; }
button.cell-link:hover { color: var(--accent-2); }
dialog::backdrop { background: rgba(5, 6, 15, .6); backdrop-filter: blur(4px); }

/* Ürün lisansları */
.badge.prod { font-weight: 600; }
.badge.prod.AksoyluKasa { color: #A5B4FC; border-color: rgba(129, 140, 248, .45); background: rgba(129, 140, 248, .12); }
.badge.prod.AksoyluPOS { color: #5EEAD4; border-color: rgba(45, 212, 191, .45); background: rgba(45, 212, 191, .12); }
.badge.prod.off { opacity: .45; text-decoration: line-through; }
.prods { display: flex; gap: 4px; flex-wrap: wrap; }
.mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: 13px; }
.keyarea { font: 13px/1.45 Consolas, "Cascadia Mono", monospace; color: var(--accent-2); word-break: break-all; resize: vertical; }
.sub-head { margin: 18px 0 10px; }
.sub-head h3, .sub-title { margin: 0; }
.sub-title { margin: 18px 0 10px; }
label.check { display: flex; align-items: center; gap: 8px; align-self: end; padding-bottom: 10px; }
label.check input { width: auto; margin: 0; }
select.inline { width: auto; margin: 0; }

.toast { position: fixed; right: 20px; bottom: 20px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); padding: 12px 16px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }

@media (max-width: 760px) {
  .shell, body.side-collapsed .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; padding: 10px 16px; flex-wrap: wrap; gap: 10px; }
  #side-toggle { display: none; }
  .side nav { display: flex; flex-wrap: wrap; order: 3; width: 100%; }
  .side nav a { padding: 8px 10px; }
  .side .lbl, .nav-sep { display: none; }
  .side-top .brand .lbl { display: inline; }
  .side-foot { margin: 0 0 0 auto; border: 0; padding: 0; }
  .main { padding: 20px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .dash-grid, .profile-grid { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 90px 1fr 70px; }
  .toolbar .search { flex-basis: 100%; max-width: none; }
}
