:root {
  --primary: #123c69;
  --primary-soft: #e8f0fb;
  --accent: #1f7a4d;
  --accent-soft: #edfdf5;
  --danger: #d64545;
  --danger-soft: #fff1f1;
  --warning: #f2a900;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(160deg, #eef4fb 0%, #f8fafc 45%, #ffffff 100%);
  color: var(--text);
}

.app {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 18px;
}

.center-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hidden {
  display: none !important;
}

.login-card,
.welcome-card,
.quick-action-card,
.mini-card,
.summary-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.7);
}

.login-card {
  border-radius: 30px;
  padding: 28px 22px;
}

.brand {
  text-align: center;
  margin-bottom: 28px;
}

.logo-circle {
  width: 74px;
  height: 74px;
  border-radius: 24px;
  margin: 0 auto 14px;
  background: linear-gradient(145deg, var(--primary), #1e6091);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  box-shadow: 0 12px 28px rgba(18, 60, 105, 0.25);
}

.brand h1 {
  font-size: 28px;
  line-height: 1.1;
  color: var(--primary);
  margin-bottom: 8px;
}

.brand p,
.footer-note,
.welcome-card p,
.quick-action-card p,
.menu-btn span,
.top-subtitle,
.card-note {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.footer-note {
  text-align: center;
  margin-top: 18px;
  font-size: 12px;
}

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

label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #374151;
}

input,
textarea,
select {
  width: 100%;
  padding: 15px;
  border-radius: 16px;
  border: 1px solid var(--border);
  font-size: 15px;
  outline: none;
  background: #fbfdff;
  transition: 0.2s ease;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(18, 60, 105, 0.10);
  background: #ffffff;
}

.password-wrap {
  position: relative;
}

.toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  padding: 8px;
}

.btn {
  width: 100%;
  border: none;
  border-radius: 17px;
  padding: 15px 18px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 12px 24px rgba(18, 60, 105, 0.24);
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: #0f3359;
}

.btn-secondary {
  background: var(--primary-soft);
  color: var(--primary);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.helper-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 10px 0 20px;
  font-size: 13px;
  color: var(--muted);
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.small-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.status-box {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  line-height: 1.45;
  display: none;
}

.status-box.error {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-box.success {
  background: var(--accent-soft);
  color: var(--accent);
}

.loading-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  line-height: 1.6;
}

.spinner {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 4px solid #dbeafe;
  border-top-color: var(--primary);
  margin: 0 auto 14px;
  animation: spin 0.85s linear infinite;
}

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

.page {
  padding: 18px 0 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}

.topbar h2 {
  font-size: 22px;
  color: var(--primary);
  line-height: 1.15;
}

.logout-btn {
  border: none;
  background: #fff;
  color: var(--danger);
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  cursor: pointer;
}

.hero-pegawai,
.quick-action-card,
.mini-card {
  margin-bottom: 14px;
}

.hero-row,
.status-line,
.mini-progress,
.employee-head,
.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-row {
  margin-bottom: 14px;
}

.welcome-card h3,
.quick-action-card h3,
.mini-card h3 {
  font-size: 19px;
  margin-bottom: 7px;
}

.mood-bubble {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  font-size: 28px;
  flex: 0 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: var(--primary-soft);
  color: var(--primary);
}

.badge.gray {
  background: #f3f4f6;
  color: #4b5563;
}

.badge.green {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge.blue {
  background: var(--primary-soft);
  color: var(--primary);
}

.today-text {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.mini-progress {
  margin: 14px 0;
  font-size: 13px;
  color: var(--muted);
}

.section-title {
  font-size: 13px;
  font-weight: 800;
  color: #374151;
  margin: 20px 0 10px;
}

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

.menu-btn {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  text-align: left;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  cursor: pointer;
}

.menu-btn strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--text);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.summary-card {
  padding: 14px 10px;
  text-align: center;
  border-radius: 18px;
}

.summary-card strong {
  display: block;
  font-size: 24px;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 6px;
}

.summary-card span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.employee-card .badge {
  margin: 12px 0 8px;
}

.employee-avatar {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  flex: 0 0 auto;
}

.card-note {
  margin-bottom: 12px;
}

.card-actions {
  margin-top: 12px;
}

.btn-small {
  flex: 1;
  border: none;
  border-radius: 14px;
  padding: 11px 10px;
  font-size: 13px;
  font-weight: 800;
  color: white;
  background: var(--primary);
  cursor: pointer;
}

.btn-small.secondary {
  color: var(--primary);
  background: var(--primary-soft);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  z-index: 50;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0 10px 10px;
}

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

.bottom-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  background: white;
  border-radius: 28px 28px 20px 20px;
  padding: 12px 18px 20px;
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.2);
}

.sheet-handle {
  width: 46px;
  height: 5px;
  border-radius: 999px;
  background: #d1d5db;
  margin: 0 auto 14px;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.sheet-header h3 {
  font-size: 20px;
  color: var(--primary);
}

.sheet-header p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

.close-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.field-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
}

.mood-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.mood-option {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  background: #fff;
}

.mood-option input {
  display: none;
}

.mood-option span {
  display: block;
  font-size: 28px;
  margin-bottom: 4px;
}

.mood-option small {
  font-size: 12px;
  color: var(--muted);
}

.mood-option.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.readonly-box,
.detail-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  background: #fbfdff;
  margin-bottom: 12px;
}

.readonly-box small,
.detail-card small {
  display: block;
  color: var(--muted);
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 700;
}

.check-list {
  display: grid;
  gap: 10px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
  cursor: pointer;
}

.check-item input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  margin-top: 1px;
}

.detail-list {
  display: grid;
  gap: 8px;
}

.detail-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.detail-row p,
.detail-card p,
.normal-list {
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.normal-list {
  padding-left: 18px;
}

.empty-state {
  text-align: center;
  padding: 20px 4px;
}

.empty-state h3 {
  color: var(--primary);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--muted);
  line-height: 1.5;
}

@media (min-width: 768px) {
  .app {
    max-width: 520px;
  }

  .bottom-sheet {
    max-width: 520px;
  }
}
.employee-card-pro {
  background: #ffffff;
  border-radius: 26px;
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.employee-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.employee-avatar-pro {
  width: 54px;
  height: 54px;
  border-radius: 20px;
  background: linear-gradient(145deg, #123c69, #1e6091);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(18, 60, 105, 0.22);
  flex: 0 0 auto;
}

.employee-main-info {
  flex: 1;
  min-width: 0;
}

.employee-main-info h3 {
  font-size: 17px;
  line-height: 1.2;
  color: #111827;
  margin-bottom: 4px;
}

.employee-main-info p {
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 2px;
  line-height: 1.35;
}

.employee-main-info small {
  font-size: 12px;
  color: #6b7280;
  font-weight: 700;
}

.employee-status-row {
  display: grid;
  gap: 8px;
  margin: 12px 0 15px;
}

.progress-pill {
  display: inline-flex;
  width: fit-content;
  padding: 8px 11px;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #e5e7eb;
}

.employee-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.action-btn {
  border: none;
  border-radius: 18px;
  padding: 13px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.action-btn span {
  font-size: 16px;
}

.detail-btn {
  background: #e8f0fb;
  color: #123c69;
}

.task-btn {
  background: #123c69;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(18, 60, 105, 0.22);
}

.action-btn:hover {
  transform: translateY(-1px);
}

.detail-btn:hover {
  background: #dcecff;
}

.task-btn:hover {
  background: #0f3359;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0 18px;
}

.summary-card {
  min-height: 112px;
  padding: 12px 8px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.summary-card strong {
  display: block;
  font-size: 26px;
  line-height: 1;
  color: #111827;
  font-weight: 900;
}

.summary-card span {
  display: block;
  font-size: 11px;
  line-height: 1.25;
  color: #64748b;
  font-weight: 800;
}

.stat-blue {
  background: linear-gradient(145deg, #ffffff 0%, #e8f0fb 100%);
}

.stat-blue .stat-icon {
  background: #dcecff;
}

.stat-orange {
  background: linear-gradient(145deg, #ffffff 0%, #fff4dc 100%);
}

.stat-orange .stat-icon {
  background: #ffedbf;
}

.stat-green {
  background: linear-gradient(145deg, #ffffff 0%, #edfdf5 100%);
}

.stat-green .stat-icon {
  background: #d5f7e5;
}
.history-list,
.assigned-task-list {
  display: grid;
  gap: 12px;
}

.history-card,
.assigned-task-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 22px;
  padding: 15px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.history-top,
.task-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.history-top h3,
.task-card-top h3 {
  font-size: 16px;
  color: #111827;
  line-height: 1.25;
  margin-bottom: 4px;
}

.history-top p,
.task-card-top p {
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}

.history-mood {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex: 0 0 auto;
}

.history-meta,
.task-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.task-detail-box {
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 12px;
  border: 1px solid #e5e7eb;
}

.task-meta-row span {
  display: inline-flex;
  padding: 8px 10px;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid #e5e7eb;
}

.task-status {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff4dc;
  color: #a15c00;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.task-status.done {
  background: var(--accent-soft);
  color: var(--accent);
}

.assigned-task-card.done {
  opacity: 0.82;
}

.full-action {
  width: 100%;
  margin-top: 4px;
}

.action-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}
/* =========================
   Riwayat Absen - Card Rapi
========================= */

.history-list {
  display: grid;
  gap: 14px;
}

.history-card-pro {
  background: #ffffff;
  border-radius: 24px;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.history-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.history-card-left {
  flex: 1;
  min-width: 0;
}

.history-card-left h3 {
  font-size: 20px;
  line-height: 1.2;
  color: #123c69;
  margin-bottom: 6px;
  font-weight: 800;
}

.history-card-left p {
  font-size: 14px;
  line-height: 1.45;
  color: #475569;
  margin: 0;
}

.history-mood-pro {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #e8f0fb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex: 0 0 auto;
}

.history-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}

.full-action {
  width: 100%;
  justify-content: center;
}

.action-btn.detail-btn {
  background: #e8f0fb;
  color: #123c69;
  border-radius: 18px;
  padding: 13px 12px;
  border: none;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.action-btn.detail-btn:hover {
  background: #dcecff;
}

.sent-task-card {
  width: 100%;
  margin: 16px 0 16px;
  padding: 18px;
  border: none;
  border-radius: 26px;
  background: linear-gradient(135deg, #ffffff 0%, #e8f0fb 100%);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
}

.sent-task-icon {
  width: 50px;
  height: 50px;
  border-radius: 18px;
  background: #dcecff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex: 0 0 auto;
}

.sent-task-text {
  flex: 1;
  min-width: 0;
}

.sent-task-text strong {
  display: block;
  font-size: 17px;
  color: #123c69;
  margin-bottom: 5px;
  font-weight: 900;
}

.sent-task-text span {
  display: block;
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}

.sent-task-arrow {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #ffffff;
  color: #123c69;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  flex: 0 0 auto;
}

.sent-task-card:hover {
  transform: translateY(-1px);
}