/**
 * ZenithIstanbul - SRE Terminal & Diff Inspection
 */
    /* BOTTOM TERMINAL BAND & DRAWER */
    .terminal-bar, .terminal-drawer {
      position: fixed !important;
      z-index: 9999 !important;
      bottom: 0 !important;
      left: 0 !important;
      width: 100% !important;
      height: 26px !important;
      background: rgba(6, 10, 20, 0.96) !important;
      border-top: 1px solid rgba(0, 240, 255, 0.3) !important;
      border-left: none !important;
      border-right: none !important;
      border-bottom: none !important;
      border-radius: 0 !important;
      padding: 3px 16px !important;
      font-family: 'JetBrains Mono', monospace !important;
      font-size: 11px !important;
      overflow-y: auto !important;
      overflow-x: hidden !important;
      box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.8) !important;
      display: flex !important;
      flex-direction: column !important;
      gap: 2px !important;
      box-sizing: border-box !important;
    }

    .log-line {
      display: flex;
      gap: 8px;
      line-height: 1.4;
    }

    .log-line.header { color: var(--accent-cyan); font-weight: 600; }
    .log-line.warning { color: var(--accent-gold); }
    .log-line.success { color: var(--accent-green); font-weight: 600; }
    .log-line.highlight { color: var(--accent-pink); }
    .log-line.info { color: #a4b3cc; }

    /* MODAL FOR DIFF VIEWER (SIDE-BY-SIDE & UNIFIED) */
    .diff-modal-backdrop {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: rgba(4, 7, 16, 0.88);
      backdrop-filter: blur(12px);
      z-index: 100;
      display: none;
      align-items: center;
      justify-content: center;
    }

    .diff-modal {
      width: 1120px;
      max-width: 95vw;
      max-height: 88vh;
      background: var(--panel-bg);
      border: 1px solid var(--accent-cyan);
      border-radius: 14px;
      padding: 20px;
      display: flex;
      flex-direction: column;
      gap: 14px;
      box-shadow: 0 0 50px rgba(0, 240, 255, 0.25);
    }

    .diff-viewer {
      background: #040711;
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 8px;
      padding: 0;
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      line-height: 1.6;
      overflow: auto;
      max-height: 60vh;
    }

    .diff-unified-view {
      padding: 14px;
      white-space: pre-wrap;
    }

    .diff-del { color: #ff5252; background: rgba(255, 23, 68, 0.15); display: block; padding: 1px 6px; border-left: 3px solid #ff1744; }
    .diff-add { color: #00e676; background: rgba(0, 230, 118, 0.15); display: block; padding: 1px 6px; border-left: 3px solid #00e676; }
    .diff-hunk-header { color: #00f0ff; background: rgba(0, 240, 255, 0.1); display: block; padding: 2px 6px; font-weight: 700; }

    /* Side-by-Side Split Table */
    .diff-split-table {
      width: 100%;
      border-collapse: collapse;
      table-layout: fixed;
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
    }

    .diff-split-table th {
      background: #080d1a;
      padding: 6px 10px;
      text-align: left;
      font-size: 10px;
      letter-spacing: 0.5px;
      color: var(--text-muted);
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      position: sticky;
      top: 0;
      z-index: 2;
    }

    .diff-split-table td {
      padding: 2px 8px;
      vertical-align: top;
      white-space: pre-wrap;
      word-break: break-word;
      line-height: 1.5;
    }

    .diff-split-row {
      border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    }

    .diff-cell-num {
      width: 38px;
      min-width: 38px;
      text-align: right;
      color: rgba(255, 255, 255, 0.25);
      user-select: none;
      padding-right: 8px !important;
      border-right: 1px solid rgba(255, 255, 255, 0.06);
    }

    .diff-cell-left {
      width: 50%;
      border-right: 1px solid rgba(255, 255, 255, 0.1);
    }

    .diff-cell-right {
      width: 50%;
    }

    .diff-del-row { background: rgba(255, 23, 68, 0.12); color: #ff8a80; }
    .diff-add-row { background: rgba(0, 230, 118, 0.12); color: #b9f6ca; }
    .diff-empty-cell { background: rgba(0, 0, 0, 0.3); opacity: 0.4; }

    #folder-input { display: none; }

    /* ─── Light (Daylight Bosphorus) Theme Override ─── */
    :root[data-theme="light"] {
      --bg-dark: #f1f5f9;
      --panel-bg: rgba(255, 255, 255, 0.88);
      --panel-border: rgba(15, 23, 42, 0.12);
      --accent-cyan: #0284c7;
      --accent-pink: #db2777;
      --accent-gold: #b45309;
      --accent-red: #dc2626;
      --accent-green: #16a34a;
      --text-main: #0f172a;
      --text-muted: #64748b;
    }

    :root[data-theme="light"] .top-bar,
    :root[data-theme="light"] .hud-panel,
    :root[data-theme="light"] .radar-container,
    :root[data-theme="light"] .terminal-drawer,
    :root[data-theme="light"] .inspector-drawer {
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
    }

    :root[data-theme="light"] .terminal-drawer {
      background: rgba(248, 250, 252, 0.92);
      border-color: rgba(15, 23, 42, 0.1);
    }

    :root[data-theme="light"] .log-line {
      border-bottom-color: rgba(15, 23, 42, 0.06);
    }

    :root[data-theme="light"] .gauge-dial {
      background: rgba(255, 255, 255, 0.9) !important;
    }

    :root[data-theme="light"] .stat-card {
      background: rgba(241, 245, 249, 0.8);
      border-color: rgba(15, 23, 42, 0.08);
    }

    :root[data-theme="light"] .radar-container {
      background: rgba(255, 255, 255, 0.85);
      border-color: rgba(15, 23, 42, 0.1);
    }

    :root[data-theme="light"] #radar-canvas {
      border-color: rgba(15, 23, 42, 0.1);
    }

    :root[data-theme="light"] .btn-control {
      border-color: rgba(15, 23, 42, 0.15) !important;
      background: rgba(241, 245, 249, 0.9) !important;
      color: var(--text-main) !important;
    }

    :root[data-theme="light"] .btn-control:hover {
      background: rgba(226, 232, 240, 1) !important;
    }

    :root[data-theme="light"] .weather-badge {
      background: rgba(241, 245, 249, 0.8);
      border-color: rgba(15, 23, 42, 0.1);
    }

    :root[data-theme="light"] .drift-panel {
      background: rgba(241, 245, 249, 0.7);
      border-color: rgba(15, 23, 42, 0.08);
    }

    :root[data-theme="light"] .incident-alert {
      background: rgba(254, 226, 226, 0.9);
      border-color: rgba(220, 38, 38, 0.3);
    }

    :root[data-theme="light"] .inspector-drawer {
      background: rgba(255, 255, 255, 0.92);
      border-color: rgba(15, 23, 42, 0.12);
    }

    #btn-toggle-theme {
      transition: all 0.25s ease;
      min-width: 80px;
    }
    #btn-toggle-theme .theme-icon {
      display: inline-block;
      transition: transform 0.35s ease;
    }
    #btn-toggle-theme:hover .theme-icon {
      transform: rotate(180deg);
    }


    .weather-badge {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 12px;
      background: rgba(0, 240, 255, 0.05);
      border: 1px solid rgba(0, 240, 255, 0.15);
      border-radius: 8px;
    }
    /* Architecture Drift: Drift verisi (history > 0) oluşana kadar CSS ile KESİN olarak gizle */
    #drift-panel:not(.has-drift-data),
    #drift-body:not(.has-drift-data),
    #drift-chart-container:not(.has-drift-data),
    #drift-chart-wrapper:not(.has-drift-data) {
      display: none !important;
    }

    .drift-panel {
      margin-top: 10px;
      background: rgba(6, 11, 24, 0.5);
      border: 1px solid rgba(0, 240, 255, 0.15);
      border-radius: 8px;
      padding: 10px;
    }
    .drift-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      cursor: pointer;
      user-select: none;
    }
    .btn-filter {
      transition: all 0.2s ease;
    }
    .btn-filter:hover {
      background: rgba(0, 240, 255, 0.1) !important;
      color: var(--text-main) !important;
    }
    .btn-filter.active {
      background: var(--accent-cyan) !important;
      color: #060913 !important;
    }

  
    #building-tooltip {
      position: fixed;
      display: none;
      pointer-events: none;
      z-index: 99999;
      background: var(--panel-bg);
      border: 1px solid var(--panel-border);
      backdrop-filter: blur(14px);
      padding: 8px 12px;
      border-radius: 8px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 12px var(--hud-shadow);
      min-width: 180px;
      transition: opacity 0.15s ease;
      font-family: var(--font-mono);
    }
    :root[data-theme="light"] #building-tooltip {
      background: rgba(255, 255, 255, 0.95);
      border-color: rgba(15, 23, 42, 0.16);
      box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
    }

  
    /* ─── Single-Row Toolbar & Top Bar Polish ─── */
    header.top-bar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: var(--panel-bg);
      border: 1px solid var(--panel-border);
      backdrop-filter: blur(16px);
      padding: 6px 12px !important;
      border-radius: 12px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
      gap: 6px !important;
      flex-wrap: nowrap !important;
      overflow-x: auto !important;
      scrollbar-width: thin;
      white-space: nowrap;
    }
    header.top-bar::-webkit-scrollbar {
      height: 3px;
    }
    header.top-bar::-webkit-scrollbar-thumb {
      background: rgba(0, 240, 255, 0.3);
      border-radius: 3px;
    }
    :root[data-theme="light"] header.top-bar::-webkit-scrollbar-thumb,
    body.light-theme header.top-bar::-webkit-scrollbar-thumb {
      background: rgba(15, 23, 42, 0.2);
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 8px !important;
      flex-shrink: 0 !important;
    }
    .brand-icon {
      font-size: 22px !important;
    }
    .brand-text h1, .brand-title {
      font-size: 16px !important;
      font-weight: 800;
      letter-spacing: 0.5px;
      white-space: nowrap;
    }
    .brand-text p {
      font-size: 9px !important;
      margin: 0;
      white-space: nowrap;
    }

    .header-controls {
      display: flex;
      align-items: center;
      gap: 5px !important;
      flex-wrap: nowrap !important;
      flex-shrink: 0 !important;
    }

    .search-box {
      display: flex;
      align-items: center;
      background: rgba(14, 23, 44, 0.8);
      border: 1px solid rgba(0, 240, 255, 0.3);
      border-radius: 8px;
      padding: 2px 6px !important;
      flex-shrink: 0 !important;
    }
    .search-box input {
      background: transparent;
      border: none;
      color: var(--text-main);
      font-size: 11px !important;
      padding: 4px 4px !important;
      outline: none;
      width: 115px !important;
      font-family: 'Space Grotesk', sans-serif;
    }

    .github-fetch-bar {
      display: flex;
      align-items: center;
      background: rgba(14, 23, 44, 0.85);
      border: 1px solid rgba(0, 240, 255, 0.35);
      border-radius: 8px;
      padding: 2px 4px !important;
      flex-shrink: 0 !important;
    }
    .github-fetch-bar input {
      background: transparent;
      border: none;
      color: var(--text-main);
      padding: 4px 6px !important;
      font-size: 11px !important;
      outline: none;
      width: 135px !important;
      font-family: 'JetBrains Mono', monospace;
    }
    .github-fetch-bar button {
      background: var(--accent-cyan);
      color: #060913;
      border: none;
      padding: 4px 7px !important;
      border-radius: 6px;
      font-size: 10.5px !important;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
    }

    select, button.btn-control {
      padding: 4.5px 8px !important;
      font-size: 10.5px !important;
      white-space: nowrap;
      flex-shrink: 0 !important;
    }
