/* HP Clothing Payroll — self-contained stylesheet (no external CDN dependency,
   so the app renders correctly even on networks without internet access). */

:root {
  --primary: #2f5d9c;
  --primary-dark: #23477a;
  --dark: #212529;
  --muted: #6c757d;
  --border: #dee2e6;
  --bg: #f6f7f9;
  --success: #198754;
  --success-bg: #d1e7dd;
  --danger: #dc3545;
  --danger-bg: #f8d7da;
  --warning: #997404;
  --warning-bg: #fff3cd;
  --info: #087990;
  --info-bg: #cff4fc;
  --secondary: #565e64;
  --secondary-bg: #e2e3e5;
}

* { box-sizing: border-box; }

body {
  background-color: var(--bg);
  color: var(--dark);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  margin: 0;
  line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h4, h5, h6 { margin-top: 0; font-weight: 600; }

/* Layout */
.container-fluid { width: 100%; padding-left: 1rem; padding-right: 1rem; }
.px-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }

.row { display: flex; flex-wrap: wrap; margin-left: -0.5rem; margin-right: -0.5rem; }
.row > [class*="col"] { padding-left: 0.5rem; padding-right: 0.5rem; }
.col-auto { flex: 0 0 auto; width: auto; }
.col-md-3 { flex: 0 0 100%; max-width: 100%; }
.col-md-4 { flex: 0 0 100%; max-width: 100%; }
.col-md-6 { flex: 0 0 100%; max-width: 100%; }
@media (min-width: 768px) {
  .col-md-3 { flex: 0 0 25%; max-width: 25%; }
  .col-md-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
}
.g-2 > [class*="col"] { margin-bottom: 0.5rem; }
.g-3 > [class*="col"] { margin-bottom: 1rem; }

.d-flex { display: flex; }
.d-inline { display: inline-block; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }
.gap-2 { gap: 0.5rem; }

.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-5 { margin-top: 3rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.w-100 { width: 100%; }

/* Text */
.text-center { text-align: center; }
.text-end { text-align: right; }
.text-muted { color: var(--muted); }
.text-dark { color: var(--dark) !important; }
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.fs-3 { font-size: 1.75rem; }
.fs-5 { font-size: 1.15rem; }
.small { font-size: 0.85rem; }

/* Card */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

/* Navbar */
.navbar { display: flex; align-items: center; padding: 0.7rem 1.5rem; }
.navbar-dark.bg-dark { background-color: var(--dark) !important; }
.navbar-brand { color: #fff !important; font-weight: 700; font-size: 1.15rem; margin-right: 1.5rem; }
.navbar-toggler {
  display: none; background: transparent; border: 1px solid rgba(255,255,255,.4);
  border-radius: 4px; padding: .3rem .5rem; cursor: pointer;
}
.navbar-toggler-icon {
  display: inline-block; width: 1.2em; height: 1.2em;
  background: none; position: relative;
}
.navbar-toggler-icon::before {
  content: "\2630"; color: #fff; font-size: 1.1rem;
}
.navbar-collapse { display: flex; flex: 1; justify-content: space-between; align-items: center; }
.navbar-nav { display: flex; list-style: none; margin: 0; padding: 0; gap: 0.25rem; }
.navbar-nav .nav-link { color: rgba(255,255,255,.85) !important; padding: 0.4rem 0.7rem; border-radius: 4px; }
.navbar-nav .nav-link:hover { background: rgba(255,255,255,.1); text-decoration: none; }
.me-auto { margin-right: auto; }
@media (max-width: 767px) {
  .navbar-toggler { display: inline-block; }
  .navbar-collapse { display: none; flex-direction: column; align-items: stretch; width: 100%; }
  .navbar-collapse.open { display: flex; }
  .navbar-nav { flex-direction: column; }
}

/* Alerts */
.alert {
  padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem;
  border: 1px solid transparent; display: flex; justify-content: space-between; align-items: center;
}
.alert-success { background: var(--success-bg); color: #0a3622; border-color: #a3cfbb; }
.alert-danger { background: var(--danger-bg); color: #58151c; border-color: #f1aeb5; }
.alert-warning { background: var(--warning-bg); color: #664d03; border-color: #ffe69c; }
.btn-close {
  background: transparent; border: none; font-size: 1.1rem; line-height: 1; cursor: pointer;
  color: inherit; opacity: 0.6;
}
.btn-close:hover { opacity: 1; }

/* Buttons */
.btn {
  display: inline-block; font-weight: 500; text-align: center; vertical-align: middle;
  border: 1px solid transparent; padding: 0.45rem 0.9rem; font-size: 0.95rem;
  border-radius: 6px; cursor: pointer; transition: all .1s ease-in-out;
}
.btn-sm { padding: 0.28rem 0.6rem; font-size: 0.82rem; border-radius: 5px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-outline-primary { border-color: var(--primary); color: var(--primary); background: #fff; }
.btn-outline-secondary { border-color: #adb5bd; color: var(--secondary); background: #fff; }
.btn-outline-success { border-color: var(--success); color: var(--success); background: #fff; }
.btn-outline-danger { border-color: var(--danger); color: var(--danger); background: #fff; }
.btn-outline-warning { border-color: #ffca2c; color: var(--warning); background: #fff; }
.btn-outline-primary:hover { background: var(--primary); color: #fff; text-decoration: none; }
.btn-outline-secondary:hover { background: #e9ecef; text-decoration: none; }
.btn-outline-success:hover { background: var(--success); color: #fff; text-decoration: none; }
.btn-outline-danger:hover { background: var(--danger); color: #fff; text-decoration: none; }
.btn-outline-warning:hover { background: #ffca2c; text-decoration: none; }

/* Badges */
.badge { display: inline-block; padding: 0.3em 0.55em; font-size: 0.75em; font-weight: 600; border-radius: 4px; color: #fff; }
.bg-info { background: var(--info); }
.bg-secondary { background: var(--secondary); }
.bg-success { background: var(--success); }
.bg-warning { background: #ffc107; }
.bg-warning.text-dark { color: #212529 !important; }
.status-badge { font-size: 0.75rem; }

/* Forms */
label.form-label { display: block; margin-bottom: 0.3rem; font-weight: 500; font-size: 0.9rem; }
.form-control, .form-select {
  display: block; width: 100%; padding: 0.45rem 0.7rem; font-size: 0.95rem;
  border: 1px solid #ced4da; border-radius: 6px; background: #fff; color: var(--dark);
}
.form-control:focus, .form-select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,93,156,.15);
}
.form-control-sm, .form-select-sm { padding: 0.3rem 0.5rem; font-size: 0.85rem; }
.form-check { display: flex; align-items: center; gap: 0.4rem; }
.form-check-input { width: 1.05rem; height: 1.05rem; }
.form-check-label { font-size: 0.9rem; }

/* Tables */
.table-responsive { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
table.table th, table.table td { padding: 0.6rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.table thead th { border-bottom: 2px solid var(--border); font-weight: 600; text-align: left; color: #495057; }
table.table-sm th, table.table-sm td { padding: 0.4rem 0.5rem; }
table.table-hover tbody tr:hover { background-color: #f8f9fa; }
table.table tfoot td { font-weight: 700; background-color: #f1f3f5; border-top: 2px solid var(--border); }
.align-middle td, .align-middle th { vertical-align: middle; }
