/* ===== Base Layout ===== */
body { 
  font-family: Arial, sans-serif; 
  background: #f4f6f9; 
  margin: 0; 
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Top Bar ===== */
.topbar {
  background: linear-gradient(90deg, #1e3c72, #2a5298);
  color: white;
  padding: 18px 30px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Search inside header */
.topbar input {
  padding: 10px 14px;
  width: 280px;
  border-radius: 8px;
  border: none;
  outline: none;
  background: rgba(255,255,255,0.15);
  color: white;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.topbar input::placeholder {
  color: rgba(255,255,255,0.7);
}

.topbar input:focus {
  background: rgba(255,255,255,0.25);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
}

/* ===== Main Container ===== */
.container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ===== Table Wrapper (Scroll Area) ===== */
.table-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 30px 20px 30px;
}

/* Separate header from body */
.table-header {
  width: 100%;
  border-collapse: collapse;
}

.table-body {
  flex: 1;
  overflow-y: scroll;   /* force scrollbar always */
}

.table-body table {
  width: 100%;
  border-collapse: collapse;
}

/* ===== Table Styling ===== */
table {
  width: 100%;
  border-collapse: collapse;  /* IMPORTANT for clean grid */
  background: white;
  border: 1px solid #cfd6e4;
}

/* Header */
th {
  background: #2a5298;
  color: white;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px;
  text-align: center;   /* center headers */
  border-right: 1px solid rgba(255,255,255,0.2);
}

/* Cells */
td {
  padding: 14px;
  border-bottom: 1px solid #cfd6e4;
  border-right: 1px solid #e5e9f2;
  font-size: 14px;
  text-align: center;   /* center all body cells */
}

/* Zebra striping */
tr:nth-child(even) {
  background: #fafbfd;
}

/* Hover effect */
tr:hover {
  background: #eaf1ff;
  transition: background 0.15s ease;
}

/* Strong number column */
td:last-child {
  font-weight: 600;
  color: #1e3c72;
  text-align: center;   /* force center */
}

/* ===== Login Page ===== */
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.login-box {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.login-box input {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

th:first-child,
td:first-child {
  border-left: 1px solid #cfd6e4;
}

.table-header,
.table-body table {
  width: 100%;
  table-layout: fixed;   /* 🔥 IMPORTANT */
}

/* Define exact column widths */
.table-header th:nth-child(1),
.table-body td:nth-child(1) {
  width: 15%;
}

.table-header th:nth-child(2),
.table-body td:nth-child(2) {
  width: 35%;
}

.table-header th:nth-child(3),
.table-body td:nth-child(3) {
  width: 15%;
}

.table-header th:nth-child(4),
.table-body td:nth-child(4) {
  width: 15%;
}

.table-header th:nth-child(5),
.table-body td:nth-child(5) {
  width: 20%;
}

.table-header th:last-child,
.table-body td:last-child {
  border-right: none;
}

#disabledBtn {
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 18px;
  line-height: 1;
  transition: all 0.2s ease;
}

#disabledBtn:hover {
  background: rgba(255,255,255,0.25);
}

#disabledModal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}

#modalContent {
  width: min(900px, 95vw);
  max-height: 85vh;
  overflow: hidden;
  background: #f8fafc;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  border: 1px solid #cfd6e4;
  display: flex;
  flex-direction: column;
}

#modalHeader {
  background: linear-gradient(90deg, #1e3c72, #2a5298);
  color: white;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#modalHeader h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

#closeModalBtn {
  border: none;
  background: rgba(255,255,255,0.15);
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

#closeModalBtn:hover {
  background: rgba(255,255,255,0.25);
}

#disabledListWrap {
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.disabled-search-bar {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 1;
  padding-bottom: 10px;
}

.list-scroll {
  flex: 1;
  overflow-y: auto;
}

#disabledList {
  list-style: none;
  margin: 0;
  padding: 0;
}

#disabledList li {
  background: white;
  border: 1px solid #d9e1ee;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  font-size: 15px;
  color: #1e293b;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

#disabledList li:nth-child(even) {
  background: #f8fbff;
}

.disabled-search-bar {
  margin-bottom: 16px;
}

#disabledSearch {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #cfd6e4;
  outline: none;
  font-size: 14px;
  background: white;
  color: #1e293b;
  transition: all 0.2s ease;
}

#disabledSearch::placeholder {
  color: #94a3b8;
}

#disabledSearch:focus {
  border-color: #2a5298;
  box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.12);
}

#logoutBtn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  text-decoration: none;
  background: rgba(255,255,255,0.15);
  color: #ff4d4f;
  font-size: 20px;
  font-weight: bold;
  transition: all 0.2s ease;
}

#logoutBtn:hover {
  background: rgba(255,255,255,0.25);
  color: #ff1f1f;
}