/* ── BillZen v3 Components ───────────────────────────────────── */

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: var(--t-base);
}
.card:hover { box-shadow: var(--shadow-md); }
.card.p0 { padding: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: 13px;
  transition: var(--t-fast);
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  line-height: 1;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.25);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.35);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--primary-bg);
  color: var(--primary-dark);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--primary-bg2);
}

.btn-white {
  background: #ffffff;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-white:hover:not(:disabled) {
  border-color: var(--border2);
  background: var(--surface2);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1.5px solid #fecaca;
}
.btn-danger:hover:not(:disabled) {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-full { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 14px; }

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(1);
}

/* Inputs */
.ffield { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.ffield label {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.inp {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 13.5px;
  color: var(--text);
  transition: var(--t-fast);
}
.inp:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}
.inp::placeholder { color: var(--text3); }

/* Tables */
.tbl-wrap { overflow-x: auto; width: 100%; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th {
  background: #f8fafc;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
}
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface2); }

/* Pills */
.pill {
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
}
.pill-paid { background: #dcfce7; color: #166534; }
.pill-unpaid { background: #fee2e2; color: #991b1b; }
.pill-partial { background: #fef9c3; color: #854d0e; }
.pill-draft { background: #f1f5f9; color: #475569; }

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.4;
}
.alert-info { background: var(--info-bg); color: #075985; border: 1px solid #bae6fd; }
.alert-warning { background: var(--warning-bg); color: #92400e; border: 1px solid #fde68a; }
.alert-error { background: var(--danger-bg); color: #991b1b; border: 1px solid #fecaca; }
