/* =========================================================
   Emug Hardware POS — UI Theme Enhancements
   Tables + small UI polish (Tabler-friendly)
   ========================================================= */

/* ---------- Base page polish ---------- */
:root{
  --ui-bg: #f7f9fc;
  --ui-border: #e6edf5;
  --ui-text: #0f172a;
  --ui-muted: #64748b;

  --ui-primary: #2563eb;
  --ui-primary-soft: rgba(37, 99, 235, .10);

  --ui-success: #16a34a;
  --ui-success-soft: rgba(22, 163, 74, .12);

  --ui-warning: #f59e0b;
  --ui-warning-soft: rgba(245, 158, 11, .14);

  --ui-danger: #ef4444;
  --ui-danger-soft: rgba(239, 68, 68, .12);
}

.page-wrapper{
  background: var(--ui-bg);
}

/* ---------- TABLE THEME (GLOBAL) ---------- */
/* Works with Tabler `.table` and your normal tables */
.table{
  background: #fff;
  border: 1px solid var(--ui-border);
  border-radius: 14px;
  overflow: hidden;              /* ensures rounded corners show */
  margin-bottom: 0;
}

.table thead th{
  background: linear-gradient(180deg, #ffffff 0%, #f3f7ff 100%);
  color: var(--ui-text);
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  border-bottom: 1px solid var(--ui-border) !important;
  padding: 12px 14px !important;
  white-space: nowrap;
}

.table tbody td{
  padding: 12px 14px !important;
  border-bottom: 1px solid rgba(230, 237, 245, .9) !important;
  color: #0f172a;
  vertical-align: middle;
}

/* Zebra rows (soft) */
.table tbody tr:nth-child(even){
  background: rgba(15, 23, 42, .02);
}

/* Hover state (clean highlight + left accent) */
.table tbody tr{
  transition: background-color .12s ease, box-shadow .12s ease;
}
.table tbody tr:hover{
  background: rgba(37, 99, 235, .06) !important;
  box-shadow: inset 3px 0 0 0 var(--ui-primary);
}

/* Remove last bottom border */
.table tbody tr:last-child td{
  border-bottom: 0 !important;
}

/* Compact tables (optional class you can add) */
.table.table-compact thead th,
.table.table-compact tbody td{
  padding: 9px 12px !important;
}

/* ---------- TABLE WRAPPER CARD (nice default) ---------- */
.table-card{
  background: #fff;
  border: 1px solid var(--ui-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.table-card .table{
  border: 0;
  border-radius: 0;
}

/* ---------- Badges / statuses ---------- */
.badge-soft{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .02em;
}

.badge-soft.success{ background: var(--ui-success-soft); color: var(--ui-success); }
.badge-soft.warning{ background: var(--ui-warning-soft); color: #92400e; }
.badge-soft.danger { background: var(--ui-danger-soft);  color: var(--ui-danger); }
.badge-soft.primary{ background: var(--ui-primary-soft); color: var(--ui-primary); }

/* ---------- Buttons inside tables ---------- */
.table .btn{
  border-radius: 12px;
  font-weight: 800;
}

.table .btn.btn-primary{
  background: var(--ui-primary);
  border-color: var(--ui-primary);
}
.table .btn.btn-primary:hover{
  filter: brightness(.92);
}

/* ---------- Table action links ---------- */
.table a{
  text-decoration: none;
  font-weight: 700;
}
.table a:hover{
  text-decoration: underline;
}
