* {
  box-sizing: border-box;
  font-family: Inter, Arial, sans-serif;
}

/* =====================
   BACKGROUND (DEFAULT CENTERED)
===================== */
body {
  margin: 0;
  min-height: 100vh;
  background: url("bg.png") no-repeat center center fixed;
  background-size: cover;

  display: flex;
  align-items: center;
  justify-content: center;

  color: white;
}

/* =====================
   OVERRIDE: NON-CENTERED PAGES
   (Admin, Employees, Dashboard)
===================== */
body.no-center {
  display: block;
}

/* =====================
   ADMIN BUTTON
===================== */
.admin-icon {
  position: fixed;
  top: 20px;
  right: 30px;
  z-index: 10;

  background: rgba(255, 255, 255, 0.15);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s;
}

.admin-icon:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* =====================
   CARD
===================== */
.container {
  width: 360px;
  background: rgba(12, 30, 110, 0.85);
  backdrop-filter: blur(8px);
  padding: 30px;
  border-radius: 14px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
  text-align: center;
}

/* =====================
   TITLE
===================== */
h1 {
  font-size: 16px;
  margin-bottom: 20px;
}

/* =====================
   INPUTS
===================== */
input,
textarea {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: none;
  margin-bottom: 15px;
  font-size: 14px;
}

textarea {
  resize: none;
  min-height: 48px;
}

/* =====================
   BUTTON RESET
===================== */
button {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

/* =====================
   ADMIN DASHBOARD PAGE
===================== */
body.no-center {
  display: block;
}

.dashboard-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  margin-top: 160px;
}

.dashboard-btn {
  width: 280px;
  padding: 16px;
  border-radius: 14px;
  background: #1f4ed8;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: 0.2s;
}

.dashboard-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(31, 78, 216, 0.45);
}

/* =====================
   PRIMARY / SECONDARY
===================== */
.primary-btn {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  background: #1f4ed8;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(31, 78, 216, 0.45);
}

.secondary-btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.4);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
}

.secondary-btn:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-1px);
}

/* =====================
   LEAVE BUTTON GROUP
===================== */
.leave-options {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.leave-btn {
  flex: 1;
  background: rgba(255,255,255,0.15);
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.leave-btn.active {
  background: #1f4ed8;
}

/* =====================
   ADMIN HEADER
===================== */
.admin-header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 80px);
  max-width: 1100px;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;

  z-index: 20;
}

.admin-right {
  text-align: right;
}

.admin-right .secondary-btn {
  width: auto;
  padding: 8px 16px;
  border-radius: 20px;
}

/* =====================
   EMPLOYEE GRID
===================== */
.employee-grid {
  margin-top: 120px;
  padding: 0 60px;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.employee-btn {
  background: #1f4ed8;
  border-radius: 14px;
  padding: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.employee-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(31, 78, 216, 0.45);
}

/* =====================
   MODAL OVERLAY
===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;

  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-overlay.show {
  display: flex;
  opacity: 1;
}

/* =====================
   EMPLOYEE MODAL
===================== */
.employee-modal {
  background: rgba(12, 30, 110, 0.95);
  padding: 28px;
  border-radius: 18px;
  width: 320px;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);

  transform: scale(0.96) translateY(10px);
  opacity: 0;
  transition: all 0.3s ease;
}

.modal-overlay.show .employee-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* =====================
   EMPLOYEE MODAL BUTTON SPACING
===================== */
.employee-modal .primary-btn {
  margin-bottom: 10px;
}

.employee-modal .primary-btn:last-of-type {
  margin-bottom: 0;
}

.employee-modal .primary-btn:last-child {
  margin-top: 14px;
  background: rgba(255,255,255,0.15);
}

/* =====================
   AVATAR
===================== */
.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 12px;
  background: rgba(255,255,255,0.15);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =====================
   SPINNERS
===================== */
.spinner,
.page-spinner {
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
}

.page-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.25);
  border-top-color: #1f4ed8;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;

  margin-bottom: 12px; /* ⬅️ space before text */
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =====================
   HOME HERO (INDEX ONLY)
===================== */
.home-hero {
  width: 100%;
  max-width: 520px;
  text-align: center;
  background: rgba(12, 30, 110, 0.65);
  backdrop-filter: blur(6px);
  padding: 36px 42px;
  border-radius: 18px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.35);
}

/* Bigger headline for landing */
.home-hero h1 {
  font-size: 20px;
  line-height: 1.45;
  font-weight: 500;
}

/* CTA spacing */
.home-hero .primary-btn {
  margin-top: 22px;
  font-size: 15px;
}

/* =====================
   BRAND LOGO (HEADER)
===================== */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
}

.brand-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.loading-state {
  position: fixed;
  inset: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
  color: rgba(255,255,255,0.85);
  z-index: 2000;
}

/* =====================
   ADMIN HEADER FIX
===================== */
.admin-header {
  align-items: center;
}

.admin-left,
.admin-right {
  display: flex;
  align-items: center;
}

.admin-left {
  gap: 6px;
}

.admin-right .secondary-btn {
  margin-top: 0;
}

/* =====================
   DASHBOARD HOME
===================== */
.dashboard-home {
  margin-top: 40px;
}

.dashboard-home .dashboard-btn {
  margin-bottom: 6px;
}

/* ADD EMPLOYEE PILL */
.add-employee-btn {
  background: rgba(255,255,255,0.12);
  border: 1px dashed rgba(255,255,255,0.4);
}

.add-employee-btn:hover {
  background: rgba(255,255,255,0.2);
}

/* =====================
   ADD EMPLOYEE PILL (VISIBLE FIX)
===================== */
.employee-btn.add-employee {
  background: #1f4ed8;
  border: 2px dashed rgba(255, 255, 255, 0.6);
  color: #ffffff;
  font-weight: 600;
}

.employee-btn.add-employee:hover {
  background: #1f4ed8;
  box-shadow: 0 12px 30px rgba(31, 78, 216, 0.6);
  transform: translateY(-2px);
}

.employee-photo-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.employee-photo-wrapper img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ddd;
}

.actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

/* ===== Edit Employee ===== */

.edit-employee-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
  align-items: center;
}

.employee-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.employee-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
}

.employee-name-display {
  font-weight: 600;
  font-size: 16px;
}

.employee-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.pill-input {
  background: #1f4fe0;
  border-radius: 999px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
}

.pill-input label {
  font-size: 11px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 4px;
}

.pill-input input,
.pill-input select {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 13px;
}

.actions {
  grid-column: span 2;
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

/* =====================
   EDIT EMPLOYEE CARD OVERRIDE
===================== */
.edit-employee-card {
  width: 720px;
  max-width: calc(100vw - 40px);
}

/* =====================
   Edit Employee – Rectangular Inputs
===================== */

.edit-employee-card .pill-input {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.edit-employee-card .pill-input label {
  font-size: 12px;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.85);
}

.edit-employee-card .pill-input input,
.edit-employee-card .pill-input select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.6);
  background: #ffffff;
  color: #0c1e6e;
  font-size: 14px;
}

/* Focus state = clear affordance */
.edit-employee-card .pill-input input:focus,
.edit-employee-card .pill-input select:focus {
  outline: none;
  border-color: #1f4ed8;
  box-shadow: 0 0 0 2px rgba(31,78,216,0.25);
}

.employee-left {
  align-self: center;
}

/* Edit Employee – avatar polish */
.edit-employee-card .avatar {
  background: rgba(255,255,255,0.18);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25);
}

.edit-employee-card .employee-right {
  row-gap: 18px;
}

/* Edit Employee – Cancel same size as primary */
.edit-employee-card .cancel-primary {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
  text-decoration: none;
}

.edit-employee-card .cancel-primary:hover {
  background: rgba(255,255,255,0.2);
}

/* =====================
   Employee Login – Card Polish
===================== */
.employee-login-card {
  position: relative;
  padding-top: 38px;
}

.employee-login-card::before,
.employee-login-card::after {
  content: "";
  position: absolute;
  top: -12px;
  width: 26px;
  height: 4px;
  background: rgba(255,255,255,0.8);
  border-radius: 2px;
}

.employee-login-card::before {
  left: calc(50% - 32px);
  transform: rotate(-18deg);
}

.employee-login-card::after {
  left: calc(50% + 6px);
  transform: rotate(18deg);
}

/* Google Login emphasis */
.google-login-wrapper {
  margin: 18px 0 12px;
  display: flex;
  justify-content: center;
}

.login-hint {
  font-size: 12px;
  opacity: 0.75;
  margin-bottom: 10px;
}

.employee-login-card h1 {
  font-size: 15px;
  margin-bottom: 14px;
  letter-spacing: 0.2px;
}

/* =====================
   Employee Login – Loading + Helper
===================== */

.google-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  font-size: 13px;
  opacity: 0.85;
}

.hidden {
  display: none;
}

.login-helper {
  font-size: 12px;
  opacity: 0.75;
  margin-top: 8px;
}

.login-helper span {
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.login-helper span:hover {
  opacity: 0.85;
}

.leave-card {
  max-width: 420px;
  padding: 28px;
}

.card-title {
  text-align: center;
  margin-bottom: 24px;
}

.field-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}

.field-group label {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 6px;
}

.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
}

.row {
  display: flex;
  gap: 12px;
}

.row .field-group {
  flex: 1;
}

#totalHours {
  font-weight: 600;
  background: rgba(255,255,255,0.9);
}

.hint-text {
  font-size: 12px;
  opacity: 0.75;
  margin-top: 12px;
  text-align: center;
}

.hours-toggle {
  display: flex;
  gap: 10px;
}

.hours-btn {
  flex: 1;
  padding: 12px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  line-height: 1.2;
}

.hours-btn span {
  font-size: 11px;
  opacity: 0.8;
  font-weight: 500;
}

.hours-btn:hover {
  background: rgba(255,255,255,0.2);
}

.hours-btn.active {
  background: #1f4ed8;
  box-shadow: 0 6px 18px rgba(31, 78, 216, 0.45);
}

/* REQUEST CARD */
.request-card {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  backdrop-filter: blur(8px);
}

/* HEADER ROW */
.request-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.employee-name {
  font-size: 18px;
  font-weight: 600;
}

/* STATUS BADGE */
.status-badge {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.pending {
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
}

/* META PILLS */
.meta {
  margin: 10px 0;
  display: flex;
  gap: 8px;
}

.pill {
  background: rgba(255,255,255,0.08);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
}

/* DATES */
.dates {
  font-size: 14px;
  margin-bottom: 8px;
  opacity: 0.9;
}

.days {
  margin-left: 6px;
  opacity: 0.7;
}

/* REASON */
.reason {
  font-size: 14px;
  opacity: 0.9;
}

.empty-state {
  text-align: center;
  font-size: 16px;
  opacity: 0.7;
  margin-top: 80px;
}

.request-card:hover {
  transform: translateY(-2px);
  transition: transform 0.2s ease;
}

/* =========================================================
   ADMIN LEAVE SUBMISSION – VISUAL POLISH (SAFE PATCH)
   Scoped only to request cards
========================================================= */

/* Slightly tighter card padding for better scanability */
.request-card {
  padding: 20px;
}

/* Emphasize leave type for quick scanning */
.request-card .leave-type {
  font-weight: 600;
  margin-bottom: 4px;
}

/* Reason block – subtle container */
.request-card .reason {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  font-size: 13px;
}

/* Admin action buttons container */
.request-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

/* Make Reject feel secondary without redefining it */
.request-actions .secondary-btn {
  opacity: 0.85;
}

.request-actions .secondary-btn:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.6);
}

/* Status badge future-proofing */
.status-badge.approved {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
}

.status-badge.rejected {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
}

.request-card {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.primary-btn:disabled,
.secondary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

