/* ==========================================================================
   PULSE ENTERPRISE DESIGN SYSTEM
   Theme: Executive Dark Blue & Rich Gold / Crisp Executive White
   ========================================================================== */

:root {
  /* DARK THEME (DEFAULT: Deep Midnight Navy & Rich Gold) */
  --bg-base: #0B132B;
  --bg-surface: #111D3B;
  --bg-card: #162447;
  --bg-card-hover: #1F315E;
  --bg-input: #0E1833;

  --border-color: rgba(212, 175, 55, 0.22);
  --border-subtle: rgba(255, 255, 255, 0.08);

  --gold-primary: #D4AF37;
  --gold-hover: #E6C35C;
  --gold-glow: rgba(212, 175, 55, 0.25);
  --gold-badge-bg: rgba(212, 175, 55, 0.12);

  --text-main: #FFFFFF;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;

  --success: #10B981;
  --success-bg: rgba(16, 185, 129, 0.14);
  --warning: #F59E0B;
  --warning-bg: rgba(245, 158, 11, 0.14);
  --danger: #EF4444;
  --danger-bg: rgba(239, 68, 68, 0.14);

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.35);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* LIGHT THEME (Crisp Executive White & High-Contrast Bronze-Gold) */
body.light-mode {
  --bg-base: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F1F5F9;
  --bg-input: #F8FAFC;

  --border-color: rgba(180, 83, 9, 0.28);
  --border-subtle: rgba(0, 0, 0, 0.08);

  --gold-primary: #B45309;       /* Deep rich amber bronze: High Contrast on White */
  --gold-hover: #92400E;
  --gold-glow: rgba(180, 83, 9, 0.20);
  --gold-badge-bg: rgba(180, 83, 9, 0.10);

  --text-main: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 16px 32px rgba(15, 23, 42, 0.09);
}

/* BASE RESETS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  min-height: 100vh;
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select {
  font-family: inherit;
  font-size: inherit;
}

/* NAVBAR */
.navbar {
  height: 64px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.brand-name span {
  color: var(--gold-primary);
  font-weight: 600;
  font-size: 0.95rem;
  margin-left: 4px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-primary), #B8860B);
  color: #0B132B !important;
  font-weight: 700;
  box-shadow: 0 2px 8px var(--gold-glow);
  border-color: transparent;
}

body.light-mode .btn-gold {
  background: var(--gold-primary);
  color: #FFFFFF !important;
}

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

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--gold-badge-bg);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

.btn-danger {
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: #FFFFFF;
}

/* THEME TOGGLE */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  transform: rotate(15deg);
  background: var(--gold-badge-bg);
}

/* CARDS */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  border-color: var(--gold-primary);
}

/* BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-gold {
  background: var(--gold-badge-bg);
  color: var(--gold-primary);
  border: 1px solid var(--border-color);
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* FORM CONTROLS */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input-box {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.input-box:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

select.input-box {
  cursor: pointer;
}

/* AUTH BOX (Centered Modern Floating Card) */
.auth-wrapper {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-header .logo-box {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.auth-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--gold-primary);
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.auth-error {
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: none;
}

/* TABLES */
.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color);
}

.custom-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.875rem;
  vertical-align: middle;
}

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

/* BREAK OVERTIME RED BADGE */
.break-overtime {
  color: var(--danger);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* UNIVERSAL MODAL OVERLAY */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 19, 43, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-lg);
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

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

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold-primary);
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.close-btn:hover {
  color: var(--text-main);
}

/* 403 NETWORK RESTRICTED OVERLAY */
.ip-restricted-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-base);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

/* TOAST NOTIFICATIONS */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  box-shadow: var(--shadow-md);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastSlide 0.25s ease-out;
}

@keyframes toastSlide {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   LIVE FLOOR TV BROADCAST SLIDE POPUP
   ========================================================================== */
.live-broadcast-banner {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translate(-50%, -150%);
  background: var(--bg-surface);
  border: 2px solid var(--gold-primary);
  border-radius: var(--radius-lg);
  padding: 16px 28px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 25px var(--gold-glow);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.35s ease;
  opacity: 0;
  pointer-events: none;
  min-width: 380px;
}

.live-broadcast-banner.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.live-broadcast-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.live-broadcast-content {
  flex: 1;
}

.live-broadcast-title {
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.live-broadcast-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Pulsing warning for >30m break */
.pulse-danger {
  animation: dangerPulse 1.5s infinite;
}
@keyframes dangerPulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Print styles for Monthly Reports */
@media print {
  .navbar, .btn, .theme-toggle, .admin-sidebar, .form-group, #addEmpModal, .actions-pair-grid {
    display: none !important;
  }
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }
  .card, .custom-table {
    border: 1px solid #CCCCCC !important;
    box-shadow: none !important;
  }
  .custom-table th {
    background: #F1F5F9 !important;
    color: #000000 !important;
  }
}
