:root {
  --brand-1: #4338ca;
  --brand-2: #0ea5e9;
  --brand-gradient: linear-gradient(135deg, var(--brand-1), var(--brand-2));
}

body { background: #f4f6f9; }

/* --- Navbar & hero ------------------------------------------------- */

.app-navbar {
  background: var(--brand-gradient) !important;
  box-shadow: 0 2px 10px rgba(67, 56, 202, 0.25);
}
.app-navbar .navbar-brand i { margin-right: .4rem; }

.hero-banner {
  background: var(--brand-gradient);
  color: #fff;
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 8px 24px rgba(67, 56, 202, 0.2);
}
.hero-banner .live-indicator { color: #fff; }

/* --- Stat cards ------------------------------------------------------ */

.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  gap: .9rem;
  height: 100%;
  box-shadow: 0 2px 10px rgba(20, 20, 43, 0.06);
  transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(20, 20, 43, 0.1); }
.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  background: currentColor;
  opacity: .95;
}
.stat-icon i { color: #fff; }
.stat-icon.text-primary { background: var(--brand-1); }
.stat-icon.text-success { background: #198754; }
.stat-icon.text-warning { background: #fd7e14; }
.stat-icon.text-danger { background: #dc3545; }
.stat-icon.text-secondary { background: #6c757d; }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: .78rem; color: #6c757d; }

/* --- Avatars ----------------------------------------------------------- */

.avatar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
}

/* --- My status card (employee portal) ----------------------------------- */

.my-status-card { border-top: 4px solid var(--brand-2); border-radius: 12px; }
.my-status-card.row-flagged { border-top-color: #dc3545; }

/* --- Auth pages (login / 2FA) ------------------------------------------- */

.auth-body {
  min-height: 100vh;
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.auth-wrap { width: 100%; max-width: 420px; }
.auth-card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem 2rem 1.75rem;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.auth-brand { text-align: center; margin-bottom: 1.5rem; }
.auth-brand-icon {
  width: 56px; height: 56px;
  margin: 0 auto .6rem;
  border-radius: 14px;
  background: var(--brand-gradient);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.auth-brand-name { font-weight: 700; }
.auth-brand-sub { color: #6c757d; font-size: .85rem; }
.auth-footer { text-align: center; margin-top: 1rem; }
.auth-footer a { color: #fff; opacity: .85; font-size: .85rem; text-decoration: none; }
.auth-footer a:hover { opacity: 1; text-decoration: underline; }

.totp-input {
  letter-spacing: .6em;
  font-size: 1.6rem;
  font-weight: 700;
  text-indent: .6em; /* re-center against the trailing letter-spacing gap */
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}
.status-dot.working { background: #198754; }
.status-dot.on_break { background: #fd7e14; }
.status-dot.clocked_out { background: #6c757d; }
.status-dot.not_clocked_in { background: #adb5bd; }

.row-flagged { background-color: #f8d7da !important; }

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
}
.live-indicator .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #198754;
  box-shadow: 0 0 0 rgba(25,135,84,.6);
  animation: pulse 1.6s infinite;
}
.live-indicator.offline .pulse {
  background: #dc3545;
  animation: none;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(25,135,84,.55); }
  70%  { box-shadow: 0 0 0 8px rgba(25,135,84,0); }
  100% { box-shadow: 0 0 0 0 rgba(25,135,84,0); }
}

.break-over { color: #dc3545; font-weight: 600; }

.report-flag-badge { font-size: 0.75rem; }
