/* NIFANA Absensi — Employee UI
   Presentation-only layer. API contracts, view routing and event handlers
   remain in app.js; this file owns the visual system for the employee shell. */
/* Colour, radius, shadow and spacing tokens (--emp-*) are aliases of the
   --ds-* design tokens, defined once in redesign.css. */

body.employee-shell {
  background: var(--emp-bg);
  color: var(--emp-text);
  font-family: var(--emp-font-display);
  letter-spacing: -.005em;
}

body.employee-shell .main { background: var(--emp-bg); }
body.employee-shell .topbar {
  background: color-mix(in srgb, var(--emp-bg) 90%, transparent);
  border-bottom: 1px solid var(--emp-border);
  backdrop-filter: blur(14px);
  z-index: 20;
}
body.employee-shell .topbar-left { min-width: 0; }
body.employee-shell #pageTitle { color: var(--emp-text); font-size: 18px; font-weight: 750; letter-spacing: -.02em; }
body.employee-shell #userMenuBtn { border: 1px solid var(--emp-border); background: var(--emp-surface); box-shadow: var(--emp-shadow-sm); }
body.employee-shell .avatar { background: var(--emp-primary-soft); color: var(--ds-primary-text); }
body.employee-shell .content {
  max-width: 780px;
  padding: 24px 20px 104px;
}

body.employee-shell .card {
  background: var(--emp-surface);
  border: 1px solid var(--emp-border);
  border-radius: var(--emp-radius-lg);
  box-shadow: var(--emp-shadow-sm);
  padding: var(--emp-space-5);
}
body.employee-shell .section-title { margin-bottom: var(--emp-space-4); }
body.employee-shell .section-title h3,
body.employee-shell .card h3 { color: var(--emp-text); font-size: 16px; letter-spacing: -.015em; }
body.employee-shell .section-title p,
body.employee-shell .muted,
body.employee-shell .card p.muted { color: var(--emp-text-muted); }

/* Home/task workspace */
body.employee-shell .emp-task-card { padding: var(--emp-space-5); }
body.employee-shell .task-card-header { margin-bottom: 18px; }
body.employee-shell .task-card-header h3 { font-size: 18px; }
body.employee-shell .task-card-header p { color: var(--emp-text-muted); line-height: 1.45; }
body.employee-shell .task-work-list { gap: 10px; }
body.employee-shell .task-work-row {
  min-height: 64px;
  padding: 13px 14px;
  border-color: var(--emp-border);
  border-radius: var(--emp-radius-md);
  background: var(--emp-surface-subtle);
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
body.employee-shell .task-work-row:hover,
body.employee-shell .task-work-row:focus-visible {
  border-color: color-mix(in srgb, var(--emp-primary) 42%, var(--emp-border));
  background: var(--emp-primary-soft);
}
body.employee-shell .task-work-row:active { transform: translateY(1px); }
body.employee-shell .task-work-row strong { color: var(--emp-text); font-size: 14px; }
body.employee-shell .task-work-row small { color: var(--emp-text-muted); }
body.employee-shell .task-work-meta b { color: var(--ds-primary-text); font-size: 20px; font-weight: 500; }
body.employee-shell .task-session-lock-inline { margin: 0 0 14px; }

/* Attendance / overtime surface */
body.employee-shell .attendance-summary-card {
  padding: 0;
  overflow: hidden;
}
body.employee-shell .attendance-summary-grid {
  padding: 22px 22px 18px;
  gap: 16px 20px;
}
body.employee-shell .attendance-summary-date { color: var(--emp-text-soft); font-size: 13px; font-weight: 600; }
body.employee-shell .attendance-summary-clock { color: var(--emp-text); font-size: 34px; font-weight: 760; letter-spacing: -.045em; }
body.employee-shell .attendance-summary-shift,
body.employee-shell .attendance-summary-location { color: var(--emp-text-soft); }
body.employee-shell .attendance-summary-shift strong { color: var(--emp-text); }
body.employee-shell .attendance-summary-label { color: var(--emp-text-muted); font-weight: 650; letter-spacing: .02em; }
body.employee-shell .attendance-summary-item > strong { color: var(--emp-text); font-size: 19px; }
body.employee-shell .attendance-summary-notice { margin: 0 22px 18px; }
body.employee-shell .attendance-cta {
  margin: 0;
  padding: 18px 22px 22px;
  border-top: 1px solid var(--emp-border);
  background: var(--emp-surface-subtle);
}
body.employee-shell .attendance-action-row { gap: 10px; }
body.employee-shell .attendance-action-row > .btn { min-height: 48px; border-radius: 12px; font-size: 14px; font-weight: 750; }
body.employee-shell .attendance-action-row > .notice { flex: 1 1 auto; margin: 0; }
body.employee-shell .attendance-request-btn { border-radius: 12px; }
body.employee-shell .btn {
  border-radius: 11px;
  min-height: 44px;
  padding: 11px 16px;
  font-weight: 700;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
body.employee-shell .btn.primary { background: var(--emp-primary); color: #fff; box-shadow: 0 5px 12px color-mix(in srgb, var(--emp-primary) 22%, transparent); }
body.employee-shell .btn.primary:hover { background: var(--emp-primary-strong); }
body.employee-shell .btn.secondary { background: var(--emp-surface); color: var(--emp-text-soft); border: 1px solid var(--emp-border-strong); }
body.employee-shell .btn.danger { background: var(--emp-danger-soft); color: var(--emp-danger); }
body.employee-shell .btn:focus-visible,
body.employee-shell .icon-btn:focus-visible,
body.employee-shell input:focus-visible,
body.employee-shell select:focus-visible,
body.employee-shell textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--emp-primary) 24%, transparent); outline-offset: 2px; }

/* History: scannable rows instead of dense table-like cards. */
body.employee-shell .attendance-history-card { margin-top: 14px; padding: var(--emp-space-5); }
body.employee-shell .attendance-history-filter { margin: 0 0 16px; padding: 10px; width: 100%; border: 1px solid var(--emp-border); border-radius: 12px; background: var(--emp-surface-subtle); }
body.employee-shell .attendance-history-filter input { border-color: var(--emp-border); background: var(--emp-surface); color: var(--emp-text); border-radius: 9px; }
body.employee-shell .attendance-history-row { padding: 14px; margin-bottom: 10px; border-color: var(--emp-border); border-radius: var(--emp-radius-md); background: var(--emp-surface-subtle); }
body.employee-shell .attendance-history-date { color: var(--emp-text); font-size: 13px; }
body.employee-shell .activity-detail-label,
body.employee-shell .attendance-history-date { font-weight: 700; }
body.employee-shell .activity-detail-label { color: var(--emp-text-muted); }
body.employee-shell .activity-detail-value { color: var(--emp-text); }

/* Shared fields, state surfaces and modal/bottom-sheet treatment. */
body.employee-shell input,
body.employee-shell select,
body.employee-shell textarea { min-height: 44px; border: 1px solid var(--emp-border-strong); border-radius: 10px; background: var(--emp-surface); color: var(--emp-text); }
body.employee-shell .empty,
body.employee-shell .attendance-history-error { padding: 26px 16px; color: var(--emp-text-muted); text-align: center; }
body.employee-shell .notice { border-radius: 12px; line-height: 1.45; }
body.employee-shell .modal-overlay,
body.employee-shell .nested-modal-overlay { background: rgba(15, 23, 42, .58); backdrop-filter: blur(5px); }
body.employee-shell .camera-modal { background: #080b12; }
body.employee-shell .camera-overlay-card { border: 1px solid rgba(255,255,255,.18); box-shadow: 0 14px 36px rgba(0,0,0,.22); }
body.employee-shell .camera-description-card { border: 1px solid rgba(255,255,255,.16); }

/* Bottom navigation: one quiet, high-contrast control surface. */
body.employee-shell .android-bottom-nav {
  background: color-mix(in srgb, var(--emp-surface) 94%, transparent);
  border-top: 1px solid var(--emp-border);
  box-shadow: 0 -8px 24px rgba(15, 23, 42, .06);
  backdrop-filter: blur(16px);
}
body.employee-shell .android-bottom-nav .android-nav-item { color: var(--emp-text-muted); border-radius: 12px; }
body.employee-shell .android-bottom-nav .android-nav-item.active { color: var(--ds-primary-text); }
body.employee-shell .android-bottom-nav .android-nav-item:hover,
body.employee-shell .android-bottom-nav .android-nav-item:focus-visible { background: var(--emp-primary-soft); color: var(--ds-primary-text); }
body.employee-shell .android-bottom-nav .android-nav-item span { font-weight: 650; }

@media (min-width: 761px) {
  body.employee-shell .content { padding-top: 30px; }
  body.employee-shell .attendance-summary-card { border-radius: 22px; }
}

@media (max-width: 600px) {
  body.employee-shell .content { padding: 16px 12px 102px; }
  body.employee-shell .card { border-radius: 16px; padding: 16px; }
  body.employee-shell .attendance-summary-grid { padding: 18px 16px 16px; gap: 13px 12px; }
  body.employee-shell .attendance-summary-clock { font-size: 30px; }
  body.employee-shell .attendance-summary-notice { margin: 0 16px 16px; }
  body.employee-shell .attendance-cta { padding: 14px 16px 16px; }
  body.employee-shell .attendance-action-row > .btn { min-width: 0; padding-left: 12px; padding-right: 12px; }
  body.employee-shell .attendance-history-card { padding: 14px; }
  body.employee-shell .attendance-history-filter { display: grid; grid-template-columns: minmax(0, 1fr) 10px minmax(0, 1fr) 42px; gap: 5px; }
  body.employee-shell .attendance-history-filter > .ui-icon { display: none; }
  body.employee-shell .attendance-history-date-control,
  body.employee-shell .attendance-history-filter input,
  body.employee-shell .attendance-history-filter input[type="date"] { width: 100%; min-width: 0; flex-basis: auto; }
  body.employee-shell .attendance-history-search { width: 42px; min-width: 42px; }
  body.employee-shell .attendance-history-grid { gap: 10px 8px; }
  body.employee-shell .activity-detail-label { font-size: 11px; }
  body.employee-shell .activity-detail-value { font-size: 13px; }
}

@media (max-width: 380px) {
  body.employee-shell .topbar { padding-inline: 12px; }
  body.employee-shell #pageTitle { font-size: 17px; }
  body.employee-shell .attendance-summary-shift,
  body.employee-shell .attendance-summary-location { font-size: 12px; }
  body.employee-shell .attendance-summary-item > strong { font-size: 17px; }
  body.employee-shell .attendance-action-row { gap: 6px; }
  body.employee-shell .attendance-action-row > .btn { font-size: 13px; }
  body.employee-shell .attendance-history-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  body.employee-shell *, body.employee-shell *::before, body.employee-shell *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* r257: unified Tugas filters (source, "Dibuat Saya", optional date range,
   search).  The generic 4-column date-range grid above put the checkbox label
   into a 10px column; on phones these forms get their own row layout:
     row 1: source (full width)
     row 2: [x] Dibuat Saya (full width)
     row 3: from - to            (history only)
     row 4: search      | button
   Applies wherever a phone/tablet grid applies (mobile-web is <=900px);
   the desktop profile (>900px) keeps the existing inline layout. */
@media (max-width: 900px) {
  body.employee-shell .attendance-history-filter.task-history-filter.task-unified-filter {
    display: grid; grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr) 42px;
    align-items: center; gap: 8px 5px; width: 100%; max-width: 100%; white-space: normal;
  }
  body.employee-shell .attendance-history-filter.task-history-filter.task-unified-filter .task-filter-source {
    grid-column: 1 / -1; grid-row: 1; width: 100%; min-width: 0; min-height: 42px;
  }
  body.employee-shell .attendance-history-filter.task-history-filter.task-unified-filter .task-filter-created {
    grid-column: 1 / -1; grid-row: 2; display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 42px;
    font-size: 13px; line-height: 1.2; white-space: normal; cursor: pointer;
  }
  body.employee-shell .attendance-history-filter.task-history-filter.task-unified-filter .task-filter-created input {
    flex: 0 0 auto; width: 18px; min-width: 18px; height: 18px; margin: 0; padding: 0;
  }
  body.employee-shell .attendance-history-filter.task-history-filter.task-unified-filter .task-history-query {
    grid-column: 1 / 4; grid-row: 3; width: 100%; min-width: 0; min-height: 42px;
  }
  body.employee-shell .attendance-history-filter.task-history-filter.task-unified-filter .attendance-history-search {
    grid-column: 4; grid-row: 3; width: 42px; min-width: 42px; height: 42px; min-height: 42px;
  }
  body.employee-shell .attendance-history-filter.task-history-filter.task-unified-filter--history .task-filter-from { grid-column: 1; grid-row: 3; }
  body.employee-shell .attendance-history-filter.task-history-filter.task-unified-filter--history .attendance-history-dash { grid-column: 2; grid-row: 3; text-align: center; }
  body.employee-shell .attendance-history-filter.task-history-filter.task-unified-filter--history .task-filter-to { grid-column: 3 / 5; grid-row: 3; }
  body.employee-shell .attendance-history-filter.task-history-filter.task-unified-filter--history .task-history-query,
  body.employee-shell .attendance-history-filter.task-history-filter.task-unified-filter--history .attendance-history-search { grid-row: 4; }
  body.employee-shell .attendance-history-filter.task-history-filter.task-unified-filter .attendance-history-date-control,
  body.employee-shell .attendance-history-filter.task-history-filter.task-unified-filter input[type="date"] { width: 100%; min-width: 0; flex: none; }
}
