:root {
  --bg-main: #050c1f;
  --bg-card: rgba(10, 23, 52, 0.88);
  --bg-card-solid: #0c1a3b;
  --bg-card-hover: rgba(18, 38, 82, 0.94);
  --bg-input: rgba(7, 17, 40, 0.92);
  --border: rgba(56, 189, 248, 0.18);
  --border-strong: rgba(56, 189, 248, 0.32);
  --border-focus: #38bdf8;

  --evn-blue: #163a8c;
  --evn-blue-bright: #2563eb;
  --evn-red: #e61e25;
  --evn-red-bright: #ff3b42;
  --evn-yellow: #ffea00;

  --text-main: #f8fafc;
  --text-muted: #93b4d8;
  --text-dim: #6482a8;

  --color-green: #10b981;
  --color-green-light: #34d399;
  --color-green-glow: rgba(16, 185, 129, 0.42);
  --color-red: #e61e25;
  --color-red-glow: rgba(230, 30, 37, 0.42);
  --color-blue: #2563eb;
  --color-cyan: #0ea5e9;
  --color-purple: #8b5cf6;
  --color-amber: #f59e0b;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  --shadow-card: 0 16px 40px -10px rgba(2, 8, 28, 0.72), inset 0 1px 0 rgba(125, 211, 252, 0.1);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  background-image:
    radial-gradient(ellipse 85% 52% at 50% -12%, rgba(22, 58, 140, 0.52), transparent 72%),
    radial-gradient(ellipse 55% 38% at 96% 18%, rgba(14, 165, 233, 0.16), transparent 65%),
    radial-gradient(ellipse 48% 36% at 4% 85%, rgba(230, 30, 37, 0.1), transparent 65%),
    linear-gradient(rgba(56, 189, 248, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.045) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 32px 32px, 32px 32px;
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
}

.power-grid-watermark {
  position: fixed;
  right: -18px;
  bottom: -14px;
  width: 300px;
  height: 390px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.48;
}

/* ================= EVN TRICOLOR RIBBON ================= */
.evn-tricolor-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #163a8c 0%, #2563eb 42%, #0ea5e9 58%, #e61e25 80%, #ffea00 100%);
  box-shadow: 0 1px 10px rgba(37, 99, 235, 0.55);
}

/* ================= HEADER ================= */
.app-header {
  background: rgba(6, 15, 38, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.24);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 10px;
}

.header-container {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1d4ed8 0%, #0f2c73 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-shadow: 0 0 0 1.5px rgba(56, 189, 248, 0.42), 0 4px 14px rgba(22, 58, 140, 0.55);
  flex-shrink: 0;
}

.evn-star-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand-title {
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #f8fafc;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.brand-evn-group {
  display: inline-flex;
  align-items: baseline;
}

.brand-app-tag {
  color: #f8fafc;
}

.evn-word {
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
}

.npc-word {
  color: #ff3b42;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.01em;
  text-shadow: 0 0 10px rgba(230, 30, 37, 0.42);
}

.brand-sep {
  color: #ffea00;
  margin: 0 1px;
}

.brand-subtitle {
  font-size: 0.69rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-top: 2px;
}

.brand-unit-sub {
  color: #7dd3fc;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.025em;
}

.login-evn-unit-pill {
  display: inline-block;
  margin: 5px auto 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.38), rgba(14, 165, 233, 0.25));
  border: 1px solid rgba(56, 189, 248, 0.55);
  color: #e0f2fe;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-user-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-header-action {
  padding: 6px 11px;
  font-size: 0.78rem;
  border-radius: 12px !important;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-header-logout {
  border-color: rgba(244, 63, 94, 0.36) !important;
  color: #fecdd3 !important;
  background: rgba(244, 63, 94, 0.12) !important;
}

.btn-header-logout:hover {
  background: rgba(244, 63, 94, 0.25) !important;
  border-color: rgba(251, 113, 133, 0.65) !important;
  color: #fff !important;
}

.user-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.82rem;
  min-width: 0;
}

.user-name {
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ================= CONTAINER ================= */
.main-wrapper {
  flex: 1;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px 40px;
  position: relative;
  z-index: 2;
}

/* ================= CARDS & LAYOUTS ================= */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}

/* ================= LOGIN VIEW (EVNNPC POWER PORTAL) ================= */
.login-container {
  max-width: 440px;
  margin: 26px auto 0;
}

.login-evn-card {
  position: relative;
  overflow: hidden;
  padding-top: 28px;
  border-color: rgba(56, 189, 248, 0.28);
  background: linear-gradient(180deg, rgba(14, 33, 76, 0.92) 0%, rgba(8, 19, 44, 0.94) 100%);
}

.login-evn-hero {
  position: relative;
  width: 78px;
  height: 78px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-evn-halo {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.45), rgba(230, 30, 37, 0.15) 60%, transparent 75%);
  animation: evn-pulse 3.2s ease-in-out infinite;
}

@keyframes evn-pulse {
  0%, 100% { transform: scale(0.96); opacity: 0.72; }
  50% { transform: scale(1.08); opacity: 1; }
}

.login-evn-svg {
  position: relative;
  z-index: 2;
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 6px 14px rgba(3, 12, 34, 0.65));
}

.login-evn-wordmark {
  font-size: 1.72rem;
  line-height: 1.05;
  letter-spacing: 0.03em;
  margin-bottom: 3px;
}

.login-evn-org {
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #7dd3fc;
  margin-bottom: 10px;
}

.login-header {
  text-align: center;
  margin-bottom: 22px;
}

.login-header h2 {
  font-size: 1.28rem;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.login-header p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.btn-evn-primary {
  background: linear-gradient(135deg, #163a8c 0%, #2563eb 55%, #0ea5e9 100%);
  border: 1px solid rgba(125, 211, 252, 0.35);
  box-shadow: 0 8px 22px rgba(22, 58, 140, 0.5);
}

.scada-telemetry-strip {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px dashed rgba(56, 189, 248, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #7dd3fc;
  opacity: 0.88;
}

.scada-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  margin-right: 4px;
  vertical-align: middle;
  animation: led-blink 1.8s ease-in-out infinite;
}

@keyframes led-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  margin-bottom: 7px;
  color: #cbd5e1;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 17px;
  color: var(--text-dim);
  pointer-events: none;
}

.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border-strong);
  color: #fff;
  font-size: 0.98rem;
  padding: 12px 14px 12px 42px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  outline: none;
  font-family: inherit;
}

.form-input.no-icon {
  padding-left: 14px;
}

textarea.form-input {
  padding: 12px 14px;
  resize: vertical;
  min-height: 88px;
  line-height: 1.5;
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
  background: #0f172a;
}

.toggle-pin-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  font-size: 16px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  cursor: pointer;
}

.checkbox-row input {
  accent-color: var(--color-green);
  width: 18px;
  height: 18px;
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  color: #fff;
  border: none;
  padding: 13px 20px;
  font-size: 0.98rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.22s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.32);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

/* ================= ALERT BOXES ================= */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.45;
}

.alert-danger {
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fda4af;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

.alert-success {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.alert-info {
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

/* ================= EMPLOYEE SUB-TABS ================= */
.employee-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-card);
  padding: 5px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}

.emp-tab-btn {
  flex: 1;
  padding: 10px 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.emp-tab-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(14, 165, 233, 0.2));
  color: #ffffff;
  border: 1px solid rgba(52, 211, 153, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.nav-badge {
  background: #f43f5e;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 19px;
  height: 19px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.5);
}

/* ================= ATTENDANCE VIEW ================= */
.attendance-container {
  max-width: 560px;
  margin: 0 auto;
}

.clock-card {
  text-align: center;
  padding: 16px 16px 20px;
  background: linear-gradient(180deg, rgba(15, 34, 78, 0.94) 0%, rgba(9, 20, 46, 0.92) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.clock-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #163a8c, #0ea5e9, #ffea00);
}

.scada-clock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.14);
}

.scada-clock-label {
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #7dd3fc;
}

.scada-freq-pill {
  font-size: 0.68rem;
  font-weight: 800;
  color: #fef08a;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.35);
  padding: 2px 8px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.live-time {
  font-size: 2.7rem;
  font-weight: 800;
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #ffffff 0%, #bae6fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.22));
}

.live-date {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.status-badge-container {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 600;
}

.status-chip.in-shift {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.55);
  color: #34d399;
}

.status-chip.out-shift {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ================= THE BIG PUNCH BUTTON ================= */
.punch-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 26px 0;
  position: relative;
}

.punch-btn-wrapper {
  position: relative;
  width: 234px;
  height: 234px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.grid-reticle-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px dashed rgba(56, 189, 248, 0.34);
  pointer-events: none;
  animation: spin-slow 32s linear infinite;
}

@keyframes spin-slow {
  100% { transform: rotate(360deg); }
}

.pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  pointer-events: none;
  border: 2px solid rgba(56, 189, 248, 0.55);
  animation: pulse-wave 2.6s infinite ease-out;
}

.punch-btn-wrapper.mode-out .pulse-ring {
  border-color: rgba(230, 30, 37, 0.62);
}

.punch-btn-wrapper.mode-out .grid-reticle-ring {
  border-color: rgba(255, 77, 85, 0.36);
}

@keyframes pulse-wave {
  0% { transform: scale(0.92); opacity: 0.85; }
  50% { transform: scale(1.14); opacity: 0.3; }
  100% { transform: scale(1.28); opacity: 0; }
}

.punch-btn {
  width: 210px;
  height: 210px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  z-index: 10;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.punch-btn:hover {
  transform: scale(1.03);
}

.punch-btn:active {
  transform: scale(0.94);
}

.punch-btn.btn-in {
  background: radial-gradient(circle at 30% 25%, #38bdf8 0%, #059669 52%, #064e3b 100%);
  color: #ffffff;
  box-shadow: 0 14px 42px rgba(14, 165, 233, 0.36), 0 8px 26px var(--color-green-glow), inset 0 2px 6px rgba(255, 255, 255, 0.38);
}

.punch-btn.btn-out {
  background: radial-gradient(circle at 32% 28%, #ff5a60 0%, #e61e25 64%, #881318 100%);
  color: #ffffff;
  box-shadow: 0 14px 40px var(--color-red-glow), inset 0 2px 6px rgba(255, 255, 255, 0.35);
}

.punch-icon {
  font-size: 44px;
  line-height: 1;
}

.punch-text {
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.32);
}

.punch-subtext {
  font-size: 0.74rem;
  opacity: 0.92;
  font-weight: 500;
}

.punch-btn.loading {
  pointer-events: none;
  opacity: 0.92;
}

.punch-btn.loading .punch-icon {
  animation: spin 1s infinite linear;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.punch-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 16px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.office-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
  text-decoration: none;
  transition: all 0.2s;
}

.office-pill:hover {
  background: rgba(14, 165, 233, 0.28);
  color: #fff;
}

/* Result box after punch */
.punch-result-card {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.32);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  gap: 10px;
}

.result-label {
  color: var(--text-muted);
}

.result-value {
  font-weight: 600;
  color: #fff;
  text-align: right;
}

/* ================= DISTANCE / ZONE BADGES ================= */
.zone-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.zone-ok {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.zone-far {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.42);
}

/* ================= LEAVE & EXPLANATION MODULE ================= */
.type-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.type-toggle-btn {
  padding: 12px 10px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.type-toggle-btn small {
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.8;
}

.type-toggle-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(14, 165, 233, 0.16));
  border-color: #34d399;
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.22);
}

.date-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.request-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s;
}

.request-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.request-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.request-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.request-reason-box {
  background: rgba(15, 23, 42, 0.65);
  border-left: 3px solid #38bdf8;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
}

.request-admin-note {
  font-size: 0.8rem;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.1);
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.request-admin-note.rejected {
  background: rgba(244, 63, 94, 0.1);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.25);
}

.request-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-dim);
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.badge-leave {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.42);
}

.badge-explain {
  background: rgba(14, 165, 233, 0.2);
  color: #7dd3fc;
  border: 1px solid rgba(14, 165, 233, 0.42);
}

.badge-pending {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.badge-approved {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.badge-rejected {
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.45);
}

/* ================= SECTION TITLES & HISTORY ================= */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 22px 0 14px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 1.04rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.2s;
}

.history-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.history-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-in {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-out {
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.badge-admin {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.history-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.history-time {
  font-size: 0.87rem;
  font-weight: 600;
  color: #fff;
}

.history-gps {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-map {
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-map:hover {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

/* ================= ADMIN DASHBOARD ================= */
.admin-tabs {
  display: flex;
  gap: 5px;
  background: var(--bg-card);
  padding: 5px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 18px;
  overflow-x: auto;
  box-shadow: var(--shadow-card);
}

.tab-btn {
  flex: 1;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 700;
  border-radius: 11px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tab-btn:hover {
  color: #fff;
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(14, 165, 233, 0.2));
  color: #fff;
  border-color: rgba(56, 189, 248, 0.38);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
}

/* Stat Cards Grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, border-color 0.2s;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
}

.stat-card.stat-green::before {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.stat-card.stat-amber::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.stat-card.stat-red::before {
  background: linear-gradient(90deg, #f43f5e, #fb7185);
}

.stat-card.clickable {
  cursor: pointer;
}

.stat-card.clickable:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.stat-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.stat-num {
  font-size: 1.7rem;
  font-weight: 800;
  color: #fff;
  margin-top: 4px;
}

.stat-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Office config bar inside Admin */
.office-config-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-size: 0.84rem;
}

/* Filters bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  background: var(--bg-card);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  align-items: center;
}

.filter-select {
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  outline: none;
}

.btn-secondary {
  background: rgba(30, 41, 66, 0.85);
  border: 1px solid var(--border-strong);
  color: #e2e8f0;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(51, 65, 95, 0.95);
  color: #fff;
}

.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-success:hover {
  filter: brightness(1.1);
}

/* Data Table Responsive */
.table-responsive {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.data-table th {
  background: rgba(10, 15, 28, 0.85);
  color: var(--text-muted);
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  color: #e2e8f0;
  vertical-align: middle;
}

.data-table tr:hover {
  background: var(--bg-card-hover);
}

/* Action Buttons */
.action-btns {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 0.76rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-pin {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

.btn-pin:hover {
  background: #f59e0b;
  color: #000;
}

.btn-lock {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.35);
}

.btn-lock:hover {
  background: #f43f5e;
  color: #fff;
}

.btn-unlock {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.38);
}

.btn-unlock:hover {
  background: #10b981;
  color: #fff;
}

.btn-delete {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-delete:hover {
  background: #f43f5e;
  color: #fff;
}

/* ================= MODALS ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 18, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.8);
  transform: translateY(18px);
  transition: all 0.25s ease;
  max-height: 92vh;
  overflow-y: auto;
}

.modal-overlay.show .modal-box {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.modal-title {
  font-size: 1.12rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* ================= TOAST NOTIFICATION ================= */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 92%;
  max-width: 420px;
  pointer-events: none;
}

.toast {
  background: #162033;
  border: 1px solid var(--border-strong);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.89rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDown 0.28s ease;
}

.toast.toast-success { border-left: 4px solid var(--color-green); }
.toast.toast-error { border-left: 4px solid var(--color-red); }
.toast.toast-info { border-left: 4px solid var(--color-blue); }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= CAMERA & FACE SELFIE ================= */
.camera-modal-box {
  max-width: 440px;
  padding: 20px;
}

.camera-instruction {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 12px;
}

.camera-viewport {
  position: relative;
  width: 100%;
  height: 290px;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border-strong);
}

#camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.face-guide-oval {
  position: absolute;
  width: 170px;
  height: 220px;
  border: 2px dashed rgba(16, 185, 129, 0.85);
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(6, 10, 20, 0.48);
  pointer-events: none;
  animation: pulse-guide 2.5s infinite ease-in-out;
}

@keyframes pulse-guide {
  0%, 100% { border-color: rgba(16, 185, 129, 0.6); }
  50% { border-color: rgba(52, 211, 153, 1); box-shadow: 0 0 0 9999px rgba(6, 10, 20, 0.42), 0 0 18px rgba(16, 185, 129, 0.45); }
}

.camera-loading {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 0.85rem;
  z-index: 5;
}

.camera-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--color-green);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

.camera-preview {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 10;
}

.camera-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.btn-snap {
  padding: 12px;
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.camera-sub-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.btn-sm-sub {
  font-size: 0.78rem;
  padding: 6px 10px;
}

.face-thumb {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #10b981;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.face-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

.face-thumb-empty {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #1e293b;
  border: 1px dashed var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-dim);
  flex-shrink: 0;
}

.photo-viewer-box {
  max-width: 420px;
  padding: 20px;
  text-align: center;
}

.photo-full {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.photo-details {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: left;
  line-height: 1.6;
}

/* ================= CLOUD STATUS BANNER ================= */
.cloud-banner {
  max-width: 1080px;
  margin: 0 auto 14px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.cloud-banner.local-mode {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}

/* ================= UTILITIES ================= */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-success { color: var(--color-green-light) !important; }
.text-danger { color: #fda4af !important; }
.text-amber { color: #fbbf24 !important; }

.empty-state {
  padding: 36px 20px;
  text-align: center;
  color: var(--text-dim);
}

.empty-icon {
  font-size: 38px;
  margin-bottom: 8px;
}

/* ================= MOBILE OPTIMIZATIONS ================= */
@media (max-width: 680px) {
  .app-header {
    padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 9px;
  }
  .header-container {
    flex-wrap: wrap;
    row-gap: 8px;
    column-gap: 6px;
  }
  .brand {
    order: 1;
    flex: 1 1 auto;
    gap: 8px;
  }
  .brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    padding: 3px;
  }
  .brand-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    font-size: 0.96rem;
    line-height: 1.08;
  }
  .brand-sep {
    display: none;
  }
  .brand-app-tag {
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    color: #93c5fd;
    font-weight: 800;
  }
  .brand-subtitle { display: none; }

  .header-right {
    display: contents;
  }
  #btn-header-install {
    order: 2;
    padding: 6px 8px;
    font-size: 0.72rem;
    border-radius: 11px;
  }
  .header-user:not(.hidden) {
    display: contents;
  }
  .header-user-btns {
    order: 3;
    gap: 5px;
  }
  .btn-header-action {
    width: auto !important;
    padding: 6px 9px;
    font-size: 0.74rem;
    border-radius: 11px !important;
  }
  .user-badge {
    order: 4;
    flex: 0 0 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 10px;
    background: rgba(14, 33, 76, 0.58);
    border: 1px solid rgba(56, 189, 248, 0.16);
  }
  .user-name {
    font-size: 0.78rem;
  }
  .user-role {
    font-size: 0.69rem;
    flex-shrink: 0;
  }

  .emp-tab-btn {
    font-size: 0.8rem;
    padding: 9px 6px;
    white-space: nowrap;
  }
  .live-time { font-size: 2.15rem; }
  .punch-btn-wrapper { width: 204px; height: 204px; }
  .punch-btn { width: 182px; height: 182px; }
  .punch-icon { font-size: 38px; }
  .punch-text { font-size: 1.12rem; }
  .date-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-select, .btn-secondary, .btn-success { width: 100%; justify-content: center; }
  .header-user .btn-secondary { width: auto; }
}


/* ================= PHOTO GALLERY & DOWNLOAD ACTIONS ================= */
.photo-viewer-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.photo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.gallery-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s;
}

.gallery-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.gallery-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #0b1220;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.gallery-img-wrap:hover .gallery-img {
  transform: scale(1.05);
}

.gallery-type-overlay {
  position: absolute;
  top: 8px;
  left: 8px;
}

.gallery-body {
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
}

.gallery-name {
  font-weight: 700;
  color: #fff;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-time {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.gallery-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}


/* ================= SHIFT MODE SELECTOR (CA THƯỜNG / TĂNG CA / TRỰC LỄ) ================= */
.shift-mode-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  margin-bottom: 20px;
}

.shift-pill {
  padding: 9px 8px;
  border-radius: 13px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.shift-pill:hover:not(:disabled) {
  color: #fff;
  border-color: rgba(148, 163, 184, 0.45);
}

.shift-pill:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.shift-pill.active[data-mode="normal"] {
  background: rgba(16, 185, 129, 0.2);
  border-color: #34d399;
  color: #6ee7b7;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.24);
}

.shift-pill.active[data-mode="overtime"] {
  background: rgba(245, 158, 11, 0.22);
  border-color: #fbbf24;
  color: #fde68a;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.28);
}

.shift-pill.active[data-mode="holiday"] {
  background: rgba(168, 85, 247, 0.24);
  border-color: #c084fc;
  color: #e9d5ff;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.3);
}

.punch-btn.btn-in.mode-overtime {
  background: radial-gradient(circle at 32% 28%, #fbbf24, #d97706 68%, #92400e 100%);
  box-shadow: 0 14px 40px rgba(245, 158, 11, 0.42), inset 0 2px 6px rgba(255, 255, 255, 0.35);
}

.punch-btn-wrapper.mode-overtime-ring .pulse-ring {
  border-color: rgba(251, 191, 36, 0.6);
}

.punch-btn.btn-in.mode-holiday {
  background: radial-gradient(circle at 32% 28%, #c084fc, #9333ea 68%, #581c87 100%);
  box-shadow: 0 14px 40px rgba(168, 85, 247, 0.44), inset 0 2px 6px rgba(255, 255, 255, 0.35);
}

.punch-btn-wrapper.mode-holiday-ring .pulse-ring {
  border-color: rgba(192, 132, 252, 0.65);
}

.badge-overtime {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.48);
}

.badge-holiday {
  background: rgba(168, 85, 247, 0.22);
  color: #d8b4fe;
  border: 1px solid rgba(192, 132, 252, 0.5);
}

.badge-manual {
  background: rgba(14, 165, 233, 0.18);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.manual-note-text {
  font-size: 0.72rem;
  color: #93c5fd;
  margin-top: 2px;
}

/* ================= CÀI APP RA MÀN HÌNH ĐIỆN THOẠI (PWA INSTALL) ================= */
.btn-install-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 12px;
  border: 1px solid rgba(52, 211, 153, 0.48);
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-install-pill:hover {
  background: rgba(16, 185, 129, 0.28);
  border-color: #34d399;
  color: #fff;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
}

.install-promo-card {
  margin-top: 14px;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(14, 165, 233, 0.1));
  border: 1px solid rgba(52, 211, 153, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.install-promo-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.install-promo-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(52, 211, 153, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}

.install-promo-text {
  min-width: 0;
}

.install-promo-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ecfdf5;
}

.install-promo-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.35;
}

.btn-install-action {
  padding: 8px 13px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-install-action:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.punch-hint-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.install-modal-box {
  max-width: 460px;
}

.install-native-box {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.38);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
  text-align: center;
}

.install-native-desc {
  font-size: 0.84rem;
  color: #d1fae5;
  margin-bottom: 11px;
  line-height: 1.45;
}

.install-device-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 14px;
}

.install-tab-btn {
  padding: 8px 6px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text-muted);
  font-size: 0.79rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.install-tab-btn.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: #34d399;
  color: #6ee7b7;
}

.install-guide-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.install-step {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.install-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.install-step-text {
  font-size: 0.84rem;
  color: #e2e8f0;
  line-height: 1.5;
}

.install-copy-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.7);
  border: 1px dashed rgba(148, 163, 184, 0.3);
}

.install-url-text {
  font-size: 0.74rem;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

@media (max-width: 480px) {
  .btn-install-pill {
    padding: 5px 9px;
    font-size: 0.74rem;
  }
  .install-promo-card {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-install-action {
    width: 100%;
    text-align: center;
  }
}

/* ================= CHẾ ĐỘ TỔ TRƯỞNG (CHỈ XEM) ================= */
.leader-banner {
  margin-bottom: 14px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.42);
  color: #bae6fd;
  font-size: 0.84rem;
  line-height: 1.45;
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-leader {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(37, 99, 235, 0.34));
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.72);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.24);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.leader-emblem-svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  vertical-align: -2px;
}

.readonly-tag {
  font-size: 0.74rem;
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.staff-role-select {
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.staff-role-select:focus {
  border-color: #38bdf8;
}

/* ================= TRẠNG THÁI GPS NHANH & ĐỒNG BỘ ẢNH NỀN ================= */
.camera-gps-pill {
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  padding: 6px 12px;
  border-radius: 999px;
  margin: 0 auto 10px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--border-strong);
  transition: all 0.2s ease;
}

.camera-gps-pill.gps-loading {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(96, 165, 250, 0.4);
  color: #93c5fd;
}

.camera-gps-pill.gps-ready {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
}

.camera-gps-pill.gps-warn {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(251, 191, 36, 0.45);
  color: #fcd34d;
}

.sync-status-pending {
  color: #7dd3fc;
  font-size: 0.82rem;
}

.sync-status-done {
  color: #34d399;
  font-size: 0.82rem;
}

/* ================= FOOTER ĐIỆN LỰC EVNNPC ================= */
.evn-footer {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid rgba(56, 189, 248, 0.14);
  text-align: center;
  font-size: 0.74rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.evn-footer b {
  color: #7dd3fc;
}

/* ================= CỜ VIỆT NAM & THẺ CHẤM CÔNG HÔM NAY TÁCH VÀO/RA ================= */
.vn-flag-svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.vn-flag-sm {
  width: 18px;
  height: 12px;
}

.vn-flag-lg {
  width: 56px;
  height: 37px;
  border-radius: 5px;
  border: 1px solid rgba(255, 234, 0, 0.55);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.48);
}

.stat-split-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  margin-bottom: 3px;
}

.stat-split-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.stat-split-label {
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.stat-split-num {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.stat-split-divider {
  width: 1px;
  height: 34px;
  background: rgba(56, 189, 248, 0.22);
  flex-shrink: 0;
}

/* ================= TRỰC CRM (KỸ SƯ ĐIỆN), ĐI MUỘN/VỀ SỚM, GHI CHÚ & TỔNG HỢP THÁNG ================= */
.shift-mode-selector.shift-mode-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 540px) {
  .shift-mode-selector.shift-mode-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.eng-icon-svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.eng-icon-sm {
  width: 19px;
  height: 19px;
}

.eng-icon-lg {
  width: 58px;
  height: 58px;
  filter: drop-shadow(0 5px 12px rgba(2, 10, 34, 0.55));
}

.shift-pill.active[data-mode="crm"] {
  background: rgba(14, 165, 233, 0.24);
  border-color: #38bdf8;
  color: #bae6fd;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.32);
}

.punch-btn.btn-in.mode-crm {
  background: radial-gradient(circle at 30% 25%, #38bdf8 0%, #1d4ed8 58%, #0f2563 100%);
  box-shadow: 0 14px 42px rgba(14, 165, 233, 0.45), inset 0 2px 6px rgba(255, 255, 255, 0.35);
}

.punch-btn-wrapper.mode-crm-ring .pulse-ring {
  border-color: rgba(56, 189, 248, 0.68);
}

.badge-crm {
  background: rgba(14, 165, 233, 0.22);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.52);
}

.badge-schedule {
  background: rgba(250, 204, 21, 0.14);
  color: #fef08a;
  border: 1px solid rgba(250, 204, 21, 0.38);
}

.badge-late {
  background: rgba(249, 115, 22, 0.2);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.5);
}

.badge-early {
  background: rgba(244, 63, 94, 0.18);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.48);
}

/* Cảnh báo quên chấm Ra ca */
.forgot-panel {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.42);
}

.forgot-panel-header {
  font-size: 0.86rem;
  font-weight: 800;
  color: #fcd34d;
  margin-bottom: 8px;
}

.forgot-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.forgot-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 11px;
  border-radius: 10px;
  background: rgba(7, 17, 40, 0.62);
  border: 1px solid rgba(251, 191, 36, 0.22);
  font-size: 0.82rem;
}

.forgot-item-info {
  color: #e2e8f0;
  line-height: 1.4;
}

/* Ô ghi chú nhanh trong Modal Camera */
.camera-note-wrap {
  margin-top: 11px;
}

.camera-note-input {
  padding: 9px 12px !important;
  font-size: 0.84rem !important;
  border-radius: 11px !important;
}

.note-chips-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 7px;
}

.note-chip {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: rgba(14, 165, 233, 0.12);
  color: #bae6fd;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.note-chip:hover {
  background: rgba(14, 165, 233, 0.28);
  color: #fff;
}

/* Bảng tổng hợp tháng */
.summary-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.summary-mini-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-mini-card span {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
}

.summary-mini-card strong {
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.summary-cell-main {
  font-weight: 700;
  color: #fff;
  font-size: 0.88rem;
}

.summary-cell-sub {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ================= BÁO CÁO LCT/PCT/CRM & QUÃNG ĐƯỜNG (KM) SAU TAN CA ================= */
.lct-type-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.lct-type-btn {
  padding: 9px 6px;
  border-radius: 10px;
  border: 1.5px solid var(--border-strong);
  background: rgba(7, 17, 40, 0.8);
  color: var(--text-muted);
  font-size: 0.77rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lct-type-btn.active {
  background: rgba(37, 99, 235, 0.24);
  border-color: #38bdf8;
  color: #e0f2fe;
  box-shadow: 0 3px 12px rgba(14, 165, 233, 0.25);
}

.input-with-unit {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-unit .form-input {
  padding-right: 52px;
}

.input-unit-tag {
  position: absolute;
  right: 12px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #fde047;
  background: rgba(250, 204, 21, 0.14);
  border: 1px solid rgba(250, 204, 21, 0.35);
  padding: 2px 8px;
  border-radius: 8px;
  pointer-events: none;
}

.res-lct-box,
.lct-info-box {
  margin-top: 6px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(14, 165, 233, 0.11);
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 0.75rem;
  color: #e0f2fe;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lct-info-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.badge-km {
  background: rgba(250, 204, 21, 0.16);
  color: #fef08a;
  border: 1px solid rgba(250, 204, 21, 0.42);
}

.btn-lct-mini {
  padding: 3px 8px;
  font-size: 0.71rem;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.38);
  background: rgba(14, 165, 233, 0.14);
  color: #bae6fd;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-lct-mini:hover {
  background: rgba(14, 165, 233, 0.28);
  color: #fff;
}

@media (max-width: 480px) {
  .lct-type-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ================= NHẮC & XUẤT BỘ EXCEL CUỐI THÁNG (.XLSX) ================= */
.eom-banner {
  margin-bottom: 14px;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(37, 99, 235, 0.14));
  border: 1px solid rgba(52, 211, 153, 0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.eom-banner-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex: 1 1 260px;
}

.eom-icon {
  font-size: 26px;
  flex-shrink: 0;
}

.eom-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #ecfdf5;
}

.eom-sub {
  font-size: 0.76rem;
  color: #bae6fd;
  margin-top: 2px;
  line-height: 1.4;
}

.eom-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-xlsx {
  background: linear-gradient(135deg, #047857 0%, #10b981 100%) !important;
  border: 1px solid rgba(110, 231, 183, 0.48) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

/* ================= CÔNG CHUẨN 26/27 & TÍCH CỘNG NGHỈ BÙ ================= */
.work-standard-bar {
  margin-bottom: 14px;
  padding: 12px 15px;
  border-radius: var(--radius-md);
  background: rgba(37, 99, 235, 0.13);
  border: 1px solid rgba(56, 189, 248, 0.36);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.work-standard-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.work-standard-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.work-standard-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #e0f2fe;
}

.work-standard-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.badge-excess {
  background: rgba(249, 115, 22, 0.22);
  color: #fdba74;
  border: 1px solid rgba(251, 146, 60, 0.55);
}

.badge-compoff-done {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.5);
}

.compoff-control {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
}

.compoff-check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 9px;
  border: 1px solid rgba(251, 146, 60, 0.45);
  background: rgba(249, 115, 22, 0.14);
  color: #fed7aa;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: all 0.18s ease;
}

.compoff-check-label.checked {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(52, 211, 153, 0.55);
  color: #6ee7b7;
}

.compoff-check-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #10b981;
  cursor: pointer;
}

.compoff-days-adjust {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.compoff-days-input {
  width: 52px;
  padding: 3px 6px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: rgba(7, 17, 40, 0.9);
  color: #fef08a;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.my-month-strip {
  margin-top: 10px;
  padding: 7px 11px;
  border-radius: 10px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  font-size: 0.76rem;
  color: #bae6fd;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ================= NHÃN CHỨC DANH ĐIỆN LỰC ================= */
.badge-vice-chief {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(245, 158, 11, 0.24));
  color: #e0e7ff;
  border: 1px solid rgba(165, 180, 252, 0.65);
  box-shadow: 0 2px 9px rgba(99, 102, 241, 0.22);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-deputy {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.24), rgba(59, 130, 246, 0.26));
  color: #bae6fd;
  border: 1px solid rgba(56, 189, 248, 0.58);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-worker {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.48);
}

.badge-service {
  background: rgba(20, 184, 166, 0.2);
  color: #5eead4;
  border: 1px solid rgba(45, 212, 191, 0.45);
}

.badge-employee {
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

/* ================= XUẤT BIỂU MẪU XĂNG XE ĐIỆN LỰC (.XLSX) ================= */
.btn-fuel-xlsx {
  background: linear-gradient(135deg, #b45309 0%, #f59e0b 100%) !important;
  color: #fff !important;
  border: 1px solid rgba(253, 224, 71, 0.5) !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-fuel-xlsx:hover {
  filter: brightness(1.08);
}

.my-fuel-export-bar {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(37, 99, 235, 0.12));
  border: 1px solid rgba(251, 191, 36, 0.38);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.my-fuel-export-info {
  font-size: 0.78rem;
  color: #fef3c7;
  line-height: 1.4;
}

.my-fuel-export-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.fuel-config-panel {
  margin-bottom: 14px;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.09);
  border: 1px solid rgba(251, 191, 36, 0.36);
}

.fuel-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.fuel-config-grid label {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.fuel-config-grid input {
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: rgba(7, 17, 40, 0.85);
  color: #fff;
  font-size: 0.82rem;
}

.btn-fuel-mini {
  margin-top: 4px;
  padding: 2px 7px;
  font-size: 0.69rem;
  border-radius: 7px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(245, 158, 11, 0.16);
  color: #fde68a;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-fuel-mini:hover {
  background: rgba(245, 158, 11, 0.3);
  color: #fff;
}

/* ================= ĐƠN XIN NGHỈ PHÉP WORD (.DOCX) ================= */
.btn-docx {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%) !important;
  color: #fff !important;
  border: 1px solid rgba(147, 197, 253, 0.5) !important;
  box-shadow: 0 3px 12px rgba(37, 99, 235, 0.32);
}

.btn-docx:hover {
  filter: brightness(1.1);
}

.leave-word-hint {
  margin-bottom: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.13);
  border: 1px dashed rgba(96, 165, 250, 0.42);
  color: #dbeafe;
  font-size: 0.78rem;
  line-height: 1.45;
}

.leave-submit-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.leave-submit-row .btn-primary {
  flex: 1 1 200px;
}

.leave-submit-row .btn-docx {
  flex: 0 1 auto;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

/* Hiển thị rõ biểu tượng lịch trắng trên nền tối cho mọi input date/month */
input[type="date"],
input[type="month"],
input[type="time"] {
  color-scheme: dark;
}

/* ================= BẢNG LỊCH CHỌN NGÀY TIẾNG VIỆT (T2 - CN) ================= */
.vn-date-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--border-strong);
  background: rgba(7, 17, 40, 0.88);
  color: #f8fafc;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.vn-date-trigger:hover,
.vn-date-trigger:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
  outline: none;
}

.vn-date-trigger-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 3px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

.leave-quick-days {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.quick-day-chip {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.36);
  background: rgba(14, 165, 233, 0.12);
  color: #bae6fd;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.quick-day-chip:hover {
  background: rgba(14, 165, 233, 0.28);
  color: #fff;
}

.leave-span-preview {
  margin-bottom: 12px;
  font-size: 0.78rem;
  color: #6ee7b7;
  font-weight: 600;
}

.cal-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.cal-month-title {
  font-size: 1rem;
  font-weight: 800;
  color: #f8fafc;
}

.cal-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
}

.cal-nav-btn:hover {
  border-color: #38bdf8;
  color: #7dd3fc;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-bottom: 6px;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
}

.cal-weekdays .cal-sun-head {
  color: #fca5a5;
}

.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.cal-day-btn {
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cal-day-btn:hover {
  border-color: #38bdf8;
  background: rgba(37, 99, 235, 0.28);
  color: #fff;
}

.cal-day-btn.is-sunday {
  color: #fda4af;
  background: rgba(244, 63, 94, 0.08);
}

.cal-day-btn.is-today {
  border-color: #38bdf8;
  box-shadow: inset 0 0 0 1px #38bdf8;
}

.cal-day-btn.is-selected {
  background: linear-gradient(135deg, #059669, #10b981);
  border-color: #6ee7b7;
  color: #fff;
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.4);
}

.cal-day-empty {
  height: 38px;
}

/* ================= THANH MÔ PHỎNG QUÁ CÔNG (CHỈ HIỆN TRÊN LOCAL) ================= */
.local-sim-bar {
  margin-bottom: 14px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.16), rgba(37, 99, 235, 0.15));
  border: 1px dashed rgba(192, 132, 252, 0.55);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.local-sim-info {
  font-size: 0.8rem;
  color: #f3e8ff;
  line-height: 1.45;
}

.local-sim-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

/* ================= THÔNG BÁO TO RÕ TRẠNG THÁI CÀI ĐẶT APP (PWA) ================= */
.btn-install-pill.installed {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.35)) !important;
  border-color: rgba(52, 211, 153, 0.7) !important;
  color: #a7f3d0 !important;
}

.btn-install-pill.installing {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(217, 119, 6, 0.38)) !important;
  border-color: rgba(251, 191, 36, 0.75) !important;
  color: #fef08a !important;
}

.pwa-status-banner {
  margin-bottom: 14px;
  padding: 13px 16px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.pwa-status-banner.state-installing {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.28), rgba(37, 99, 235, 0.28));
  border: 2px solid rgba(251, 191, 36, 0.75);
  color: #fef9c3;
}

.pwa-status-banner.state-installed {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.28), rgba(16, 185, 129, 0.22));
  border: 2px solid rgba(52, 211, 153, 0.75);
  color: #ecfdf5;
}

.pwa-banner-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 240px;
}

.pwa-banner-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.pwa-banner-title {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.pwa-banner-sub {
  font-size: 0.8rem;
  opacity: 0.92;
  margin-top: 2px;
  line-height: 1.4;
}

.pwa-big-modal-box {
  max-width: 440px !important;
  text-align: center;
  padding: 26px 22px !important;
}

.pwa-big-icon {
  width: 78px;
  height: 78px;
  margin: 0 auto 14px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.pwa-big-icon.installing {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.26), rgba(37, 99, 235, 0.3));
  border: 2px solid rgba(251, 191, 36, 0.7);
  animation: pwaPulse 1.3s ease-in-out infinite;
}

.pwa-big-icon.installed {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(5, 150, 105, 0.4));
  border: 2px solid rgba(52, 211, 153, 0.85);
  box-shadow: 0 0 28px rgba(16, 185, 129, 0.38);
}

@keyframes pwaPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4); }
  50% { transform: scale(1.06); box-shadow: 0 0 24px 6px rgba(251, 191, 36, 0.25); }
}

.pwa-big-title {
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 10px;
  color: #ffffff;
  text-transform: uppercase;
}

.pwa-big-desc {
  font-size: 0.92rem;
  color: #e2e8f0;
  line-height: 1.55;
  margin-bottom: 16px;
}

.pwa-progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  overflow: hidden;
  margin-bottom: 10px;
}

.pwa-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #38bdf8, #10b981);
  transition: width 0.35s ease;
}

.pwa-progress-percent {
  font-size: 0.86rem;
  font-weight: 800;
  color: #fde047;
  margin-bottom: 14px;
}

/* ================= NÚT XUẤT EXCEL TĂNG CA RIÊNG & THANH 12 THÁNG CÔNG CHUẨN ================= */
.btn-overtime-xlsx {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%) !important;
  color: #fff !important;
  border: 1px solid rgba(216, 180, 254, 0.55) !important;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.32);
}

.btn-overtime-xlsx:hover {
  filter: brightness(1.1);
}

.year-standard-strip {
  width: 100%;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(96, 165, 250, 0.28);
  display: grid;
  grid-template-columns: repeat(12, minmax(54px, 1fr));
  gap: 5px;
}

@media (max-width: 900px) {
  .year-standard-strip {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 520px) {
  .year-standard-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

.year-month-chip {
  padding: 5px 4px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(7, 17, 40, 0.72);
  color: #cbd5e1;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.25;
  transition: all 0.16s ease;
}

.year-month-chip:hover {
  border-color: #38bdf8;
  background: rgba(37, 99, 235, 0.24);
  color: #fff;
}

.year-month-chip.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.45), rgba(14, 165, 233, 0.35));
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.3);
}

.year-month-chip strong {
  font-size: 0.72rem;
  font-weight: 800;
}

.year-month-chip span {
  font-size: 0.67rem;
  color: #7dd3fc;
  font-weight: 700;
}

.year-month-chip.is-27 span {
  color: #fde047;
}

.year-month-chip.is-low span {
  color: #fda4af;
}

@media (max-width: 680px) {
  .brand-title {
    font-size: 0.82rem;
    white-space: normal;
    line-height: 1.15;
  }
  .brand-unit-sub {
    font-size: 0.66rem;
  }
}

/* ================= CHỈ XEM CÔNG CHUẨN & ADMIN TĂNG SỐ LƯỢNG CÔNG ================= */
.std-readonly-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(96, 165, 250, 0.38);
  color: #bae6fd;
  font-size: 0.78rem;
  font-weight: 700;
}

.bonus-work-badge {
  display: inline-block;
  margin-top: 3px;
  padding: 2px 7px;
  border-radius: 7px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.48);
  color: #6ee7b7;
  font-size: 0.69rem;
  font-weight: 700;
}

.bonus-work-badge.is-negative {
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(251, 113, 133, 0.45);
  color: #fda4af;
}

.btn-adjust-work-mini {
  margin-top: 4px;
  padding: 2px 8px;
  font-size: 0.69rem;
  border-radius: 7px;
  border: 1px solid rgba(52, 211, 153, 0.48);
  background: rgba(16, 185, 129, 0.15);
  color: #a7f3d0;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-adjust-work-mini:hover {
  background: rgba(16, 185, 129, 0.3);
  color: #fff;
}

.quick-bonus-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.quick-bonus-chip {
  padding: 6px 11px;
  border-radius: 9px;
  border: 1px solid rgba(52, 211, 153, 0.45);
  background: rgba(16, 185, 129, 0.14);
  color: #a7f3d0;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.quick-bonus-chip:hover {
  background: rgba(16, 185, 129, 0.32);
  color: #fff;
}

.quick-bonus-chip.reset-chip {
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(148, 163, 184, 0.14);
  color: #e2e8f0;
}

.adjust-work-preview {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.38);
  color: #e0f2fe;
  font-size: 0.84rem;
  line-height: 1.5;
}
