/* İşnet / Onso tarzı fatura entegrasyon ekranı */
.isnet-shell {
  display: flex;
  gap: 0;
  flex: 1;
  min-height: 0;
  margin: 0;
  background: #e8e4d9;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #c5bfb0;
}
.isnet-shell--single .isnet-main {
  width: 100%;
}

.isnet-side-tabs {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #5a6a7a;
}
.isnet-tab {
  display: block;
  width: 100%;
  padding: 14px 12px;
  border: 0;
  border-bottom: 1px solid #4a5866;
  background: #6b7d8f;
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  line-height: 1.3;
}
.isnet-tab:hover { background: #5f7183; }
.isnet-tab.active {
  background: #1e2f45;
  color: #facc15;
}

.isnet-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f3efe6;
}

.isnet-title-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #d4cfc4 0%, #c8c2b6 100%);
  border-bottom: 1px solid #b5aea0;
}
.isnet-title-bar h1 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.isnet-filter-bar {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #e8e2d6;
  border-bottom: 1px solid #c5bfb0;
}
.isnet-filter-bar .spacer { flex: 1; min-width: 8px; }
.isnet-filter-lbl {
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
}
.isnet-filter-date,
.isnet-filter-select {
  padding: 5px 8px;
  border: 1px solid #a8a195;
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: 0.78rem;
  color: #1e293b;
}
.isnet-filter-sep { color: #64748b; font-size: 0.85rem; }
.isnet-page-info {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  min-width: 120px;
  text-align: center;
}
table.isnet-table .col-actions {
  white-space: nowrap;
  min-width: 220px;
}
.isnet-btn-xs {
  padding: 3px 7px !important;
  font-size: 0.68rem !important;
  margin: 1px 2px;
}
.isnet-btn-xs.primary {
  padding: 3px 8px !important;
}
table.isnet-table .col-status { min-width: 88px; }
table.isnet-table .col-chk input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  vertical-align: middle;
}
.isnet-subtabs { display: flex; gap: 4px; }
.isnet-subtab {
  padding: 6px 14px;
  border: 1px solid #9ca38f;
  border-radius: 4px 4px 0 0;
  background: #8b9468;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: default;
}

.isnet-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #faf8f3;
}
table.isnet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  color: #1e293b;
}
table.isnet-table th,
table.isnet-table td {
  padding: 7px 8px;
  border: 1px solid #d8d2c6;
  text-align: left;
  white-space: nowrap;
  color: #1e293b;
}
table.isnet-table th {
  background: #c5bfb0;
  color: #0f172a;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 2;
}
table.isnet-table tbody tr:nth-child(even) td { background: #f0ebe2; color: #1e293b; }
table.isnet-table tbody tr:nth-child(odd) td { background: #faf8f3; color: #1e293b; }
table.isnet-table tbody tr:hover td { background: #dbeafe !important; color: #0f172a !important; }
table.isnet-table tbody tr.selected td { background: #bfdbfe !important; color: #0f172a !important; }
table.isnet-table .col-chk { width: 32px; text-align: center; }
table.isnet-table a { color: #1d4ed8; text-decoration: none; }
table.isnet-table a:hover { text-decoration: underline; }
table.isnet-table b { color: #0f172a; }

.isnet-status-chip {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}
.isnet-status-chip.ok { background: #dcfce7; color: #166534; }
.isnet-status-chip.wait { background: #fef3c7; color: #92400e; }
.isnet-status-chip.done { background: #dbeafe; color: #1e40af; }
.isnet-status-chip.err { background: #fee2e2; color: #991b1b; }

.isnet-footer {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #c8c2b6 0%, #bdb6a8 100%);
  border-top: 2px solid #a8a195;
  box-shadow: 0 -4px 16px rgba(0,0,0,.12);
  z-index: 30;
}
.isnet-footer .spacer { flex: 1; }
.isnet-footer .count-badge {
  background: #4ade80;
  color: #14532d;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid #22c55e;
}
.isnet-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid #8a8375;
  border-radius: 6px;
  background: linear-gradient(180deg, #f5f2eb 0%, #e8e2d6 100%);
  color: #1e293b;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.isnet-btn:hover { background: #fff; }
.isnet-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.isnet-btn.primary {
  background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
  border-color: #16a34a;
  color: #052e16;
  font-weight: 700;
  padding: 8px 16px;
}
.isnet-btn.danger { color: #b91c1c; border-color: #f87171; }

#jobBar {
  flex-shrink: 0;
  margin: 0 0 8px;
  padding: 8px 14px;
  background: #fef9c3;
  color: #713f12;
  border: 1px solid #eab308;
  border-radius: 8px;
  font-size: 0.82rem;
  display: none;
}
#jobBar.active { display: block; }

/* Karanlık tema — fatura ekranı */
html[data-theme="dark"] .isnet-shell {
  background: #1e293b;
  border-color: #334155;
}
html[data-theme="dark"] .isnet-main { background: #0f172a; }
html[data-theme="dark"] .isnet-title-bar {
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
  border-bottom-color: #475569;
}
html[data-theme="dark"] .isnet-title-bar h1 { color: #f1f5f9; }
html[data-theme="dark"] .isnet-filter-bar {
  background: #1e293b;
  border-bottom-color: #475569;
}
html[data-theme="dark"] .isnet-filter-lbl,
html[data-theme="dark"] .isnet-page-info { color: #94a3b8; }
html[data-theme="dark"] .isnet-filter-date,
html[data-theme="dark"] .isnet-filter-select {
  background: #0f172a;
  color: #f1f5f9;
  border-color: #475569;
}
html[data-theme="dark"] .isnet-table-wrap { background: #111827; }
html[data-theme="dark"] table.isnet-table { color: #e2e8f0; }
html[data-theme="dark"] table.isnet-table th,
html[data-theme="dark"] table.isnet-table td {
  color: #e2e8f0;
  border-color: #334155;
}
html[data-theme="dark"] table.isnet-table th {
  background: #1e293b;
  color: #f8fafc;
}
html[data-theme="dark"] table.isnet-table tbody tr:nth-child(even) td {
  background: #1a2332;
  color: #e2e8f0;
}
html[data-theme="dark"] table.isnet-table tbody tr:nth-child(odd) td {
  background: #111827;
  color: #e2e8f0;
}
html[data-theme="dark"] table.isnet-table tbody tr:hover td {
  background: #1e3a5f !important;
  color: #f8fafc !important;
}
html[data-theme="dark"] table.isnet-table b { color: #f8fafc; }
html[data-theme="dark"] .isnet-footer {
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
  border-top-color: #475569;
}
html[data-theme="dark"] .isnet-btn {
  background: #1e293b;
  color: #f1f5f9;
  border-color: #475569;
}
html[data-theme="dark"] .isnet-btn:hover { background: #334155; }
html[data-theme="dark"] #jobBar {
  background: #422006;
  color: #fde68a;
  border-color: #b45309;
}

/* Modal — İşnet indir */
.isnet-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.isnet-modal-backdrop.open { display: flex; }
.isnet-modal {
  width: min(520px, 100%);
  background: #f8fafc;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,.25);
  color: #1e293b;
}
.isnet-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
}
.isnet-modal-head button {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}
.isnet-modal-body { padding: 16px 18px 18px; color: #1e293b; }
.isnet-modal-body label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  margin: 12px 0 4px;
  color: #475569;
}
.isnet-modal-body input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font: inherit;
  background: #fff;
  color: #0f172a;
}
.isnet-modal-body .row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.isnet-modal-body .hint {
  font-size: 0.76rem;
  color: #64748b;
  margin-top: 10px;
  line-height: 1.4;
}
.isnet-modal-body .save-link { font-size: 0.76rem; margin-top: 6px; }
.isnet-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 18px 16px;
}
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 40px; }
.pw-wrap button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
}
html[data-theme="dark"] .isnet-modal {
  background: #1e293b;
  color: #f1f5f9;
}
html[data-theme="dark"] .isnet-modal-body { color: #f1f5f9; }
html[data-theme="dark"] .isnet-modal-body label { color: #94a3b8; }
html[data-theme="dark"] .isnet-modal-body input {
  background: #0f172a;
  color: #f1f5f9;
  border-color: #475569;
}

/* İşlem takip modalı */
.isnet-track-modal {
  width: min(720px, 96vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
.isnet-track-log {
  flex: 1;
  min-height: 280px;
  max-height: 58vh;
  overflow-y: auto;
  padding: 14px 16px;
  background: #fff;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  color: #78350f;
}
.isnet-track-log .tl-line { margin: 2px 0; white-space: pre-wrap; word-break: break-word; }
.isnet-track-log .tl-head { color: #1e40af; font-weight: 700; }
.isnet-track-log .tl-ok { color: #166534; }
.isnet-track-log .tl-skip { color: #92400e; }
.isnet-track-log .tl-active { color: #1d4ed8; font-weight: 700; }
.isnet-track-log .tl-err { color: #b91c1c; font-weight: 600; }
.isnet-track-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #f1f5f9;
  border-top: 1px solid #cbd5e1;
}
.isnet-track-autoscroll {
  font-size: 0.82rem;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
html[data-theme="dark"] .isnet-track-log {
  background: #0f172a;
  color: #fde68a;
}
html[data-theme="dark"] .isnet-track-log .tl-active { color: #93c5fd; }
html[data-theme="dark"] .isnet-track-foot { background: #1e293b; border-top-color: #334155; }
html[data-theme="dark"] .isnet-track-autoscroll { color: #e2e8f0; }

@media (max-width: 800px) {
  .isnet-shell { flex-direction: column; }
  .isnet-side-tabs { width: 100%; flex-direction: row; }
  .isnet-tab { flex: 1; border-bottom: 0; border-right: 1px solid #4a5866; }
}
