@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #0b0c0e !important;
  --card: #141518 !important;
  --ink: #e8e9ec !important;
  --ink-soft: #9ca0ab !important;
  --line: #2a2b30 !important;
  --line-soft: #222328 !important;
  --brand: #f97316 !important;
  --brand-2: #fb923c !important;
  --brand-ink: #ffffff !important;
  --brand-soft: #f973161a !important;
  --accent: #f97316 !important;
  --accent-soft: #f973161a !important;
  --ok: #16a34a !important;
  --ok-soft: #16a34a1a !important;
  --warn: #d97706 !important;
  --warn-soft: #d977061a !important;
  --danger: #dc2626 !important;
  --danger-soft: #dc26261a !important;
  --info: #2563eb !important;
  --info-soft: #2563eb1a !important;
  --grad: linear-gradient(135deg, #ea580c 0%, #f97316 52%, #fb923c 100%) !important;
  --grad-fab: linear-gradient(135deg, #ea580c, #f97316) !important;
  --radius: 14px !important;
  --radius-sm: 10px !important;
  --shadow: 0 1px 3px #0003, 0 6px 16px #0000004d !important;
  --shadow-sm: 0 1px 3px #0003 !important;
  --jms-bg: #0b0c0e;
  --jms-surface: #141518;
  --jms-surface-2: #1a1b1f;
  --jms-surface-3: #222328;
  --jms-border: #2a2b30;
  --jms-border-2: #3a3b42;
  --jms-text: #e8e9ec;
  --jms-text-2: #9ca0ab;
  --jms-text-3: #5c5f6a;
  --jms-orange: #f97316;
}

html,
body {
  background: var(--jms-bg) !important;
  color: var(--jms-text) !important;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image: linear-gradient(180deg, #111214 0%, #0b0c0e 14rem) !important;
  background-attachment: fixed !important;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--jms-border-2);
  border-radius: 3px;
}

#app {
  background: transparent !important;
}

.appbar {
  background: rgba(20, 21, 24, 0.88) !important;
  border-bottom: 1px solid var(--jms-border) !important;
  backdrop-filter: blur(10px) saturate(1.2);
}
.appbar-title {
  font-weight: 700 !important;
  letter-spacing: -0.02em;
}

.tabbar {
  background: #0b0c0e !important;
  border-right: 1px solid var(--jms-border) !important;
  padding: 18px 12px !important;
}
.tabbar .jms-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 20px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
}
.tabbar .jms-brand span {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--grad-fab);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
}
.tab {
  border-radius: 10px !important;
  font-weight: 600 !important;
  color: var(--jms-text-2) !important;
}
.tab:hover {
  background: var(--jms-surface-2) !important;
  color: #fff !important;
}
.tab.active {
  color: #fff !important;
  background: #f9731614 !important;
}
.tab.active:not(.fab)::before {
  background: #f97316 !important;
  border-radius: 2px;
}

.screen {
  padding: 22px 24px 40px !important;
  max-width: 80rem;
}

.card,
.sheet,
.stat,
.list,
.klog-wrap {
  background: var(--jms-surface) !important;
  border: 1px solid var(--jms-border) !important;
  box-shadow: var(--shadow) !important;
  border-radius: 14px !important;
}
.stat .k,
.sub,
.sec-title {
  color: var(--jms-text-3) !important;
}
.stat .v {
  color: #fff !important;
  font-weight: 700;
}

.btn {
  border-radius: 10px !important;
  font-weight: 600 !important;
}
.btn-primary,
.btn.primary {
  background: var(--jms-orange) !important;
  color: #fff !important;
  border-color: transparent !important;
}
.fchip.active {
  background: #f973161a !important;
  color: #fb923c !important;
  border-color: #f9731640 !important;
}

input,
select,
textarea,
.kaptan-combo-input {
  background: var(--jms-surface-2) !important;
  border-color: var(--jms-border) !important;
  color: var(--jms-text) !important;
  border-radius: 10px !important;
}

#auth {
  background: #0b0c0e !important;
}
#auth input {
  background: #141518 !important;
}

.jms-dash {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 80rem;
}
.jms-hello .k {
  font-size: 12px;
  font-weight: 600;
  color: var(--jms-text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.jms-hello h1 {
  margin: 4px 0 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
}
.jms-hello h1 b {
  color: var(--jms-orange);
  font-weight: 700;
}

.jms-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.jms-kpi {
  background: var(--jms-surface);
  border: 1px solid var(--jms-border);
  border-radius: 14px;
  padding: 16px 16px 14px;
  box-shadow: var(--shadow);
  min-height: 118px;
}
.jms-kpi .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.jms-kpi .lab {
  font-size: 12px;
  font-weight: 600;
  color: var(--jms-text-3);
}
.jms-kpi .ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
}
.jms-kpi .ico svg {
  width: 16px;
  height: 16px;
}
.jms-kpi .num {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.1;
}
.jms-kpi .chg {
  margin-top: 6px;
  font-size: 12px;
  color: var(--jms-text-3);
  font-weight: 500;
}
.jms-kpi .live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.jms-kpi .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0ea5e9;
  box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.7);
  animation: jmsPulse 1.6s ease-out infinite;
}
@keyframes jmsPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.55);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(14, 165, 233, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0);
  }
}

.jms-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  align-items: stretch;
}
.jms-card {
  background: var(--jms-surface);
  border: 1px solid var(--jms-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 280px;
}
.jms-card-h {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--jms-border);
}
.jms-card-h h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.jms-card-h p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--jms-text-3);
}

.jms-chart {
  padding: 18px 16px 12px;
  height: 260px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.jms-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 100%;
  justify-content: flex-end;
}
.jms-bar i {
  display: block;
  width: 100%;
  max-width: 36px;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #fb923c, #ea580c);
  min-height: 4px;
}
.jms-bar span {
  font-size: 10px;
  color: var(--jms-text-3);
  font-weight: 600;
  white-space: nowrap;
}
.jms-bar b {
  font-size: 10px;
  color: var(--jms-text-2);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.jms-act-list {
  max-height: 420px;
  overflow-y: auto;
  padding: 8px 16px 12px;
  display: flex;
  flex-direction: column;
}
.jms-act-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 4px;
}
.jms-act-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  background: #f4f5f7;
}
.jms-act-ico svg {
  width: 13px;
  height: 13px;
}
.jms-act-ico.is-pay svg {
  color: #16a34a;
  stroke: #16a34a;
}
.jms-act-ico.is-key svg {
  color: #2563eb;
  stroke: #2563eb;
}
.jms-act-main {
  min-width: 0;
  flex: 1;
}
.jms-act-main .t {
  font-size: 13px;
  color: #d7d9de;
  line-height: 1.4;
  font-weight: 500;
}
.jms-act-main .s {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--jms-text-3);
  font-weight: 500;
  flex-wrap: wrap;
}
.jms-act-main .s svg {
  width: 10px;
  height: 10px;
  opacity: 0.8;
}
.jms-empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--jms-text-3);
  font-size: 13px;
}

.jms-sites {
  display: flex;
  flex-direction: column;
}
.jms-site {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.jms-site:hover {
  background: var(--jms-surface-2);
}
.jms-site .ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #f973161a;
  border: 1px solid #f9731633;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f97316;
  flex-shrink: 0;
}
.jms-site .ico svg {
  width: 14px;
  height: 14px;
}
.jms-site .main {
  flex: 1;
  min-width: 0;
}
.jms-site .t {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.jms-site .s {
  font-size: 12px;
  color: var(--jms-text-3);
  margin-top: 2px;
}
.jms-site .end {
  text-align: right;
}
.jms-site .end b {
  display: block;
  color: #16a34a;
  font-size: 13px;
}
.jms-site .end small {
  color: var(--jms-text-3);
  font-size: 10px;
}
.jms-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}
.jms-pill.on {
  color: #16a34a;
  background: #16a34a1a;
}
.jms-pill.off {
  color: #dc2626;
  background: #dc26261a;
}

@media (max-width: 980px) {
  .jms-kpis {
    grid-template-columns: 1fr 1fr;
  }
  .jms-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 719px) {
  #app {
    margin-left: 0 !important;
    padding-bottom: 78px !important;
  }
  .tabbar {
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: 0 !important;
    width: 100% !important;
    height: auto !important;
    flex-direction: row !important;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)) !important;
    border-right: 0 !important;
    border-top: 1px solid var(--jms-border) !important;
  }
  .tabbar .jms-brand {
    display: none !important;
  }
  .tab {
    flex: 1 !important;
    flex-direction: column !important;
    gap: 2px !important;
    font-size: 10px !important;
    padding: 6px 2px !important;
  }
  .tab.active:not(.fab)::before {
    display: none !important;
  }
  .screen {
    padding: 14px 12px 28px !important;
  }
  .jms-hello h1 {
    font-size: 22px;
  }
  .jms-kpis {
    grid-template-columns: 1fr 1fr;
  }
}

/* CABSC marka override (Go binary içindeki Kaptan SC metinleri) */
.tabbar::before {
  content: "CABSC" !important;
}
