:root {
  --bg: #eef2f5;
  --ink: #1f2933;
  --panel: #ffffff;
  --brand: #0b4f6c;
  --good: #1d8847;
  --warn: #b85e00;
  --bad: #b42318;
  --muted: #52606d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Tahoma, Arial, sans-serif;
  background: linear-gradient(140deg, #e8edf2, #f8fafc);
  color: var(--ink);
}

.topbar {
  background: #113a52;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
}

h1,
h2 {
  margin: 0;
}

.status-strip,
.input-panel,
.filter-panel,
.dash-row,
.bottombar {
  background: var(--panel);
  margin: 10px 14px;
  border: 1px solid #d9e2ec;
  border-radius: 10px;
  padding: 10px 14px;
}

.status-strip,
.input-panel,
.filter-panel,
.dash-row,
.bottombar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-strip {
  justify-content: flex-start;
}

.status-badge {
  font-weight: bold;
}

.input-panel label,
.filter-panel label {
  font-weight: bold;
}

#searchInput,
#filterInput,
.modal-card input {
  border: 1px solid #bcccdc;
  border-radius: 8px;
  padding: 9px;
  font-size: 16px;
}

#searchInput {
  flex: 1;
}

.table-wrap {
  margin: 10px 14px;
  border: 1px solid #d9e2ec;
  border-radius: 10px;
  background: white;
  overflow: auto;
  max-height: 55vh;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: #114b5f;
  color: white;
  position: sticky;
  top: 0;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid #e4e7eb;
  text-align: center;
  white-space: nowrap;
}

td.name-ar,
td.name-en {
  text-align: right;
}

.action-cell {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.btn {
  border: 0;
  border-radius: 8px;
  color: white;
  padding: 9px 14px;
  cursor: pointer;
  font-weight: bold;
}

.btn-primary {
  background: #166088;
}

.btn-success {
  background: #1f9d55;
}

.btn-warning {
  background: #c26b00;
}

.btn-secondary {
  background: #627d98;
}

.btn-danger {
  background: #c0392b;
}

.btn-sm {
  padding: 5px 8px;
}

#appStatus {
  margin-inline-start: auto;
  font-weight: bold;
  color: var(--muted);
}

.dash-row {
  background: #133b5c;
  color: white;
  justify-content: space-between;
  font-weight: bold;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.hidden {
  display: none;
}

.modal-card {
  background: white;
  width: min(500px, 96vw);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 8px;
  max-height: 88vh;
  overflow: auto;
}

.modal-card.large {
  width: min(900px, 96vw);
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.click-edit {
  cursor: pointer;
  font-weight: bold;
}

@media (max-width: 900px) {
  .status-strip,
  .input-panel,
  .filter-panel,
  .dash-row,
  .bottombar {
    flex-wrap: wrap;
  }

  th,
  td {
    font-size: 13px;
    padding: 8px 5px;
  }
}
