:root {
  --bg: #0d1515;
  --panel: rgba(13, 25, 26, 0.88);
  --panel-strong: #112022;
  --line: rgba(180, 214, 209, 0.14);
  --text: #f2f6f3;
  --muted: #9ab4ae;
  --brand: #7ce0ba;
  --brand-deep: #175d52;
  --warn: #f3b562;
  --danger: #ff7b72;
  --success: #61d095;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(124, 224, 186, 0.14), transparent 28%),
    radial-gradient(circle at left center, rgba(243, 181, 98, 0.12), transparent 28%),
    linear-gradient(180deg, #0d1515 0%, #081011 100%);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
}

.hero h1,
.section-head h2,
.details-head h2 {
  margin: 0;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  max-width: 780px;
}

.hero-copy {
  max-width: 780px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.hero-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #607375;
  box-shadow: 0 0 0 8px rgba(96, 115, 117, 0.18);
}

.status-dot.live {
  background: var(--success);
  box-shadow: 0 0 0 8px rgba(97, 208, 149, 0.18);
}

.status-dot.error {
  background: var(--danger);
  box-shadow: 0 0 0 8px rgba(255, 123, 114, 0.18);
}

.layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
}

.card,
.details-shell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.card {
  padding: 22px;
}

.section-head,
.details-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.stack {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.field-hint {
  margin: -4px 2px 4px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(188, 215, 211, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(124, 224, 186, 0.45);
  box-shadow: 0 0 0 4px rgba(124, 224, 186, 0.12);
}

textarea {
  resize: vertical;
}

.primary-button,
.ghost-button {
  border: 0;
  border-radius: 16px;
  padding: 13px 18px;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--brand) 0%, #51cfa4 100%);
  color: #072017;
  font-weight: 700;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--line);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.hidden {
  display: none !important;
}

.user-card,
.message {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
}

.user-card {
  background: rgba(124, 224, 186, 0.08);
  border: 1px solid rgba(124, 224, 186, 0.18);
}

.message {
  background: rgba(255, 123, 114, 0.08);
  border: 1px solid rgba(255, 123, 114, 0.18);
  color: #ffd7d2;
}

.workspace {
  display: grid;
  gap: 24px;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.stat-card h3 {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.8rem;
}

.table-card {
  overflow: hidden;
  padding: 0;
}

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

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

thead tr {
  background: rgba(255, 255, 255, 0.04);
}

th,
td {
  padding: 16px 20px;
  text-align: right;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

tbody tr {
  transition: background 0.18s ease;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.subtle {
  color: var(--muted);
  font-size: 0.82rem;
}

.mono {
  font-family: "IBM Plex Mono", "Consolas", monospace;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.badge.pending {
  background: rgba(243, 181, 98, 0.14);
  color: #ffd8a6;
  border-color: rgba(243, 181, 98, 0.22);
}

.badge.approved {
  background: rgba(97, 208, 149, 0.14);
  color: #caf6dd;
  border-color: rgba(97, 208, 149, 0.22);
}

.badge.rejected,
.badge.cancelled {
  background: rgba(255, 123, 114, 0.14);
  color: #ffd4cf;
  border-color: rgba(255, 123, 114, 0.22);
}

.badge.paid {
  background: rgba(97, 208, 149, 0.14);
  color: #caf6dd;
}

.badge.unpaid {
  background: rgba(243, 181, 98, 0.14);
  color: #ffd8a6;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
}

.pager {
  display: flex;
  gap: 10px;
}

.details-panel {
  position: fixed;
  inset: 0;
  background: rgba(5, 11, 11, 0.64);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.details-panel.open {
  opacity: 1;
  visibility: visible;
}

.details-shell {
  width: min(880px, calc(100% - 24px));
  height: calc(100vh - 24px);
  margin: 12px auto;
  padding: 24px;
  overflow: auto;
}

.details-content,
.review-card {
  display: grid;
  gap: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.detail-card,
.service-card,
.review-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.detail-card h3,
.service-card h3,
.review-card h3 {
  margin: 0 0 12px;
  font-size: 0.96rem;
}

.detail-card p,
.service-card p {
  margin: 6px 0;
  color: var(--muted);
}

.detail-card strong,
.service-card strong {
  color: var(--text);
}

.service-list {
  display: grid;
  gap: 12px;
}

.service-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wide {
  grid-column: span 2;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(14, 27, 27, 0.95);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .filters-grid,
  .stats-grid,
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 20px, 100%);
    padding-top: 20px;
  }

  .hero {
    flex-direction: column;
  }

  .filters-grid,
  .stats-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .wide {
    grid-column: auto;
  }

  th,
  td {
    padding: 14px;
  }

  .table-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .pager {
    width: 100%;
  }

  .pager button {
    flex: 1;
  }
}
