/* =========================================================
   KAOKAB5GC – Tables & Data Grids (BODY + LAYOUT ONLY)
   ========================================================= */

/* ================= TABLE WRAPS ================= */

.table-wrap {
  overflow-x: auto;
}

.panel-scroll,
.subscribers-scroll {
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;

  scrollbar-width: thin;
  scrollbar-color: rgba(255,165,0,0.75) rgba(255,255,255,0.06);
}

/* ================= TABLE HEADERS – TELCO FIELD STYLE (ENHANCED) ================= */

/* Base header style – all tables */
.status-table thead th,
.ran-table thead th,
.events-table thead th,
.alarms-table thead th {
  position: relative;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #e5e7eb;
  text-align: left;
  white-space: nowrap;

  background: linear-gradient(
    180deg,
    rgba(22,30,52,0.98),
    rgba(12,18,34,0.98)
  );

  border-bottom: 1px solid rgba(255,255,255,0.10);

  /* subtle depth */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 -1px 0 rgba(0,0,0,0.4);
}

/* RIGHT vertical separator */
.status-table thead th:not(:last-child)::after,
.ran-table thead th:not(:last-child)::after,
.events-table thead th:not(:last-child)::after,
.alarms-table thead th:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 18%;
  height: 64%;
  width: 1px;

  background: linear-gradient(
    180deg,
    rgba(255,165,0,0.15),
    rgba(255,165,0,0.55),
    rgba(255,165,0,0.15)
  );

  box-shadow:
    0 0 6px rgba(255,165,0,0.35);
}

/* LEFT separator for FIRST column (fix missing one) */
.status-table thead th:first-child::before,
.ran-table thead th:first-child::before,
.events-table thead th:first-child::before,
.alarms-table thead th:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  height: 64%;
  width: 1px;

  background: linear-gradient(
    180deg,
    rgba(255,165,0,0.15),
    rgba(255,165,0,0.55),
    rgba(255,165,0,0.15)
  );

  box-shadow:
    0 0 6px rgba(255,165,0,0.35);
}


/* ================= STATUS TABLE (SUBSCRIBERS) ================= */

.status-table {
  width: 100%;
  border-collapse: collapse;
}

.status-table tbody td {
  padding: 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}

.status-table tbody tr:hover {
  background: rgba(255,255,255,0.03);
}

/* ================= RAN TABLE ================= */

.ran-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.ran-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #1f2a37;
  white-space: nowrap;
  vertical-align: middle;
}

.ran-table .reason {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ================= EVENTS TABLE ================= */

.events-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.events-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.event-info td     { color: #cfd8dc; }
.event-warning td  { color: #ffb703; font-weight: 500; }
.event-critical td { color: #ff4d4f; font-weight: 600; }

/* ================= ACTIVE ALARMS TABLE ================= */

.alarms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.alarms-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.alarm-critical { background: rgba(239,68,68,0.06); }
.alarm-acked    { background: rgba(245,158,11,0.06); }

/* ================= ACTION BUTTONS ================= */

.actions-cell {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.btn-edit,
.btn-delete {
  height: 26px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 3px;
  border: none;
  cursor: pointer;
}

.btn-edit   { background: #374151; color: #e5e7eb; }
.btn-delete { background: #c62828; color: #fff; }

.btn-edit:hover   { background: #4b5563; }
.btn-delete:hover { background: #e53935; }
/* ======================================================
   FORCE UNIFIED TABLE HEADER STYLE (RAN FIX)
====================================================== */

/* Override generic .card table header ONLY for data tables */
.card .ran-table thead th,
.card .status-table thead th,
.card .events-table thead th,
.card .alarms-table thead th {
  position: relative;
  padding: 12px 16px !important;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #e5e7eb;

  background: linear-gradient(
    180deg,
    rgba(22,30,52,0.98),
    rgba(12,18,34,0.98)
  ) !important;

  border-bottom: 1px solid rgba(255,255,255,0.10);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 -1px 0 rgba(0,0,0,0.4);
}
/* ================= ROW HOVER – ALL TABLES ================= */

.status-table tbody tr:hover,
.ran-table tbody tr:hover,
.events-table tbody tr:hover,
.alarms-table tbody tr:hover {
  background: linear-gradient(
    90deg,
    rgba(255,165,0,0.08),
    rgba(255,255,255,0.03)
  );
}
