/* WFM — styled per IndiVillage Front-End Style Guide v1.0 */
:root {
  /* Primary palette */
  --iv-primary: #A7354D;
  --iv-primary-deep: #7E2238;
  --iv-primary-glow: #D45A74;
  --iv-primary-light: #B84261;
  --iv-berry: #5C1528;
  --iv-footer: #A04053;
  --iv-primary-tint: #F8E9ED;

  /* Neutrals */
  --iv-white: #FFFFFF;
  --iv-cream: #FDF6F0;
  --iv-border: #E8E0DA;
  --iv-text: #1A1A2E;
  --iv-text-mid: #4A4A5A;
  --iv-text-light: #8A8A9A;
  --iv-muted: #C4BFBC;

  /* Semantic */
  --iv-error: #C0392B;
  --iv-error-bg: #FDF0EF;
  --iv-success: #16A34A;
  --iv-success-bg: #E9F7EF;
  --iv-warning: #F59E0B;
  --iv-warning-bg: #FEF3E2;
  --iv-warning-text: #B45309;
  --iv-info: #3B82F6;
  --iv-info-bg: #EBF2FE;

  /* Shadows */
  --iv-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --iv-shadow-btn: 0 4px 12px rgba(167, 53, 77, 0.3);
  --iv-focus-ring: 0 0 0 3px rgba(167, 53, 77, 0.08);

  /* Radii */
  --iv-radius-sm: 6px;
  --iv-radius-md: 10px;
  --iv-radius-lg: 12px;
  --iv-radius-xl: 16px;
  --iv-radius-pill: 9999px;

  --iv-transition: all 0.2s ease;
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--iv-cream);
  color: var(--iv-text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

main { flex: 1; width: 100%; }

.mono { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px 28px;
  background: rgba(167, 53, 77, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 14px; }

.brand-logo {
  height: 36px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
  display: block;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -0.3px; }
.brand-sub {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
}

.tabs { display: flex; gap: 6px; margin-left: 12px; }

.tab {
  font-family: var(--font);
  font-weight: 500;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  background: transparent;
  border: 1px solid transparent;
  padding: 8px 18px;
  border-radius: var(--iv-radius-pill);
  cursor: pointer;
  transition: var(--iv-transition);
}
.tab:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.tab.active {
  color: var(--iv-primary);
  background: #fff;
  font-weight: 600;
}

.whoami {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.whoami-name { font-weight: 600; color: #fff; font-size: 13px; }

.logout-btn {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: var(--iv-radius-pill);
  cursor: pointer;
  transition: var(--iv-transition);
}
.logout-btn:hover { background: rgba(255, 255, 255, 0.15); }

/* ---------- Layout ---------- */
main { max-width: 1080px; margin: 0 auto; padding: 32px 24px 64px; }
.view { display: none; animation: fadeUp 0.3s ease; }
.view.active { display: block; }

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

/* ---------- Day header ---------- */
.day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.day-nav { display: flex; align-items: center; gap: 8px; }

.day-nav input[type='date'] {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 10px 14px;
  border: 1.5px solid var(--iv-border);
  border-radius: var(--iv-radius-md);
  background: var(--iv-white);
  color: var(--iv-text);
  transition: var(--iv-transition);
}
.day-nav input[type='date']:focus { outline: none; border-color: var(--iv-primary); box-shadow: var(--iv-focus-ring); }

.icon-btn {
  width: 38px; height: 38px;
  border: 1.5px solid var(--iv-border);
  background: var(--iv-white);
  border-radius: var(--iv-radius-md);
  font-size: 18px;
  color: var(--iv-text-mid);
  cursor: pointer;
  transition: var(--iv-transition);
}
.icon-btn:hover { border-color: var(--iv-primary); color: var(--iv-primary); }

.ghost-btn {
  border: none;
  background: transparent;
  font-family: var(--font);
  color: var(--iv-primary);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--iv-radius-sm);
  transition: var(--iv-transition);
}
.ghost-btn:hover { background: var(--iv-primary-tint); }

.day-total { display: flex; align-items: center; gap: 12px; }
.day-total-bar {
  width: 180px; height: 8px;
  background: #F1E8E2;
  border-radius: var(--iv-radius-pill);
  overflow: hidden;
  border: 1px solid var(--iv-border);
}
.day-total-fill {
  height: 100%;
  width: 0%;
  background: var(--iv-primary);
  border-radius: var(--iv-radius-pill);
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s;
}
.day-total-fill.over { background: var(--iv-warning); }
.day-total-label { font-size: 13px; color: var(--iv-text-mid); font-weight: 600; }
.day-total-label .mono { font-size: 15px; color: var(--iv-text); font-weight: 800; }

/* ---------- Shift timeline ---------- */
.shift-timeline {
  background: var(--iv-white);
  border: 1px solid var(--iv-border);
  border-radius: var(--iv-radius-lg);
  padding: 16px 20px 26px;
  box-shadow: var(--iv-shadow-sm);
  margin-bottom: 16px;
}
.tl-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; flex-wrap: wrap; gap: 6px; }
.tl-label { font-size: 13px; font-weight: 700; }
.tl-logged { font-size: 12px; font-weight: 600; color: var(--iv-text-mid); font-variant-numeric: tabular-nums; }
.tl-logged.over { color: var(--iv-warning-text); }
.tl-track {
  display: flex;
  height: 22px;
  background: #F1E8E2;
  border-radius: var(--iv-radius-sm);
  overflow: hidden;
}
.tl-seg { height: 100%; min-width: 2px; border-right: 1px solid rgba(255, 255, 255, 0.7); transition: width 0.35s ease; }
.seg-project_work { background: var(--iv-primary); }
.seg-project_training { background: var(--iv-info); }
.seg-break { background: var(--iv-warning); }
.seg-corp { background: var(--iv-primary-light); }
.seg-it_issue { background: var(--iv-error); }
.seg-leave { background: var(--iv-muted); }
.tl-ticks { position: relative; height: 14px; margin-top: 4px; }
.tl-tick {
  position: absolute;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 600;
  color: var(--iv-text-light);
  font-variant-numeric: tabular-nums;
}

/* ---------- Team filters / admin search ---------- */
.team-filters { display: flex; gap: 8px; }
.team-filters select {
  font-family: var(--font);
  font-size: 13.5px;
  padding: 8px 12px;
  border: 1.5px solid var(--iv-border);
  border-radius: var(--iv-radius-md);
  background: var(--iv-white);
  color: var(--iv-text);
  max-width: 180px;
}
.team-filters select:focus { outline: none; border-color: var(--iv-primary); box-shadow: var(--iv-focus-ring); }

.emp-search {
  font-family: var(--font);
  width: 100%;
  font-size: 14px;
  padding: 10px 14px;
  border: 1.5px solid var(--iv-border);
  border-radius: var(--iv-radius-md);
  margin-bottom: 10px;
}
.emp-search::placeholder { color: var(--iv-muted); }
.emp-search:focus { outline: none; border-color: var(--iv-primary); box-shadow: var(--iv-focus-ring); }

/* ---------- Entry form ---------- */
.entry-card {
  background: var(--iv-white);
  border: 1px solid var(--iv-border);
  border-radius: var(--iv-radius-xl);
  padding: 24px 24px 18px;
  box-shadow: var(--iv-shadow-sm);
  margin-bottom: 24px;
}

.entry-form {
  display: grid;
  grid-template-columns: 170px 1fr 110px 1.2fr auto;
  gap: 14px;
  align-items: end;
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--iv-text-mid);
}
.field .opt { font-weight: 400; color: var(--iv-text-light); }

.field select, .field input {
  font-family: var(--font);
  font-size: 15px;
  padding: 11px 14px;
  border: 1.5px solid var(--iv-border);
  border-radius: var(--iv-radius-md);
  background: var(--iv-white);
  color: var(--iv-text);
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input::placeholder { color: var(--iv-muted); font-weight: 400; }
.field input[type='number'] { font-weight: 600; font-variant-numeric: tabular-nums; }
.field select:focus, .field input:focus {
  outline: none;
  border-color: var(--iv-primary);
  box-shadow: var(--iv-focus-ring);
}
.field input:disabled { background: var(--iv-cream); color: var(--iv-text-mid); }

.primary-btn {
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
  background: var(--iv-primary);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: var(--iv-radius-md);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  white-space: nowrap;
}
.primary-btn:hover {
  background: var(--iv-primary-deep);
  transform: translateY(-1px);
  box-shadow: var(--iv-shadow-btn);
}
.primary-btn:active { transform: translateY(0); }

.quick-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--iv-border);
}
.quick-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--iv-text-light);
  margin-right: 4px;
}

.chip {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: var(--iv-radius-pill);
  border: 1.5px solid var(--iv-border);
  background: var(--iv-white);
  color: var(--iv-text-mid);
  cursor: pointer;
  transition: var(--iv-transition);
}
.chip:hover { border-color: var(--iv-primary); color: var(--iv-primary); background: var(--iv-primary-tint); }

.form-error {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--iv-error-bg);
  color: var(--iv-error);
  border-left: 3px solid var(--iv-error);
  border-radius: var(--iv-radius-sm);
  font-size: 13px;
  font-weight: 500;
}

/* ---------- Entries list ---------- */
.entries-list { display: flex; flex-direction: column; gap: 8px; }

.entry-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--iv-white);
  border: 1px solid var(--iv-border);
  border-radius: var(--iv-radius-lg);
  padding: 14px 18px;
  animation: fadeUp 0.25s ease;
}

.entry-badge {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: var(--iv-radius-pill);
  white-space: nowrap;
}
.badge-project_work { background: var(--iv-primary-tint); color: var(--iv-primary); }
.badge-project_training { background: var(--iv-info-bg); color: var(--iv-info); }
.badge-break { background: var(--iv-warning-bg); color: var(--iv-warning-text); }
.badge-corp { background: #F7E8EC; color: var(--iv-primary-light); }
.badge-it_issue { background: var(--iv-error-bg); color: var(--iv-error); }
.badge-leave { background: #F1E8E2; color: var(--iv-text-mid); }

.entry-main { flex: 1; min-width: 0; }
.entry-title { font-weight: 600; font-size: 14.5px; }
.entry-desc {
  font-size: 12.5px;
  color: var(--iv-text-mid);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-hours {
  font-weight: 800;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
  color: var(--iv-text);
  white-space: nowrap;
}
.entry-hours span { font-size: 11px; color: var(--iv-text-light); font-weight: 400; }

.entry-delete {
  border: none;
  background: transparent;
  color: var(--iv-text-light);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 9px;
  border-radius: var(--iv-radius-sm);
  transition: var(--iv-transition);
}
.entry-delete:hover { color: var(--iv-error); background: var(--iv-error-bg); }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--iv-text-light);
}
.empty-state .big { font-size: 20px; font-weight: 700; color: var(--iv-text-mid); margin-bottom: 4px; letter-spacing: -0.3px; }

/* ---------- Team view ---------- */
.team-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.team-header h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.2; }

.range-picker { display: flex; gap: 6px; }
.range-chip.active { background: var(--iv-primary); border-color: var(--iv-primary); color: #fff; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--iv-white);
  border: 1px solid var(--iv-border);
  border-radius: var(--iv-radius-lg);
  padding: 18px 20px;
  box-shadow: var(--iv-shadow-sm);
}
.stat-value { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--iv-text-light);
  margin-top: 4px;
}
.stat-card.warn .stat-value { color: var(--iv-error); }

.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.panel {
  background: var(--iv-white);
  border: 1px solid var(--iv-border);
  border-radius: var(--iv-radius-xl);
  padding: 24px;
  box-shadow: var(--iv-shadow-sm);
}
.panel h3 { font-size: 16px; font-weight: 700; margin-bottom: 14px; letter-spacing: -0.2px; }
.panel h3.mt { margin-top: 24px; }

.bar-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.bar-name { width: 150px; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; height: 16px; background: #F1E8E2; border-radius: var(--iv-radius-sm); overflow: hidden; }
.bar-fill { height: 100%; background: var(--iv-primary); border-radius: var(--iv-radius-sm); transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.bar-fill.alt { background: var(--iv-primary-light); }
.bar-fill.amber { background: var(--iv-warning); }
.bar-fill.red { background: var(--iv-error); }
.bar-val { font-size: 12.5px; font-weight: 600; width: 52px; text-align: right; font-variant-numeric: tabular-nums; }

.sub-note { font-size: 12.5px; color: var(--iv-text-light); }

/* ---------- Allocation board ---------- */
.alloc-layout { display: flex; flex-direction: column; gap: 16px; }

.alloc-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.alloc-card {
  background: var(--iv-white);
  border: 1.5px solid var(--iv-border);
  border-radius: var(--iv-radius-lg);
  padding: 14px 16px;
  cursor: pointer;
  transition: var(--iv-transition);
  box-shadow: var(--iv-shadow-sm);
}
.alloc-card:hover { border-color: var(--iv-primary); transform: translateY(-1px); }
.alloc-card.sel { border-color: var(--iv-primary); box-shadow: var(--iv-focus-ring); }
.alloc-card.unassigned { border-style: dashed; background: var(--iv-warning-bg); border-color: var(--iv-warning); }

.alloc-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.alloc-client {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--iv-text-light);
}
.alloc-name { font-weight: 700; font-size: 14.5px; line-height: 1.3; }
.alloc-count {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--iv-primary);
  font-variant-numeric: tabular-nums;
}
.alloc-card.unassigned .alloc-count { color: var(--iv-warning-text); }

.alloc-teams { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.alloc-team {
  font-size: 11px;
  font-weight: 600;
  background: var(--iv-cream);
  border: 1px solid var(--iv-border);
  color: var(--iv-text-mid);
  border-radius: var(--iv-radius-pill);
  padding: 2px 9px;
}

.alloc-detail-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.alloc-detail-head h3 { font-size: 17px; font-weight: 700; }

.alloc-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid var(--iv-border);
  margin-bottom: 6px;
}
.alloc-selall { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; cursor: pointer; }
.alloc-actions select {
  font-family: var(--font);
  font-size: 13.5px;
  padding: 8px 12px;
  border: 1.5px solid var(--iv-border);
  border-radius: var(--iv-radius-md);
  max-width: 240px;
}
.alloc-actions .primary-btn { padding: 8px 18px; font-size: 13.5px; }

.alloc-rows { max-height: 420px; overflow-y: auto; }
.alloc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
  border-top: 1px solid #F5EDE7;
  cursor: pointer;
}
.alloc-row:hover { background: var(--iv-cream); }
.alloc-row-main { flex: 1; min-width: 0; }
.alloc-row input[type='checkbox'] { width: 16px; height: 16px; accent-color: var(--iv-primary); }
.alloc-multi {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: var(--iv-info-bg);
  color: var(--iv-info);
  border-radius: var(--iv-radius-pill);
  padding: 2px 8px;
}

/* ---------- Admin ---------- */
.inline-form { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.inline-form input, .inline-form select {
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 14px;
  border: 1.5px solid var(--iv-border);
  border-radius: var(--iv-radius-md);
  flex: 1;
  min-width: 110px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.inline-form input::placeholder { color: var(--iv-muted); }
.inline-form input:focus, .inline-form select:focus {
  outline: none;
  border-color: var(--iv-primary);
  box-shadow: var(--iv-focus-ring);
}

.client-group { margin-bottom: 6px; }
.client-group-name {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--iv-text-light);
  padding: 12px 4px 4px;
  border-bottom: 1px solid #F1E8E2;
}

.admin-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 4px;
  border-top: 1px solid #F5EDE7;
}
.admin-item-main { flex: 1; min-width: 0; }
.admin-item-name { font-weight: 600; font-size: 14.5px; }
.admin-item-sub { font-size: 12.5px; color: var(--iv-text-light); }
.admin-item.inactive .admin-item-name { color: var(--iv-text-light); text-decoration: line-through; }

.type-chip {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 2px 8px;
  border-radius: var(--iv-radius-pill);
  vertical-align: 2px;
  margin-left: 4px;
}
.type-egocentric_collection { background: var(--iv-info-bg); color: var(--iv-info); }
.type-egocentric_annotation { background: var(--iv-primary-tint); color: var(--iv-primary); }
.type-original_labelling { background: var(--iv-warning-bg); color: var(--iv-warning-text); }

.tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--iv-primary-tint);
  color: var(--iv-primary);
  border-radius: var(--iv-radius-pill);
  padding: 3px 10px;
  margin: 2px 3px 0 0;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--iv-transition);
}
.tag.off { background: #F1E8E2; color: var(--iv-text-light); }
.tag:hover { border-color: var(--iv-primary); }

.mini-btn {
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 500;
  border: 1.5px solid var(--iv-border);
  background: var(--iv-white);
  color: var(--iv-text-mid);
  padding: 6px 14px;
  border-radius: var(--iv-radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--iv-transition);
}
.mini-btn:hover { border-color: var(--iv-primary); color: var(--iv-primary); }

/* ---------- Login: two-panel split ---------- */
body.login-mode .topbar, body.login-mode main, body.login-mode .iv-footer { display: none; }

.login-screen {
  min-height: 100vh;
  display: flex;
}

.login-brand-panel {
  flex: 1.1;
  min-height: 100vh;
  background: linear-gradient(160deg, #B84261 0%, #A7354D 35%, #7E2238 70%, #5C1528 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 64px;
  position: relative;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
}
.blob.b1 { width: 500px; height: 500px; background: #D45A74; opacity: 0.25; top: -10%; left: -15%; }
.blob.b2 { width: 400px; height: 400px; background: #F0A0B0; opacity: 0.15; bottom: -12%; right: -10%; animation-delay: -7s; }
.blob.b3 { width: 300px; height: 300px; background: #FF8FA3; opacity: 0.12; top: 40%; left: 50%; animation-delay: -13s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(15px, 35px) scale(1.02); }
}

.login-brand-inner { position: relative; z-index: 1; animation: fadeUp 0.5s ease; }

.login-logo {
  height: 52px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
  margin-bottom: 40px;
  display: block;
}

.login-tagline {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 18px;
}
.login-tagline .hl {
  background: linear-gradient(90deg, #FFD4DC, #FFFFFF);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-brand-desc {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
  max-width: 440px;
}

.login-form-panel {
  flex: 0.9;
  min-height: 100vh;
  background: var(--iv-white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
}

.login-card {
  width: 100%;
  max-width: 368px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeUp 0.5s ease 0.1s both;
}

.login-appname {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--iv-primary);
}

.login-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.login-sub { font-size: 14.5px; color: var(--iv-text-mid); margin-top: -8px; }

.login-card .field input { padding: 13px 16px; }

.login-btn { padding: 14px 20px; font-size: 15px; margin-top: 4px; }

.login-foot {
  font-size: 12.5px;
  color: var(--iv-text-light);
  text-align: center;
}

/* ---------- Change password popover ---------- */
.pw-popover {
  position: fixed;
  top: 68px;
  right: 24px;
  z-index: 40;
  width: 300px;
  background: var(--iv-white);
  border: 1px solid var(--iv-border);
  border-radius: var(--iv-radius-xl);
  padding: 22px 24px;
  box-shadow: 0 12px 32px rgba(26, 26, 46, 0.16);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeUp 0.25s ease;
}
.pw-popover h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.2px; }
.login-hint {
  font-size: 12.5px;
  color: var(--iv-warning-text);
  background: var(--iv-warning-bg);
  border-radius: var(--iv-radius-sm);
  padding: 8px 12px;
  font-weight: 600;
}
.pw-popover-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- Temp password note ---------- */
.temp-pw-note {
  background: var(--iv-warning-bg);
  border: 1px solid var(--iv-warning);
  border-radius: var(--iv-radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 13.5px;
  animation: fadeUp 0.25s ease;
}
.temp-pw-note code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  background: #fff;
  border: 1px solid var(--iv-border);
  border-radius: var(--iv-radius-sm);
  padding: 2px 8px;
  font-weight: 700;
  font-size: 13.5px;
}
.temp-pw-sub { font-size: 12px; color: var(--iv-warning-text); margin-top: 4px; }
.temp-pw-actions { display: flex; gap: 8px; margin-top: 10px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--iv-primary-deep);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--iv-radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(92, 21, 40, 0.3);
  animation: fadeUp 0.25s ease;
  z-index: 50;
}

/* ---------- Footer ---------- */
.iv-footer {
  background: var(--iv-footer);
  color: rgba(255, 255, 255, 0.75);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.iv-footer-left { display: flex; align-items: center; gap: 16px; }
.iv-footer-logo { height: 30px; filter: brightness(0) invert(1); opacity: 0.9; }
.iv-footer-mission { font-size: 12.5px; font-style: italic; color: rgba(255, 255, 255, 0.7); max-width: 420px; }
.iv-footer-badges { display: flex; gap: 16px; flex-wrap: wrap; }
.iv-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.6;
}
.iv-badge svg { width: 12px; height: 12px; fill: currentColor; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .login-screen { flex-direction: column; }
  .login-brand-panel { min-height: unset; flex: none; padding: 36px 32px; }
  .login-form-panel { min-height: unset; flex: none; padding: 36px 32px; }
  .login-tagline { font-size: 34px; }
  .login-brand-desc { display: none; }
  .login-logo { margin-bottom: 24px; height: 40px; }
  .entry-form { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .topbar { flex-wrap: wrap; gap: 12px; }
  .whoami { margin-left: 0; }
}

@media (max-width: 600px) {
  .login-brand-panel, .login-form-panel { padding: 28px 24px; }
  .login-tagline { font-size: 28px; }
}
