@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-2: #f0f3f8;
  --ink: #0c1220;
  --muted: #5b6477;
  --brand: #1e4fd8;
  --brand-2: #15328f;
  --accent: #ffb545;
  --good: #18a957;
  --warn: #f4b740;
  --bad: #d84a4a;
  --shadow: 0 12px 30px rgba(18, 31, 61, 0.08);
  --radius: 14px;
  font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: inherit; }

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px 1fr;
  background:
    radial-gradient(800px 380px at 100% 0%, #e7eeff 0%, transparent 60%),
    radial-gradient(800px 380px at 0% 100%, #f8f0ff 0%, transparent 55%),
    var(--bg);
}
.app.auth { grid-template-columns: 1fr; }
.auth-body .topbar { display: none; }
.auth-body .sidebar { display: none; }
.auth-body .content { padding: 0; }

.sidebar {
  background:
    radial-gradient(420px 200px at 20% 0%, rgba(124, 108, 255, 0.2), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(245,243,255,0.98));
  border-right: 1px solid rgba(128, 104, 214, 0.22);
  padding: 22px 16px 26px;
  position: sticky;
  top: 0;
  height: 100%;
  backdrop-filter: blur(10px);
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.5);
  transition: width .25s ease, padding .25s ease;
}
.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}
.brand-text { display: inline-block; }
.sidebar-toggle {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(132, 116, 206, 0.25);
  background: rgba(255,255,255,0.9);
  color: #5a67d6;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.sidebar-toggle:hover {
  transform: translateX(1px);
  box-shadow: 0 10px 20px rgba(94, 110, 255, 0.3);
}
.sidebar-toggle svg { width: 16px; height: 16px; }
.brand {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--brand);
  letter-spacing: 0.3px;
  margin-bottom: 18px;
}
.usercard {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--panel-2);
  border-radius: var(--radius);
  margin-bottom: 18px;
}
.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.uname {
  font-weight: 600;
  font-size: 14px;
}
.small { font-size: 12px; color: var(--muted); }
.agent-status-badge {
  margin-top: 6px;
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef0f7;
  color: #4a4f63;
  font-weight: 600;
}
.agent-status-badge[data-state="online"] {
  background: #e6f7ee;
  color: #2c7a4b;
}
.agent-status-badge[data-state="stale"] {
  background: #fff7e6;
  color: #8a5d14;
}
.agent-status-badge[data-state="offline"] {
  background: #fdeaea;
  color: #9b2c2c;
}
.agent-status-badge[data-state="pending"] {
  background: #eef4ff;
  color: #1e4fd8;
}
.agent-status-badge[data-state="offline"] {
  cursor: pointer;
  text-decoration: underline;
}

.agent-ready.ok { color: #2c7a4b; }
.agent-ready.warn { color: #8a5d14; }
.agent-ready.bad { color: #9b2c2c; }

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.side-nav a {
  text-decoration: none;
  padding: 10px 12px 10px 40px;
  border-radius: 14px;
  color: #4b4772;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.side-nav .nav-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  color: #6a7bff;
}
.side-nav .nav-icon svg {
  width: 18px;
  height: 18px;
}
.side-nav a:hover {
  background: rgba(94, 110, 255, 0.12);
  transform: translateX(2px);
}
.side-nav a.active {
  background: linear-gradient(135deg, #5d78ff, #6c4fff);
  color: #fff;
  box-shadow: 0 10px 22px rgba(94, 110, 255, 0.35);
}
.side-nav .nav-label { flex: 1; }
.side-nav .nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--bad);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 6px 12px rgba(216, 74, 74, 0.25);
}
.side-nav .nav-badge.warn {
  background: var(--warn);
  color: #3a2d05;
  box-shadow: 0 6px 12px rgba(244, 183, 64, 0.3);
}
.side-nav .nav-badge.good {
  background: var(--good);
  box-shadow: 0 6px 12px rgba(24, 169, 87, 0.28);
}
.side-nav a.active .nav-badge {
  background: rgba(255,255,255,0.92);
  color: #4a3fd6;
  box-shadow: 0 8px 16px rgba(255, 255, 255, 0.35);
}
.side-nav a::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 6px;
  transform: translateY(-50%);
  background: rgba(94, 110, 255, 0.22);
  box-shadow: inset 0 0 0 2px rgba(94, 110, 255, 0.2);
}
.side-nav a.active::before {
  background: rgba(255,255,255,0.9);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.6);
}

.app.sidebar-collapsed { grid-template-columns: 86px 1fr; }
.app.sidebar-collapsed .sidebar { padding: 18px 10px 20px; }
.app.sidebar-collapsed .brand-text { display: none; }
.app.sidebar-collapsed .usercard { justify-content: center; padding: 10px; }
.app.sidebar-collapsed .user-meta { display: none; }
.app.sidebar-collapsed .side-nav a { padding: 10px; }
.app.sidebar-collapsed .side-nav .nav-icon {
  position: static;
  transform: none;
}
.app.sidebar-collapsed .side-nav a::before { display: none; }
.app.sidebar-collapsed .side-nav a { justify-content: center; }
.side-nav .nav-icon { z-index: 1; }
.app.sidebar-collapsed .side-nav .nav-label { display: none; }
.app.sidebar-collapsed .side-nav .nav-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  margin-left: 0;
}
.app.sidebar-collapsed .sidebar-toggle svg { transform: rotate(180deg); }

.main {
  display: flex;
  flex-direction: column;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px;
  background: rgba(255,255,255,0.8);
  border-bottom: 1px solid #e6eaf2;
  backdrop-filter: blur(8px);
}
.title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 20px;
}
.content {
  padding: 22px 26px 32px;
  display: grid;
  gap: 14px;
}

.card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card.gray {
  background: var(--panel-2);
  box-shadow: none;
}
.narrow { max-width: 520px; margin: 60px auto; }

.row { display: flex; gap: 10px; align-items: center; }
.row.space { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.col { flex: 1 1 140px; }

.btn {
  display: inline-block;
  border: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(30, 79, 216, 0.25); }
.btn.secondary { background: #e7ebf7; color: #142144; }
.btn.danger { background: var(--bad); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

.input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dfe4ee;
  border-radius: 12px;
  background: #fff;
}
.label { display: block; margin: 10px 0 6px; font-size: 12px; color: var(--muted); }

.multi-select {
  position: relative;
  width: 100%;
}
.multi-select__control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dfe4ee;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  position: relative;
}
.multi-select__placeholder {
  color: #1b2438;
  font-size: 14px;
}
.multi-select__control::after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #5b6477;
  font-size: 12px;
}
.multi-select__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e2e7f2;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(12, 18, 32, 0.12);
  padding: 10px;
  display: none;
  z-index: 20;
}
.multi-select.open .multi-select__menu {
  display: block;
}
.multi-select__search {
  margin-bottom: 8px;
}
.multi-select__options {
  max-height: 220px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-right: 4px;
}
.multi-select__option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #1b2438;
  cursor: pointer;
  padding: 8px 10px;
  border: 1px solid #e5e9f4;
  border-radius: 10px;
  background: #f5f7ff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5);
}
.multi-select__option input {
  width: 14px;
  height: 14px;
}
.multi-select__select-all {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef1f6;
  background: #fff;
  box-shadow: none;
}
.multi-select__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.multi-select__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1b2438;
  font-size: 12px;
}
.multi-select__chip button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px; border-bottom: 1px solid #eef1f6; font-size: 14px; }
.table-wrap { overflow: auto; }
.table tr.emp-row-click { cursor: pointer; }
.table tr.emp-row-click:hover { background: #f7f9ff; }
.table tr.user-row { cursor: pointer; }
.table tr.user-row:hover { background: #f7f9ff; }

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef1f6;
  font-size: 12px;
}
.badge.ok { background: #e0f6ea; color: #116437; }
.badge.warn { background: #fff3cd; color: #7a4f00; }
.badge.bad { background: #fde1e1; color: #8a1e1e; }

.alert { border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.alert.ok { background: #e0f6ea; }
.alert.warn { background: #fff3cd; }
.alert.bad { background: #fde1e1; }

.tabs {
  display: inline-flex;
  gap: 8px;
  background: #f2f4fb;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid #e6eaf2;
}
.tab-btn {
  border: 1px solid transparent;
  background: #fff;
  color: #1b2438;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all .15s ease;
}
.tab-btn.active {
  background: #fff;
  border-color: #d8def0;
  box-shadow: 0 6px 16px rgba(22, 33, 58, 0.08);
  color: #1b2438;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.profile-list { display: grid; gap: 8px; }
.profile-row { display: grid; grid-template-columns: 160px 1fr; gap: 12px; }
.profile-label { font-weight: 600; color: #555; }

.auth-wrap {
  min-height: calc(100vh - 40px);
  display: grid;
  place-items: center;
  padding: 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border-radius: 18px;
  padding: 28px 26px 22px;
  box-shadow: 0 18px 40px rgba(22, 32, 62, 0.12);
  text-align: center;
}
.auth-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #6b3ac9, #9b5cf6);
  box-shadow: 0 10px 20px rgba(107, 58, 201, 0.3);
}
.auth-card h2 { margin: 8px 0 4px; font-size: 20px; }
.auth-card .small { min-height: 0; }
.auth-btn {
  width: 100%;
  justify-content: center;
  background: linear-gradient(135deg, #6b3ac9, #8a4ef2);
  border-radius: 12px;
  margin-top: 12px;
}

.calendar-card { position: relative; overflow: hidden; }
.calendar-card.admin-cal {
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fd 100%);
  border: 1px solid #e6eaf2;
  box-shadow: 0 14px 34px rgba(22, 33, 58, 0.08);
}
.calendar-card.admin-cal .cal-title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  letter-spacing: 0.2px;
}
.calendar-card.admin-cal .cal-day {
  height: 44px;
  background: #f4f7fc;
  border-radius: 14px;
}
.calendar-card.admin-cal .cal-day.today {
  background: #e7f0ff;
  box-shadow: inset 0 0 0 2px #2b6dfb;
  color: #1b2438;
}
.calendar-card.admin-cal .cal-day.selected {
  background: linear-gradient(135deg, #2b6dfb, #1e4fd8);
  color: #fff;
}
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.cal-title { font-weight: 700; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #e1e6f2;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  color: var(--ink);
}
.cal-month {
  min-width: 150px;
  text-align: center;
  font-weight: 600;
  color: var(--muted);
}
.cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin: 10px 0 8px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.cal-day {
  border: 0;
  background: #f6f8fc;
  border-radius: 12px;
  height: 42px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  position: relative;
  padding-bottom: 10px;
}
.cal-day:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(19, 35, 66, 0.12);
}
.cal-day.muted { color: #a5aebb; background: #f2f4f8; }
.cal-day.today {
  background: #eef6ff;
  color: #1b2438;
  box-shadow: inset 0 0 0 2px #2b6dfb;
}
.cal-day.selected {
  background: linear-gradient(135deg, #2b6dfb, #1e4fd8);
  color: #fff;
}
.cal-day.present-day { background: #ecfff4; }
.cal-day.absent-day { background: #fff7e6; }
.cal-day.lop-day { background: #fff1f1; }
.cal-day.half-day { background: #f5f0ff; }
.day-dots {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
}
.day-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #dfe4ee;
  box-shadow: 0 0 0 2px #fff;
}
.day-dot.present { background: #16a34a; }
.day-dot.absent { background: #f59e0b; }
.day-dot.half { background: #7c3aed; }
.day-dot.lop { background: #dc2626; }
.cal-day.muted .day-dot { opacity: 0.35; }

.cal-legend {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.cal-legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f6f8fc;
  padding: 4px 8px;
  border-radius: 999px;
}
.cal-legend .legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
  }
.legend-dot.present { background: #16a34a; }
.legend-dot.absent { background: #f59e0b; }
.legend-dot.half { background: #7c3aed; }
.legend-dot.lop { background: #dc2626; }
.legend-dot.today { background: #2b6dfb; }

.dashboard-hero {
  margin-bottom: 12px;
}
.dash-title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
}
.dash-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 16px;
}
.dash-main, .dash-side {
  display: grid;
  gap: 14px;
}

.tips-card {
  background:
    radial-gradient(320px 180px at 12% 0%, rgba(255, 232, 168, 0.55), rgba(255,255,255,0)),
    radial-gradient(340px 200px at 100% 20%, rgba(188, 206, 255, 0.45), rgba(255,255,255,0)),
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,248,227,0.92));
  border: 1px solid rgba(255, 200, 116, 0.35);
  position: relative;
  overflow: visible;
  box-shadow: 0 16px 36px rgba(36, 52, 92, 0.08);
  transition: transform .25s ease, box-shadow .25s ease;
}
.tips-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(36, 52, 92, 0.12);
}
.tips-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.tips-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  position: relative;
  padding-bottom: 4px;
}
.tips-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 56%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb545, rgba(255, 181, 69, 0));
}
.tips-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffe38f, #ffc36b);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 16px rgba(255, 196, 72, 0.35);
}
.tips-emoji {
  font-size: 28px;
  opacity: 0.85;
}
.tips-illustration {
  position: absolute;
  right: -2px;
  top: -170px;
  width: 260px;
  height: 260px;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.tips-illustration img {
  width: 220px;
  height: auto;
  object-fit: contain;
  transform: translateY(26px);
  filter: drop-shadow(0 10px 18px rgba(255, 196, 72, 0.28));
  animation: tipsFloat 7s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

.tips-body {
  padding-right: 220px;
}

.tips-card::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -80px;
  width: 300px;
  height: 200px;
  background: radial-gradient(140px 90px at 50% 60%, rgba(255, 222, 159, 0.55), rgba(255,255,255,0));
  pointer-events: none;
}
@keyframes tipsFloat {
  0% { transform: translateY(26px); }
  50% { transform: translateY(14px); }
  100% { transform: translateY(26px); }
}
.tips-body p { margin: 0 0 10px; }
.tips-form { display: grid; gap: 10px; }
.tips-textarea {
  resize: vertical;
  min-height: 90px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(255, 206, 121, 0.5);
  box-shadow: inset 0 1px 2px rgba(120, 98, 28, 0.08);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.tips-textarea:focus {
  border-color: rgba(86, 120, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(86, 120, 255, 0.12);
  outline: none;
}
.tips-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.tips-actions .btn {
  box-shadow: 0 10px 20px rgba(30, 79, 216, 0.22);
}
.tips-actions .btn.secondary {
  box-shadow: none;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.92);
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(132, 116, 206, 0.18);
  box-shadow: var(--shadow-soft);
}
.stat-card:nth-child(1) { background: linear-gradient(135deg, rgba(93,120,255,0.18), rgba(255,255,255,0.9)); }
.stat-card:nth-child(2) { background: linear-gradient(135deg, rgba(255,196,72,0.2), rgba(255,255,255,0.9)); }
.stat-card:nth-child(3) { background: linear-gradient(135deg, rgba(76,200,140,0.2), rgba(255,255,255,0.9)); }
.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.blue { background: rgba(93, 120, 255, 0.18); color: #4257d6; }
.stat-icon.amber { background: rgba(255, 196, 72, 0.2); color: #c07a00; }
.stat-icon.green { background: rgba(76, 200, 140, 0.2); color: #168c55; }
.stat-value {
  font-size: 20px;
  font-weight: 700;
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
}

.quick-actions .actions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.action-tile {
  display: grid;
  gap: 6px;
  align-items: center;
  justify-items: start;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(132, 116, 206, 0.18);
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease;
}
.action-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(94, 110, 255, 0.25);
}
.tile-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(93, 120, 255, 0.18);
}
.tile-icon svg { width: 18px; height: 18px; }

.action-tile:nth-child(1) .tile-icon { background: rgba(93, 120, 255, 0.22); color: #3555d6; }
.action-tile:nth-child(2) .tile-icon { background: rgba(255, 187, 81, 0.25); color: #c27600; }
.action-tile:nth-child(3) .tile-icon { background: rgba(76, 200, 140, 0.25); color: #168c55; }
.action-tile:nth-child(4) .tile-icon { background: rgba(146, 108, 255, 0.22); color: #6a4fff; }

.digest-card {
  display: grid;
  gap: 2px;
  align-content: start;
  background: linear-gradient(160deg, rgba(255,255,255,0.95), rgba(236,230,255,0.9));
}
.digest-top {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}
.digest-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255, 196, 72, 0.2);
  color: #b86a00;
  box-shadow: inset 0 0 0 2px rgba(255, 196, 72, 0.3);
}
.digest-icon svg { width: 24px; height: 24px; }
.digest-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.digest-time {
  font-size: 26px;
  font-weight: 700;
}
.digest-date { color: var(--muted); }
.digest-meta { font-size: 12px; color: #3b4a70; }

.approvals-card .approvals-list {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}
.approval-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(132, 116, 206, 0.18);
}
.approval-item:hover { box-shadow: var(--shadow-soft); }
.approval-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5d78ff, #6a4fff);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.approval-name { font-weight: 600; }
.approval-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(76, 200, 140, 0.25);
  color: #168c55;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.time-card {
  background: radial-gradient(140% 120% at 100% 0%, rgba(30, 79, 216, 0.12), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
  border: 1px solid #e5eaf7;
}
.time-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.time-card__title {
  font-weight: 700;
  font-size: 16px;
}
.time-card__body {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  align-items: center;
}
.time-card__clock {
  display: grid;
  gap: 6px;
}
.time-card__time {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.time-card__date {
  font-size: 14px;
  color: var(--muted);
}
.time-card__meta {
  font-size: 12px;
  color: #3b4a70;
}
.time-card__select {
  font-weight: 600;
}
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e9f8f0;
  color: #146b3a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: livePulse 1.6s ease-out infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.timezone-panel {
  max-width: 420px;
}
.timezone-select {
  font-weight: 600;
}
.floating-clock {
  position: fixed;
  right: 10px;
  bottom: 10px;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(132, 116, 206, 0.25);
  box-shadow: 0 16px 40px rgba(94, 110, 255, 0.22);
  border-radius: 12px;
  padding: 6px 10px;
  min-width: 96px;
  backdrop-filter: blur(8px);
}
.floating-clock__time {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
}
.floating-clock__date,
.floating-clock__meta { display: none; }
.auth-body .floating-clock { display: none; }

@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .topbar { padding: 14px 16px; grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .grid2 { grid-template-columns: 1fr; }
  .row.space { flex-direction: column; align-items: flex-start; gap: 8px; }
  .time-card__body { grid-template-columns: 1fr; align-items: flex-start; }
  .floating-clock { right: 8px; bottom: 8px; min-width: 88px; }
  .stats-row { grid-template-columns: 1fr; }
  .quick-actions .actions-grid { grid-template-columns: 1fr 1fr; }
}

.swal2-popup.swal-wide {
  width: 860px;
}
.swal-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  text-align: left;
}
.swal-form label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.swal-form input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #dfe4ee;
  border-radius: 10px;
}
@media (max-width: 900px) {
  .swal2-popup.swal-wide { width: 94vw; }
  .swal-form { grid-template-columns: 1fr; }
}

.swal2-popup.emp-modal-popup {
  width: 520px;
  padding: 24px 24px 18px;
}
.emp-modal-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 14px;
  color: #3b3b3b;
  text-align: left;
}
.emp-modal-body {
  display: grid;
  gap: 8px;
}
.emp-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  align-items: center;
  text-align: left;
}
.emp-label {
  font-weight: 600;
  color: #555;
}
.emp-value {
  color: #5f5f5f;
  word-break: break-word;
}
@media (max-width: 900px) {
  .swal2-popup.emp-modal-popup { width: 92vw; }
  .emp-row { grid-template-columns: 1fr; gap: 4px; }
}

.swal2-popup.emp-modal-popup { width: 560px; }
.salary-modal { padding: 10px 6px 4px; }
.salary-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(14, 59, 58, 0.08);
}
.salary-grid th, .salary-grid td { padding: 12px 14px; border: 1px solid #2f3b40; }
.salary-grid thead th { background: #0e3b3a; color: #fff; font-weight: 700; }
.salary-grid tbody tr:nth-child(odd) { background: #fbfcfd; }
.salary-grid .row-total td { font-weight: 700; background: #f4f7f7; }
.salary-grid .right { text-align: right; }
.salary-grid .amount { white-space: nowrap; font-variant-numeric: tabular-nums; }

.payslip-card {
  padding: 20px 22px;
}
.payslip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid #e6eaf2;
  padding-bottom: 12px;
}
.payslip-brand {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 18px;
}
.payslip-sub {
  font-size: 12px;
  color: var(--muted);
}
.payslip-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.payslip-section {
  margin-top: 16px;
}
.payslip-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
}
.payslip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px 16px;
  border: 1px solid #eef1f6;
  padding: 12px;
  border-radius: 12px;
  background: #fafcff;
}
.payslip-grid span,
.payslip-list span,
.payslip-table span {
  font-size: 12px;
  color: var(--muted);
}
.payslip-grid strong,
.payslip-list strong,
.payslip-table strong {
  display: block;
  font-weight: 600;
  color: #1b2438;
}
.payslip-box {
  border: 1px solid #eef1f6;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}
.payslip-list,
.payslip-table {
  display: grid;
  gap: 8px;
}
.payslip-table .total {
  border-top: 1px dashed #dfe4ee;
  padding-top: 8px;
  margin-top: 4px;
}
.payslip-net {
  display: grid;
  gap: 6px;
}
.payslip-net-amount {
  font-size: 26px;
  font-weight: 700;
  color: #0f1f4d;
}
.payslip-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #eef1f6;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.sticky-note {
  background: linear-gradient(180deg, #fff7d6 0%, #fff1b8 100%);
  border: 1px solid #f2dea0;
  box-shadow: 0 10px 24px rgba(120, 98, 28, 0.18);
}
.sticky-note__input {
  background: #fff9da;
  border-color: #f2dea0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 14px;
  resize: vertical;
}
.shift-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}
.shift-meta {
  display: grid;
  gap: 6px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.shift-mini-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 14px;
  background: linear-gradient(160deg, #141b2f 0%, #1b2543 70%, #1f2a4d 100%);
  border: 1px solid #2b3554;
  box-shadow: 0 10px 24px rgba(18, 26, 48, 0.3);
}
.shift-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.shift-ring-face {
  --p: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: conic-gradient(#f4b740 calc(var(--p) * 1%), #3c4a70 0);
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.08);
}
.shift-ring-face::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #273153 0%, #101826 70%);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.4);
}
.shift-ring-value {
  position: relative;
  z-index: 1;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  color: #f0f4ff;
  font-size: 14px;
}
.shift-ring-label {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a7b2d6;
}

@media (max-width: 900px) {
  .shift-top {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .topbar-right {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .shift-mini-timer {
    order: 2;
  }
}

.download-card {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #e6ebf5;
  border-radius: 12px;
  background: #f7f9fd;
}

.download-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.download-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.download-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d5def0;
  background: #ffffff;
  color: #2a2a2a;
  text-decoration: none;
  font-weight: 600;
}
.download-item .download-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: #eef2ff;
  color: #3947d1;
  border: 1px solid rgba(57, 71, 209, 0.2);
}
.download-item .download-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  border: 1px solid transparent;
}
.download-item .download-status.available {
  background: #e7f7ef;
  color: #1f7a3e;
  border-color: rgba(31, 122, 62, 0.2);
}
.download-item .download-status.missing {
  background: #fff4e8;
  color: #9a4c00;
  border-color: rgba(154, 76, 0, 0.2);
}

.download-item.recommended {
  border-color: #6c5ce7;
  box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.15);
}

.download-item.disabled {
  opacity: 0.6;
  background: #f1f3f8;
  border-style: dashed;
  cursor: not-allowed;
}

.swal2-popup {
  font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

.agent-pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 11px;
}
.agent-pill.ok {
  background: #e6f7ee;
  color: #2c7a4b;
  border: 1px solid #bfead2;
}
.agent-pill.no {
  background: #fdeaea;
  color: #9b2c2c;
  border: 1px solid #f7c4c4;
}
.agent-pill.warn {
  background: #fff4e5;
  color: #8a5d14;
  border: 1px solid #f5d5a8;
}
.agent-pill.pending {
  background: #eef4ff;
  color: #1e4fd8;
  border: 1px solid #cfe0ff;
}

.agent-status-page {
  max-width: 700px;
}
.agent-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.agent-status-card {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #e6ebf5;
  background: #f7f9fd;
}
.agent-status-title {
  font-weight: 700;
  margin-bottom: 8px;
}
.agent-status-value {
  font-weight: 700;
  font-size: 16px;
}
.agent-status-value.ok { color: #2c7a4b; }
.agent-status-value.warn { color: #8a5d14; }
.agent-status-value.bad { color: #9b2c2c; }
.agent-status-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}
@media (max-width: 700px) {
  .agent-status-grid { grid-template-columns: 1fr; }
}

.downloads-page {
  max-width: 520px;
}

.download-steps {
  margin-top: 16px;
  display: grid;
  gap: 6px;
}

.download-steps .step {
  font-weight: 600;
  color: #424b5a;
}
