/* Observer SMM - AdminKit override'ları
   AdminKit'in kendi CSS'ine dokunmamak için bütün kişiselleştirmeleri buraya yaz.
*/

html,
body {
  font-size: 0.95rem; /* AdminKit default'tan bir tık büyük */
}

/* Version badge container */
.oa-version-badge {
  min-height: 1.5rem;
}

.oa-version-badge .badge {
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
}

/* KPI kartları */
.oa-kpi-card {
  border-radius: 0.75rem;
  background: #ffffff;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.oa-kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}

.oa-kpi-card .card-body {
  padding: 1.25rem;
}

.oa-kpi-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.oa-kpi-icon i {
  width: 24px;
  height: 24px;
}

.oa-kpi-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #6b7280; /* slate-500 */
  margin-bottom: 0.1rem;
}

.oa-kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827; /* slate-900 */
  line-height: 1.2;
}

.oa-kpi-value .text-success {
  color: #10b981 !important;
}

.oa-kpi-value .text-danger {
  color: #ef4444 !important;
}

/* Dashboard başlık satırı biraz daha nefesli olsun */
main.content .row.mb-4:first-of-type {
  margin-bottom: 1.5rem !important;
}

/* Grafik kartı için yükseklik sabitleme (Request) */
#chart-card .chart-container {
  position: relative;
  height: 250px; /* Grafiğin yüksekliğini buradan ayarlayabilirsiniz */
}

/* Grafik kartı için yükseklik sabitleme (Playwright) */
#chart-card-playwright .chart-container {
  position: relative;
  height: 250px; /* Request ile birebir aynı yükseklik */
}

/* Grafik kartı için yükseklik sabitleme (App) */
#chart-card-app .chart-container {
  position: relative;
  height: 250px; /* Request/Playwright ile aynı yükseklik */
}

/* Dashboard specific styles */
#chart-card-overview .chart-container {
  position: relative;
  height: 320px;
}
.sparkline {
  height: 60px;
}
.oa-kpi-card .oa-kpi-label {
  font-size: 0.8rem;
}

/* Recent accounts source badges */
.badge-source-request {
  background-color: #3b82f6;
  color: white;
  padding: 0.25em 0.45em;
  font-size: 0.65rem;
}
.badge-source-playwright {
  background-color: #8b5cf6; /* purple */
  color: white;
  padding: 0.25em 0.45em;
  font-size: 0.65rem;
}
.badge-source-app {
  background-color: #fbbf24; /* amber (more yellow, not like unknown) */
  color: #111827;
  padding: 0.25em 0.45em;
  font-size: 0.65rem;
}

/* System card small layout improvements */
.card .h5 {
  font-weight: 600;
}
.sparkline {
  background: rgba(15, 23, 42, 0.02);
  border-radius: 4px;
  padding: 6px;
}

/* Dashboard system KPI table (Request / Playwright / App) */
.oa-system-card {
  border-radius: 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.oa-system-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.oa-dot-request { background: #3b82f6; }
.oa-dot-playwright { background: #8b5cf6; }
.oa-dot-app { background: #fbbf24; }

.oa-system-badge {
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
}

.oa-badge-request {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.12);
}
.oa-badge-playwright {
  color: #5b21b6;
  background: rgba(139, 92, 246, 0.14);
}
.oa-badge-app {
  color: #92400e;
  background: rgba(251, 191, 36, 0.18);
}

.oa-kpi-table {
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 0.6rem;
  overflow: hidden;
}

.oa-kpi-head {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr 1fr;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  background: rgba(15, 23, 42, 0.03);
  color: #6b7280;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.oa-kpi-row {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr 1fr;
  gap: 0.75rem;
  padding: 0.6rem 0.65rem;
  align-items: center;
}

.oa-kpi-row-alt {
  background: rgba(15, 23, 42, 0.02);
}

.oa-kpi-row-label {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 600;
}

.oa-kpi-cell {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

/* remove wrapper styles (kept for backward compat if any other view still uses it) */
.oa-spark-wrap {
  border-radius: 0.6rem;
  background: rgba(15, 23, 42, 0.02);
  padding: 6px;
}

/* Use a dedicated class for the overview sparklines */
.oa-sparkline {
  height: 60px;
  margin-top: 0.75rem;
  border-radius: 0.6rem;
  background: rgba(15, 23, 42, 0.02);
  padding: 6px;
}

/* Workers panel (dashboard) */
.oa-workers-card {
  border-radius: 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.oa-workers-list {
  overflow: auto;
  max-height: 420px;
  padding-right: 6px; /* room for scrollbar */
  margin-top: 1rem;
}

.oa-worker-item {
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 0.75rem;
  padding: 0.7rem 0.75rem;
  background: linear-gradient(180deg, #ffffff 0%, rgba(248, 250, 252, 0.95) 100%);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.oa-worker-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.06);
}

.oa-worker-item + .oa-worker-item {
  margin-top: 0.55rem;
}

.oa-worker-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.85rem;
}

.oa-worker-name {
  font-weight: 700;
  color: #0f172a;
}

.oa-worker-sub {
  color: #64748b;
  font-size: 0.75rem;
}

.oa-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 6px;
}

.oa-status-online { background: #10b981; }
.oa-status-offline { background: #94a3b8; }

.oa-worker-metrics {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-variant-numeric: tabular-nums;
}

.oa-worker-metric {
  font-size: 0.75rem;
  color: #64748b;
}

.oa-worker-metric strong {
  color: #0f172a;
  font-weight: 800;
  margin-left: 4px;
}

.oa-worker-metric-success strong { color: #047857; }
.oa-worker-metric-fail strong { color: #b91c1c; }

.oa-worker-footer {
  margin-top: 0.35rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.oa-worker-last {
  font-size: 0.72rem;
  color: #94a3b8;
}

/* =========================
   Login page (premium)
   Scoped: oa-login-*
   ========================= */

.oa-login-body {
  min-height: 100vh;
  background: #0b1220;
  position: relative;
  overflow-x: hidden;
}

.oa-login-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1000px 550px at 10% 20%, rgba(59, 125, 221, 0.38), transparent 60%),
    radial-gradient(900px 520px at 85% 70%, rgba(139, 92, 246, 0.32), transparent 58%),
    radial-gradient(700px 420px at 45% 85%, rgba(251, 191, 36, 0.18), transparent 55%),
    linear-gradient(180deg, #0b1220 0%, #0f1a30 100%);
}

.oa-login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 2.5rem 0;
  position: relative;
  z-index: 1;
  justify-content: center;
}

.oa-login-frame {
  border-radius: 1.25rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(10px);
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.oa-login-hero {
  height: 100%;
  background:
    linear-gradient(135deg, rgba(59, 125, 221, 0.22) 0%, rgba(139, 92, 246, 0.18) 55%, rgba(251, 191, 36, 0.10) 100%),
    radial-gradient(900px 500px at 20% 15%, rgba(255, 255, 255, 0.12), transparent 60%);
  position: relative;
}

.oa-login-hero:after {
  content: '';
  position: absolute;
  inset: -1px;
  background: radial-gradient(800px 420px at 15% 12%, rgba(255, 255, 255, 0.07), transparent 50%);
  pointer-events: none;
}

.oa-login-hero-inner {
  position: relative;
  z-index: 1;
  padding: 3.25rem 3rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.oa-login-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 2.25rem;
}

.oa-login-mark {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #0b1220;
  background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.72) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.oa-login-brand-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.1;
}

.oa-login-brand-sub {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
}

.oa-login-title {
  font-size: 2.15rem;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.9rem 0;
}

.oa-login-desc {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  line-height: 1.55;
  margin-bottom: 1.75rem;
  max-width: 30rem;
}

.oa-login-bullets {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.oa-login-bullet {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.92rem;
}

.oa-login-bullet-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.10);
}

.oa-login-hero-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.75rem;
}

.oa-login-hero-footer .badge {
  border-radius: 999px;
  padding: 0.45rem 0.65rem;
  font-size: 0.72rem;
}

.oa-login-hero-hint {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
}

.oa-login-formWrap {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}

.oa-login-card {
  border-radius: 1.1rem;
  border: 1px solid rgba(15, 23, 42, 0.10);
}

.oa-login-card .card-body {
  padding: 2rem 2rem;
}

.oa-login-miniMark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 55%, #fbbf24 100%);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.20);
}

.oa-login-form .form-label {
  font-weight: 700;
  color: #0f172a;
}

.oa-login-form .form-control {
  border-radius: 0.8rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.oa-login-form .form-control:focus {
  border-color: rgba(59, 125, 221, 0.55);
  box-shadow: 0 0 0 0.25rem rgba(59, 125, 221, 0.18);
}

.oa-login-help {
  white-space: nowrap;
}

.oa-login-submit {
  padding: 0.65rem 1rem;
  border-radius: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.oa-login-footnote {
  margin-top: 1rem;
  text-align: center;
}

.oa-login-bottom {
  color: rgba(255, 255, 255, 0.70) !important;
}

/* Username + Instagram quick link */
.oa-username {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.oa-ig-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.03);
  color: #475569; /* slate-600 */
  text-decoration: none;
  line-height: 1;
}

.oa-ig-link:hover {
  background: rgba(59, 130, 246, 0.10);
  border-color: rgba(59, 130, 246, 0.35);
  color: #1d4ed8; /* blue-700 */
}

.oa-ig-link:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.oa-ig-link-icon {
  font-size: 0.75rem;
  transform: translateY(-0.5px);
}

/* NOVA Mail API JSON popup (fallback modal if Bootstrap JS isn't available) */
.oa-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 2000;
  padding: 24px 12px;
}

.oa-modal[aria-hidden="false"] {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.oa-modal__dialog {
  width: 100%;
  max-width: 980px;
}

.oa-modal__dialog .card {
  border-radius: 0.85rem;
}

.oa-modal__dialog .card-body {
  max-height: calc(100vh - 220px);
  overflow: auto;
}

/* Ensure Mailboxes overlays never affect page layout */
#nova-overlays {
  /* IMPORTANT: keep this container out of any new stacking/positioning context.
     Bootstrap modals expect to overlay the viewport; position: relative here can
     cause the .modal to render inline within the page flow on some admin themes. */
  position: static;
}

/* Mailboxes: ensure Bootstrap modals/backdrops stay on top of AdminKit layout */
#novaDeleteModal.modal,
#novaJsonModal.modal {
  z-index: 1060;
}

.modal-backdrop {
  z-index: 1055;
}

/* Hard-override: fallback overlay must be fixed on top of everything */
#novaJsonFallback {
  position: fixed !important;
  inset: 0 !important;
  z-index: 5000 !important;
}

/* Premium JSON popup styling */
.oa-json-card {
  border-radius: 0.95rem;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.oa-json-header {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.02));
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.oa-json-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  color: #0b1220;
  background: rgba(251, 191, 36, 0.28); /* amber */
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.oa-json-body {
  background: #0b1220;
  padding: 1rem 1.1rem;
}

.oa-json-code {
  display: block;
  color: rgba(226, 232, 240, 0.92);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.8rem;
  line-height: 1.45;
}

.oa-json-code .oa-j-key { color: #93c5fd; }
.oa-json-code .oa-j-string { color: #86efac; }
.oa-json-code .oa-j-number { color: #fbbf24; }
.oa-json-code .oa-j-bool { color: #f472b6; }
.oa-json-code .oa-j-null { color: #94a3b8; }

/* Make sure the dialog floats nicely */
.oa-modal[aria-hidden="false"] {
  align-items: flex-start;
  justify-content: center;
}
