:root {
  color-scheme: dark;
  --background: #090b13;
  --surface: #131624;
  --field: #0e111d;
  --line: #2a3047;
  --ink: #f1f2fb;
  --muted: #a8b0c9;
  --accent: #86ede4;
  --accent-ink: #101f29;
  --violet: #b3b4ff;
  --radius: 1rem;
  font: 100%/1.55 "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 96% 0%, #272648 0, transparent 36rem),
    radial-gradient(ellipse at 0% 46%, #102638 0, transparent 35rem),
    var(--background);
  color: var(--ink);
}
h1, h2, p { margin: 0; }
h1, h2, .wordmark, .stat dd {
  font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
}
h1 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; letter-spacing: -.056em; }
h2 { font-size: 1.14rem; font-weight: 680; line-height: 1.3; letter-spacing: -.022em; }
a { color: var(--accent); text-underline-offset: .23em; }
a:hover { color: #b9fff8; }
small, .muted, .section-meta { color: var(--muted); }
small { display: block; font-size: .8125rem; }
code { color: #c0cbfa; overflow-wrap: anywhere; }
.footnote { margin-top: .85rem; font-size: .875rem; }
.skip { position: absolute; left: -1000px; }
.skip:focus { top: .5rem; left: .5rem; z-index: 10; padding: .65rem; background: var(--surface); }
:is(a, button, input, select, textarea, summary, .table-wrap):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.app-header {
  border-bottom: 1px solid #30364e;
  background: #0f1220;
}
.app-header-inner {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: clamp(.85rem, 2.5vw, 2.3rem);
  max-width: 94rem;
  min-height: 4.85rem;
  margin-inline: auto;
  padding: .65rem clamp(1rem, 3.7vw, 3.5rem);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .67rem;
  width: fit-content;
  color: var(--ink);
  font-size: 1.49rem;
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -.06em;
  text-decoration: none;
}
.wordmark:hover { color: var(--ink); }
.brand-symbol {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.45rem;
  aspect-ratio: 1;
  border: 1px solid #638aaf;
  border-radius: .72rem;
  background: linear-gradient(145deg,#2b4c66,#242445 65%,#373064);
}
.brand-symbol::before {
  content: "";
  width: 1.55rem;
  aspect-ratio: 1;
  background: linear-gradient(140deg,#b7fff4 8%,#81cfee 53%,#b8a9f7 78%);
  clip-path: polygon(50% 0%,62% 37%,100% 50%,62% 63%,50% 100%,38% 63%,0% 50%,38% 37%);
}
.brand-symbol::after {
  content: "";
  position: absolute;
  width: .22rem;
  aspect-ratio: 1;
  top: .39rem;
  right: .39rem;
  border-radius: 50%;
  background: #efebff;
}
.app-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .28rem;
}
.app-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.62rem;
  padding: .45rem .64rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  color: #bbc3db;
  text-decoration: none;
  white-space: nowrap;
  font-size: .9rem;
  font-weight: 630;
}
.app-nav a:hover { background: #1b2136; color: #f6f7ff; }
.app-nav a[aria-current] {
  border-color: #3d4b79;
  background: #222d49;
  color: #e5edff;
  box-shadow: inset 0 -2px #92bcff;
}
.identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: .53rem;
  padding: .38rem .43rem;
  border: 1px solid #313953;
  border-radius: .65rem;
  background: #171d30;
}
.identity-initial {
  display: grid;
  place-items: center;
  flex: 0 0 1.9rem;
  aspect-ratio: 1;
  border-radius: .46rem;
  background: #303453;
  color: #d8d9ff;
  font-size: .75rem;
  font-weight: 720;
}
.identity-label { flex: 1; min-width: 0; max-width: 8rem; }
.identity strong {
  display: block;
  overflow: hidden;
  color: #ecf0ff;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: .865rem;
}
.exit { min-height: 1.95rem; padding: .14rem .42rem; color: var(--muted); background: transparent; }
.exit:hover { color: #fff; background: #28304b; }

.workspace { max-width: 94rem; margin-inline: auto; padding: 2.15rem clamp(1rem, 3.7vw, 3.5rem) 3rem; }
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.35rem;
  gap: .7rem 1rem;
}
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.user-form { max-width: 54rem; }
.connection {
  display: inline-flex;
  align-items: center;
  gap: .44rem;
  padding: .41rem .75rem;
  border: 1px solid #5a4b38;
  border-radius: 2rem;
  background: #2b2424;
  color: #edc592;
  font-size: .875rem;
  font-weight: 650;
  white-space: nowrap;
}
.connection-dot { width: .45rem; aspect-ratio: 1; border-radius: 50%; background: #f0be72; }
.connected { border-color: #36635f; background: #192c32; color: #b1f3df; }
.connected .connection-dot { background: #83e6be; }

button, input, select, textarea { font: inherit; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  padding: .62rem .72rem;
  border: 1px solid #3b4363;
  border-radius: .63rem;
  background: var(--field);
  color: var(--ink);
}
input::placeholder, textarea::placeholder { color: #878fae; }
select {
  appearance: none;
  padding-right: 1.9rem;
  background: linear-gradient(45deg,transparent 50%,#bbc3db 50%) calc(100% - 16px) 51% / 5px 5px no-repeat,
    linear-gradient(135deg,#bbc3db 50%,transparent 50%) calc(100% - 11px) 51% / 5px 5px no-repeat, var(--field);
}
textarea { resize: vertical; }
label { min-width: 0; display: grid; gap: .38rem; color: #d5dbf1; font-size: .9rem; font-weight: 620; }
label > :is(input, select, textarea) { font-size: 1rem; font-weight: 400; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.72rem;
  padding: .58rem .96rem;
  border: 1px solid transparent;
  border-radius: .64rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: .9rem;
  font-weight: 730;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
button:hover, .button:hover { background: #b2fff5; color: #0f2030; }
button:disabled { cursor: default; opacity: .55; }
.secondary { border-color: #424c6e; background: #232941; color: #ebefff; }
.secondary:hover { background: #2e3858; color: #fff; }
.surface {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 34px -28px #000d;
}
.report-bar { display: flex; flex-wrap: wrap; align-items: end; gap: .85rem 1rem; margin-bottom: 1rem; padding: 1rem 1.15rem; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: .55rem .7rem; }
.period-caption { margin-left: auto; align-self: center; text-align: right; font-variant-numeric: tabular-nums; }
.period-caption small { margin-bottom: .1rem; }
.export { align-self: center; }

.dashboard-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .8rem; margin: 0 0 1rem; }
.stat {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 1rem 1.05rem;
  border: 1px solid #323a54;
  border-radius: var(--radius);
  background: linear-gradient(150deg,#202642,#151a2e);
}
.stat:nth-child(2) { background: linear-gradient(150deg,#282344,#17172e); }
.stat:nth-child(3) { background: linear-gradient(150deg,#252841,#15192b); }
.stat:last-child { border-color: #36575e; background: linear-gradient(150deg,#21444c,#172734); }
.stat::after {
  content: "";
  position: absolute;
  top: 1.1rem;
  right: 1rem;
  width: .62rem;
  height: .62rem;
  transform: rotate(45deg);
  border: 1px solid #a0afe2;
  border-radius: .18rem;
}
.stat:last-child::after { border-color: var(--accent); }
.stat dt { padding-right: 1rem; color: #c6cce6; font-size: .92rem; font-weight: 620; }
.stat dd {
  margin: .46rem 0 0;
  font-size: clamp(1.92rem,3.6vw,2.72rem);
  font-weight: 690;
  line-height: 1.08;
  letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.overview-grid, .message-layout {
  display: grid;
  grid-template-columns: minmax(0,1.8fr) minmax(16rem,1fr);
  align-items: stretch;
  gap: .85rem;
}
.message-layout { align-items: start; }
.message-tools { min-width: 0; }
.section { min-width: 0; margin-bottom: 1rem; padding: 1.15rem; }
.section[id] { scroll-margin-top: 1rem; }
.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .9rem;
}
.section-heading a, .section-meta { font-size: .875rem; }
.section-heading a { font-weight: 650; }
.empty { padding: .86rem .9rem; border: 1px dashed #414b6d; border-radius: .65rem; background: #171d30; color: var(--muted); }
.activity-panel { background: radial-gradient(ellipse at 100% 0%,#272b4c 0,transparent 70%),var(--surface); }
.activity-figure { margin: 0; }
.activity-chart {
  --plot-height: 9rem;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0,1fr);
  gap: clamp(.12rem,.65vw,.62rem);
  padding-inline: .15rem;
  background: repeating-linear-gradient(to top,#353d5b 0 1px,transparent 1px 25%) top / 100% var(--plot-height) no-repeat;
}
.chart-column { display: grid; grid-template-rows: var(--plot-height) 1.65rem; min-width: 0; text-align: center; }
.chart-track { position: relative; min-width: 0; }
.chart-track::after {
  content: ""; position: absolute; bottom: 0; left: 50%; width: .43rem; height: .2rem;
  transform: translateX(-50%); border-radius: .2rem; background: #707d9e;
}
.chart-track progress {
  position: absolute; z-index: 1; top: 50%; left: 50%; width: var(--plot-height); height: .83rem;
  appearance: none; overflow: hidden; border: 0; border-radius: .34rem; background: transparent;
  transform: translate(-50%,-50%) rotate(-90deg);
}
.chart-month .chart-track progress { height: .36rem; }
.chart-month .chart-track::after { width: .21rem; }
.chart-track progress::-webkit-progress-bar { background: transparent; }
.chart-track progress::-webkit-progress-value { border-radius: .34rem; background: linear-gradient(to right,#579acc,var(--accent)); }
.chart-track progress::-moz-progress-bar { border-radius: .34rem; background: var(--accent); }
.chart-day { padding-top: .27rem; color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.chart-month .chart-day-secondary { visibility: hidden; }
.chart-details { margin-top: .42rem; font-size: .9rem; }
.chart-details summary { width: fit-content; color: #c6d6ff; font-weight: 600; cursor: pointer; }
.chart-values {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(9rem,1fr));
  gap: .34rem .75rem;
  margin: .62rem 0 0;
  padding: 0;
  list-style: none;
}
.chart-values li { display: flex; justify-content: space-between; gap: .5rem; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.ranking { margin: 0; padding: 0; list-style: none; }
.ranking li {
  display: grid;
  grid-template-columns: 1.78rem minmax(0,1fr) auto;
  align-items: center;
  gap: .6rem;
  padding: .5rem .12rem;
  border-bottom: 1px solid var(--line);
}
.ranking li:last-child { border-bottom: 0; }
.rank-index {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: .5rem;
  background: #2b3256; color: #d4d9ff; font-size: .875rem; font-weight: 680;
}
.rank-name { overflow-wrap: anywhere; }
.ranking li strong { font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; border: 1px solid #303a57; border-radius: .73rem; }
table { width: 100%; min-width: 39rem; border-collapse: collapse; text-align: left; font-size: .92rem; }
thead { color: #bcc7e3; background: #1f2840; }
thead th { font-weight: 650; white-space: nowrap; }
td, th { padding: .72rem .69rem; border-bottom: 1px solid #2a324b; vertical-align: middle; }
tbody tr:nth-child(even) { background: #181e32; }
tbody tr:last-child :is(td,th) { border-bottom: 0; }
tbody tr:hover { background: #202c45; }
tbody th { font-weight: 610; }
tbody td { overflow-wrap: anywhere; }
.numeric, .date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.numeric { text-align: right; }
.date { color: var(--muted); }
.status {
  display: inline-block; padding: .23rem .48rem; border-radius: .44rem;
  background: #2a3150; color: #d9dfff; font-size: .875rem; white-space: nowrap;
}
.status-sent, .status-tamamlandi { background: #22413e; color: #b7f2d8; }
.status-pending, .status-bekliyor, .status-unknown { background: #423429; color: #f7d19e; }
.status-failed { background: #432d3b; color: #ffc4cf; }
.bank-list { min-width: 7rem; }
.bank-list summary { color: var(--accent); cursor: pointer; white-space: nowrap; }
.bank-list ul { margin: .35rem 0 0; padding-inline-start: 1.05rem; }

.form-stack { display: grid; gap: .85rem; }
.form-grid, .two-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; }
.form-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.form-actions { grid-column: 1 / -1; }
.inline-form { display: flex; align-items: end; min-width: 13rem; gap: .45rem; }
.inline-form select { font-size: .9rem; }
.team-row {
  display: grid; grid-template-columns: 1fr 1fr 1.25fr 1fr auto; align-items: end;
  gap: .7rem; padding-block: .82rem; border-top: 1px solid var(--line);
}
.team-row > strong { align-self: center; overflow-wrap: anywhere; }
.team-row small { display: inline; }
.block-intro { margin-bottom: .85rem; }
.block-list { margin-top: 1rem; }
.block-item { margin-bottom: .54rem; border: 1px solid #35405d; border-radius: .7rem; background: #1b2239; }
.block-item summary { padding: .73rem .83rem; font-weight: 650; overflow-wrap: anywhere; cursor: pointer; }
.block-item summary .status { margin-inline-start: .35rem; }
.block-item form { padding: .2rem .83rem .85rem; }
.section-nav { display: flex; flex-wrap: wrap; gap: .48rem; margin-bottom: 1rem; }
.section-nav a {
  padding: .43rem .72rem; border: 1px solid #384365; border-radius: .55rem;
  background: #1a2339; color: #d8e4ff; font-size: .9rem; font-weight: 630; text-decoration: none;
}
.section-nav a:hover { background: #273456; color: #f4f7ff; }
.alert {
  margin-bottom: 1rem; padding: .7rem .84rem; border: 1px solid #345751; border-radius: .72rem;
  background: #182f32; color: #bdede2;
}
.alert-error { border-color: #673b55; background: #352238; color: #ffccd8; }

.login-page {
  --accent: #e6e6e7;
  --field: #101012;
  --ink: #f4f4f5;
  background:
    radial-gradient(ellipse 52rem 31rem at 50% -8rem,#2c2d2f,transparent 90%),
    radial-gradient(ellipse 31rem 24rem at 79% 87%,#171719,transparent 92%),
    linear-gradient(144deg,#0f0f11,#080809 60%,#0d0d0e);
}
.login-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(1rem,4vw,2.5rem);
}
.login-card {
  width: min(100%,24rem);
  padding: clamp(1.35rem,7vw,2.25rem);
  border: 1px solid #39393c;
  border-radius: 1.25rem;
  background: linear-gradient(155deg,#1c1c1f,#141416 49%,#121214);
  box-shadow: 0 28px 64px -20px #000d, inset 0 1px #ffffff0f;
}
.login-header {
  display: grid;
  justify-items: center;
  gap: .62rem;
  margin-bottom: 1.65rem;
}
.login-logo { display: block; width: min(12.75rem,80%); height: auto; }
.login-header h1 { font-size: 1.52rem; line-height: 1.3; letter-spacing: -.03em; }
.login-card label { color: #d3d3d5; }
.login-card :is(input:not([type="hidden"]),button) { min-height: 3rem; }
.login-card input { border-color: #626266; }
.login-card input:focus { border-color: #c9c9ce; }
.login-card button {
  margin-top: .32rem;
  border-color: #eeeef0;
  background: linear-gradient(#f1f1f3,#c7c8cc);
  color: #111113;
}
.login-card button:hover { background: #f7f7f8; color: #111113; }
.login-card .alert-error { border-color: #784c50; background: #2a1d1e; color: #ffd8da; }
.error-screen { max-width: 34rem; margin: 3rem auto; padding: 1.55rem; }
.error-screen h1 { margin-top: 1rem; }
.error-screen p { margin: .58rem 0 1rem; }

@media (max-width: 1070px) {
  .app-header-inner { grid-template-columns: minmax(0,1fr) auto; gap: .52rem; }
  .app-nav { grid-column: 1 / -1; grid-row: 2; justify-content: start; }
  .identity { grid-column: 2; grid-row: 1; }
  .team-row { grid-template-columns: 1fr 1fr; }
  .team-row > strong { grid-column: 1 / -1; }
}
@media (max-width: 880px) {
  .overview-grid, .message-layout { grid-template-columns: minmax(0,1fr); gap: 0; }
}
@media (max-width: 680px) {
  .workspace { padding-top: 1.35rem; }
  .app-nav a { padding-inline: .5rem; font-size: .875rem; }
  .dashboard-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .58rem; }
  .stat { padding: .84rem; }
  .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .error-screen { margin-inline: 1rem; }
}
@media (max-width: 430px) {
  .identity-initial { display: none; }
  .identity-label { max-width: 5.4rem; }
  .wordmark { font-size: 1.31rem; }
  .wordmark .brand-symbol { width: 2.18rem; }
  .report-bar { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .75rem; padding-inline: .76rem; }
  .filters { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); }
  .filters button { grid-column: 1 / -1; }
  .period-caption { margin: 0; text-align: left; font-size: .875rem; }
  .two-fields, .form-grid { grid-template-columns: minmax(0,1fr); }
  .section { padding: .94rem; }
  .activity-chart { --plot-height: 6.8rem; }
  .chart-month .chart-track progress { height: .26rem; }
  .chart-month .chart-day { font-size: .7rem; }
}
