/* Sentinel Modern & Hafif Dashboard Stilleri (Vanilla CSS / Tailwind Uyumu) */

:root {
  --bg-main: #020617;
  --bg-card: #0f172a;
  --bg-header: rgba(15, 23, 42, 0.9);
  --border-color: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --color-normal: #10b981;
  --color-warning: #f59e0b;
  --color-critical: #f43f5e;
}

html.light {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-header: rgba(255, 255, 255, 0.9);
  --border-color: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
}

html.light body {
  background-color: var(--bg-main);
  color: var(--text-main);
}

html.light .bg-slate-950 { background-color: #f1f5f9; }
html.light .bg-slate-900 { background-color: #ffffff; }
html.light .bg-slate-900\/90 { background-color: rgba(255, 255, 255, 0.95); }
html.light .bg-slate-800 { background-color: #f1f5f9; }
html.light .border-slate-800 { border-color: #e2e8f0; }
html.light .border-slate-700 { border-color: #cbd5e1; }
html.light .text-white { color: #0f172a; }
html.light .text-slate-400 { color: #64748b; }
html.light .text-slate-300 { color: #475569; }
html.light .text-slate-200 { color: #334155; }
html.light .text-slate-100 { color: #1e293b; }
html.light .text-slate-500 { color: #94a3b8; }
html.light .text-slate-600 { color: #cbd5e1; }
html.light .divide-slate-800\/60 > :not([hidden]) ~ :not([hidden]) { border-color: #f1f5f9; }
html.light .divide-slate-800 > :not([hidden]) ~ :not([hidden]) { border-color: #e2e8f0; }
html.light .bg-slate-950\/50 { background-color: #f8fafc; }

/* Temel Sıfırlama ve Font */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Durum Rozetleri (Renk körlüğü için simge + metin desteği) */
.badge-normal {
  background-color: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-warning {
  background-color: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-critical {
  background-color: rgba(244, 63, 94, 0.12);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* Bayat Veri Göstergesi (>15s) */
.metric-card.stale {
  opacity: 0.55;
  filter: grayscale(80%);
  border-color: #475569 !important;
  transition: all 0.3s ease;
}

/* Grid & Esnek Yerleşimler */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }

/* Boyutlandırma ve Kenarlıklar */
.w-full { width: 100%; }
.w-1\.5 { width: 0.375rem; }
.h-1\.5 { height: 0.375rem; }
.w-2 { width: 0.5rem; }
.h-2 { height: 0.5rem; }
.w-3 { width: 0.75rem; }
.h-3 { height: 0.75rem; }
.w-3\.5 { width: 0.875rem; }
.h-3\.5 { height: 0.875rem; }
.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
.h-10 { height: 2.5rem; }
.h-full { height: 100%; }
.max-w-7xl { max-width: 80rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.min-h-screen { min-height: 100vh; }

.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }

.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-8 { padding: 2rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
@media (min-width: 640px) {
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
}

.border { border-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-t { border-top-width: 1px; }
.border-l { border-left-width: 1px; }
.border-r { border-right-width: 1px; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.max-h-12 { max-height: 3rem; }
.max-h-60 { max-height: 15rem; }
.max-h-96 { max-height: 24rem; }

/* Tipografi */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.uppercase { text-transform: uppercase; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Görünürlük & Konum */
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }
@media (min-width: 640px) {
  .sm\:inline { display: inline; }
  .sm\:flex { display: flex; }
}
@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:block { display: block; }
  .md\:hidden { display: none !important; }
}

.transition { transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1); }
.transition-all { transition-property: all; }
.duration-500 { transition-duration: 500ms; }
.sticky { position: sticky; }
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* Buton Stilleri */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1.25rem;
  border-radius: 0.5rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 150ms ease;
  user-select: none;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 0.375rem;
}
.btn-primary {
  background-color: #4f46e5;
  color: #ffffff;
  border-color: #6366f1;
}
.btn-primary:hover:not(:disabled) {
  background-color: #4338ca;
}
.btn-secondary {
  background-color: #1e293b;
  color: #f8fafc;
  border-color: #334155;
}
.btn-secondary:hover:not(:disabled) {
  background-color: #334155;
}
.btn-danger {
  background-color: #e11d48;
  color: #ffffff;
  border-color: #f43f5e;
}
.btn-danger:hover:not(:disabled) {
  background-color: #be123c;
}
.btn-warning {
  background-color: #d97706;
  color: #ffffff;
  border-color: #f59e0b;
}
.btn-warning:hover:not(:disabled) {
  background-color: #b45309;
}
.btn-ghost {
  background-color: transparent;
  color: #94a3b8;
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
}

/* Form Elemanları */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 0.875rem;
}
.form-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: #94a3b8;
}
.form-input, .form-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  background-color: #0b1120;
  color: #f8fafc;
  border: 1px solid #1e293b;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.form-input:focus, .form-select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}
.form-hint {
  font-size: 0.75rem;
  color: #64748b;
}

/* Sekmeler (Tabs) */
.nav-tab {
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #94a3b8;
  border-bottom: 2px solid transparent;
  background: transparent;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  transition: all 150ms ease;
  white-space: nowrap;
}
.nav-tab:hover {
  color: #f8fafc;
}
.nav-tab.active {
  color: #818cf8;
  border-bottom-color: #818cf8;
}

/* Modallar & Çekmeceler */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-card {
  background-color: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  max-width: 32rem;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  max-height: calc(85vh - 8rem);
}
.modal-footer {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  background-color: #0b1120;
}

/* Çekmece (Log & Konteyner Detay) */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(2px);
  z-index: 50;
}
.drawer-content {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 44rem;
  background-color: #0f172a;
  border-left: 1px solid #1e293b;
  z-index: 51;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 25px -5px rgba(0, 0, 0, 0.5);
}

/* Toast Bildirimleri */
#toast-container {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 24rem;
  width: calc(100% - 2.5rem);
  pointer-events: none;
}
.toast-item {
  pointer-events: auto;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  animation: toast-in 200ms ease forwards;
}
.toast-success {
  background-color: #064e3b;
  color: #a7f3d0;
  border: 1px solid #059669;
}
.toast-error {
  background-color: #881337;
  color: #fecdd3;
  border: 1px solid #e11d48;
}
.toast-info {
  background-color: #1e1b4b;
  color: #c7d2fe;
  border: 1px solid #6366f1;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(1rem); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dropdown Menü */
.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.25rem);
  background-color: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  min-width: 10rem;
  z-index: 30;
  overflow: hidden;
}
.dropdown-item {
  width: 100%;
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 500;
  color: #f8fafc;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 100ms ease;
}
.dropdown-item:hover {
  background-color: #1e293b;
}
.dropdown-item.text-rose-400:hover {
  background-color: rgba(225, 29, 72, 0.15);
}

/* Light Tema Form ve Modal Uyarlamaları */
html.light .modal-card {
  background-color: #ffffff;
  border-color: #e2e8f0;
}
html.light .modal-footer {
  background-color: #f8fafc;
  border-color: #e2e8f0;
}
html.light .drawer-content {
  background-color: #ffffff;
  border-left-color: #e2e8f0;
}
html.light .form-input, html.light .form-select {
  background-color: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
}
html.light .dropdown-menu {
  background-color: #ffffff;
  border-color: #cbd5e1;
}
html.light .dropdown-item {
  color: #0f172a;
}
html.light .dropdown-item:hover {
  background-color: #f1f5f9;
}

