:root {
  color-scheme: dark;
  --bg: #090b10;
  --panel: #11151d;
  --panel-2: #151a24;
  --panel-3: #0d1118;
  --text: #f4f7fb;
  --muted: #8e98aa;
  --soft: #c5cfdd;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --blue: #5aa7ff;
  --cyan: #5be0d6;
  --green: #65d68f;
  --yellow: #f6c65b;
  --red: #ff6b7a;
  --violet: #a78bfa;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 360px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 14px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(90, 167, 255, 0.16), transparent 32%),
    radial-gradient(circle at 90% 5%, rgba(91, 224, 214, 0.10), transparent 30%),
    linear-gradient(180deg, #0b0e14 0%, #090b10 100%);
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 360px;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: rgba(9, 11, 16, 0.78);
  backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}

.brand-logo {
  width: 168px;
  max-width: 100%;
  height: auto;
  max-height: 52px;
  object-fit: contain;
  /* Login'deki gibi: koyu yazılı şeffaf PNG için beyaz radiuslu zemin */
  background: #ffffff;
  padding: 8px 14px;
  border-radius: 12px;
  box-sizing: border-box;
}

.brand-badge {
  margin-left: auto;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(91, 224, 214, 0.32);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(90, 167, 255, 0.95), rgba(91, 224, 214, 0.95));
  color: #061018;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 18px;
  line-height: 1;
}

.brand-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-weight: 650;
  transition: 160ms ease;
}

.nav-item span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--soft);
}

.nav-item:hover,
.nav-item.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--line);
}

.nav-item.active {
  box-shadow: inset 2px 0 0 var(--blue);
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-footer strong,
.sidebar-footer small {
  display: block;
}

.sidebar-footer small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(101, 214, 143, 0.12);
}

.main {
  min-width: 0;
  padding: 22px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 72px;
  margin: -22px -22px 0;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 11, 16, 0.72);
  backdrop-filter: blur(22px);
  display: flex;
  align-items: center;
  gap: 14px;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin: 0;
  font-size: 23px;
  line-height: 1.1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 4px;
  font-size: 16px;
  letter-spacing: 0;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search {
  width: min(34vw, 380px);
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  display: flex;
  align-items: center;
  gap: 8px;
}

.search input,
.toolbar input,
.toolbar select,
.form-grid input,
.form-grid select,
.form-grid textarea,
.settings-grid input,
.settings-grid select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  padding: 0 11px;
}

.search input {
  border: 0;
  padding: 0;
  background: transparent;
}

textarea {
  padding-top: 10px;
  min-height: 92px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #667184;
}

select {
  color: var(--text);
}

.icon-btn,
.primary-btn,
.ghost-btn {
  min-height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: var(--text);
  transition: 160ms ease;
}

.icon-btn {
  min-width: 40px;
  background: rgba(255, 255, 255, 0.055);
}

.primary-btn {
  border-color: rgba(90, 167, 255, 0.34);
  background: linear-gradient(135deg, #256cc9, #2db7ad);
  padding: 0 15px;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(45, 183, 173, 0.18);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.055);
  padding: 0 13px;
  font-weight: 700;
}

.ghost-btn.warn {
  border-color: rgba(246, 198, 91, 0.35);
}

.ghost-btn.danger {
  border-color: rgba(255, 107, 122, 0.4);
}

.icon-btn:hover,
.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  filter: brightness(1.08);
}

.menu-toggle {
  display: none;
}

.notice {
  margin: 20px 0;
  padding: 12px 14px;
  border: 1px solid rgba(90, 167, 255, 0.20);
  border-radius: var(--radius);
  background: rgba(90, 167, 255, 0.08);
  color: var(--soft);
}

.notice span {
  margin-right: 10px;
  color: var(--cyan);
  font-weight: 800;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric,
.panel,
.table-card,
.product-card,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.062), rgba(255, 255, 255, 0.032));
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.16);
}

.metric {
  position: relative;
  overflow: hidden;
  min-height: 122px;
  padding: 16px;
}

.metric:before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--cyan), transparent);
  opacity: 0.9;
}

.metric span,
.metric small {
  display: block;
  color: var(--muted);
  font-weight: 650;
}

.metric strong {
  display: block;
  margin: 12px 0 7px;
  font-size: 27px;
  line-height: 1;
  letter-spacing: 0;
}

.dashboard-grid,
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.panel {
  padding: 16px;
}

.panel.wide {
  grid-column: span 2;
}

.panel-head,
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-head p,
.section-head p {
  margin: 0;
  color: var(--muted);
}

.chart {
  min-height: 260px;
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 100% 52px, 52px 100%;
}

.bars {
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 18px;
}

.bars i {
  flex: 1;
  min-width: 12px;
  height: var(--h);
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 26px rgba(90, 167, 255, 0.20);
}

.bars.small {
  min-height: 220px;
}

.line {
  position: relative;
  min-height: 220px;
  overflow: hidden;
}

.line:before {
  content: "";
  position: absolute;
  inset: 30px 20px;
  background: linear-gradient(135deg, transparent 8%, rgba(91, 224, 214, 0.18) 8% 22%, transparent 22% 30%, rgba(90, 167, 255, 0.22) 30% 48%, transparent 48% 56%, rgba(101, 214, 143, 0.20) 56% 76%, transparent 76%);
  clip-path: polygon(0 70%, 14% 48%, 28% 55%, 42% 28%, 56% 42%, 70% 22%, 85% 30%, 100% 10%, 100% 100%, 0 100%);
}

.donut {
  width: 172px;
  height: 172px;
  margin: 20px auto;
  border-radius: 50%;
  background: conic-gradient(var(--cyan) 0 52%, var(--blue) 52% 78%, var(--violet) 78% 100%);
  display: grid;
  place-items: center;
}

.empty-donut {
  background: conic-gradient(rgba(255, 255, 255, 0.12) 0 100%);
}

.donut span {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--panel);
  display: grid;
  place-items: center;
  font-size: 25px;
  font-weight: 800;
}

.empty-cell {
  height: 132px;
  color: var(--muted);
  text-align: center;
}

.empty-inline {
  width: 100%;
  min-height: 86px;
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  display: grid;
  place-items: center;
  text-align: center;
}

.empty-chart:before {
  display: none;
}

.legend {
  display: flex;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.rank-list {
  display: grid;
  gap: 8px;
}

.rank-list span {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.rank-list em {
  color: var(--muted);
  font-style: normal;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 170px auto;
  gap: 10px;
  margin-bottom: 12px;
}

.table-card {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #11151d;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.032);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #061018;
  font-size: 12px;
  font-weight: 900;
}

.avatar.large {
  width: 74px;
  height: 74px;
  margin: 0 auto 12px;
  font-size: 22px;
}

.pill-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.pill-status.ok {
  color: #07150d;
  background: var(--green);
}

.pill-status.warn {
  color: #231704;
  background: var(--yellow);
}

.pill-status.danger {
  color: #25050a;
  background: var(--red);
}

.row-actions {
  display: flex;
  gap: 6px;
}

.row-actions button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.package-grid,
.product-grid,
.placeholder-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.package-card,
.product-card,
.empty-state {
  padding: 16px;
}

.package-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
}

.package-card h3 {
  margin: 0 0 8px;
}

.package-card strong {
  display: block;
  margin-bottom: 12px;
  font-size: 28px;
}

.package-card dl {
  display: grid;
  gap: 7px;
  margin: 0 0 14px;
}

.package-card div {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.form-grid.single {
  grid-template-columns: 1fr;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.full {
  grid-column: 1 / -1;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline article {
  position: relative;
  padding: 12px 12px 12px 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.timeline article:before {
  content: "";
  position: absolute;
  left: 12px;
  top: 17px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
}

.timeline p {
  margin: 0 0 4px;
}

.timeline small {
  color: var(--muted);
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 6px;
}

.heatmap i {
  aspect-ratio: 1;
  border-radius: 4px;
  background: rgba(91, 224, 214, var(--o));
}

.product-card {
  min-height: 150px;
  display: grid;
  align-content: space-between;
}

.product-card b {
  font-size: 18px;
}

.product-card span,
.empty-state p {
  color: var(--muted);
}

.product-card em {
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  font-style: normal;
  font-weight: 800;
}

.product-card.active em {
  background: var(--green);
  color: #07150d;
}

.product-card.soon em {
  background: var(--yellow);
  color: #231704;
}

.product-card.disabled em {
  background: rgba(255, 255, 255, 0.10);
  color: var(--muted);
}

.placeholder-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.empty-state {
  min-height: 180px;
  display: grid;
  align-content: center;
}

.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-grid .panel {
  display: grid;
  gap: 12px;
}

.detail-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  border-left: 1px solid var(--line);
  background: rgba(13, 17, 24, 0.86);
  backdrop-filter: blur(22px);
  overflow: auto;
}

.close-detail {
  display: none;
  float: right;
}

.profile {
  text-align: center;
  padding: 12px 0 18px;
}

.profile h2 {
  margin-bottom: 4px;
}

.profile p {
  margin-bottom: 12px;
  color: var(--muted);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.tabs button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.tabs button.active {
  color: var(--text);
  border-color: rgba(90, 167, 255, 0.35);
  background: rgba(90, 167, 255, 0.12);
}

.detail-body {
  display: grid;
  gap: 10px;
}

/* İşlem kartları (kullanıcıya tıklayınca) */
.action-grid { display: grid; gap: 10px; }
.action-card { padding: 12px 14px; border: 1px solid rgba(148,163,184,.22); border-radius: 12px; background: rgba(255,255,255,.03); }
.action-card.danger { border-color: rgba(239,68,68,.4); }
.action-card h4 { margin: 0 0 8px; font-size: 13px; font-weight: 700; }
.action-card small { display: block; margin-top: 6px; font-size: 11px; opacity: .6; }
.action-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.action-row input, .action-row select { flex: 1; min-width: 90px; padding: 8px 10px; border-radius: 9px; border: 1px solid rgba(148,163,184,.25); background: rgba(15,23,42,.4); color: inherit; font-size: 13px; }
.action-row button { padding: 8px 14px; border: 0; border-radius: 9px; font-weight: 700; font-size: 12px; cursor: pointer; background: #334155; color: #fff; }
.action-row button:hover { filter: brightness(1.12); }
.action-row button.ok { background: #16a34a; }
.action-row button.warn { background: #d97706; }
.action-row button.danger { background: #dc2626; }

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.info-row span {
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 6, 12, 0.64);
  backdrop-filter: blur(8px);
}

.modal.show {
  display: flex;
}

.modal-card {
  position: relative;
  width: min(520px, 100%);
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #11151d;
  box-shadow: var(--shadow);
}

.modal-card p {
  color: var(--muted);
}

.modal-close {
  position: absolute;
  right: 14px;
  top: 14px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  transform: translateY(20px);
  opacity: 0;
  max-width: 360px;
  padding: 12px 14px;
  border: 1px solid rgba(91, 224, 214, 0.24);
  border-radius: var(--radius);
  background: #11151d;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: 180ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 6, 12, 0.78);
  backdrop-filter: blur(10px);
}

.login-card {
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #11151d;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.login-logo {
  display: block;
  width: 200px;
  max-width: 100%;
  height: auto;
  max-height: 60px;
  object-fit: contain;
  /* Logo koyu yazılı şeffaf PNG; koyu kartta okunması için beyaz zemin çipi */
  background: #ffffff;
  padding: 10px 18px;
  border-radius: 14px;
  box-sizing: border-box;
  margin: 0 auto 4px;
}

.login-card h2 {
  margin: 4px 0 0;
}

.login-card p,
.login-card small {
  margin: 0;
  color: var(--muted);
}

.login-card input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  padding: 0 12px;
}

@media (max-width: 1420px) {
  .shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .detail-panel {
    position: fixed;
    right: 0;
    top: 0;
    z-index: 60;
    width: min(380px, 94vw);
    transform: translateX(100%);
    transition: 180ms ease;
    box-shadow: var(--shadow);
  }

  .detail-panel.open {
    transform: translateX(0);
  }

  .close-detail {
    display: inline-grid;
  }
}

@media (max-width: 1100px) {
  .metric-grid,
  .package-grid,
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .analytics-grid,
  .split,
  .settings-grid,
  .placeholder-grid {
    grid-template-columns: 1fr;
  }

  .panel.wide {
    grid-column: auto;
  }
}

@media (max-width: 820px) {
  .shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 70;
    width: min(290px, 86vw);
    transform: translateX(-100%);
    transition: 180ms ease;
    box-shadow: var(--shadow);
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  .menu-toggle {
    display: inline-grid;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
  }

  .search {
    width: 100%;
    order: 5;
  }

  .main {
    padding: 16px;
  }

  .topbar {
    margin: -16px -16px 0;
    padding: 16px;
    flex-wrap: wrap;
  }

  .toolbar,
  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .metric-grid,
  .package-grid,
  .product-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 20px;
  }

  .metric strong {
    font-size: 24px;
  }
}
