/* Attendance-only visual layer. Keep other HR modules on their existing theme. */
body.hr-cake-workspace-v1[data-hr-view="attendance"] {
  --attendance-body-size: clamp(14px, .8vw, 16px);
  --attendance-caption-size: clamp(12px, .7vw, 14px);
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-module {
  --attendance-ink: #172235;
  --attendance-muted: #68788f;
  --attendance-line: #e0e7f0;
  --attendance-blue: #2366d8;
  --attendance-surface: #fff;
  gap: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "PingFang SC", sans-serif;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .top-search-shell {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .top-search-shell > svg {
  display: none;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .top-search-shell input {
  font-size: 15px;
  font-weight: 550;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .report-loading {
  min-height: 84px;
  padding: 24px 28px;
  font-size: var(--attendance-body-size);
  line-height: 1.5;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-apple-head {
  min-height: 112px;
  padding: 22px 26px;
  border: 1px solid var(--attendance-line);
  border-radius: 18px;
  background: var(--attendance-surface);
  box-shadow: 0 10px 30px rgba(20, 42, 80, .045);
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-apple-head .eyebrow,
body.hr-cake-workspace-v1[data-hr-view="attendance"] .section-eyebrow {
  color: var(--attendance-blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-apple-head h2 {
  margin-top: 7px;
  color: var(--attendance-ink);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 720;
  letter-spacing: -.035em;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-apple-head .apple-page-title > p:last-child {
  font-size: var(--attendance-body-size);
  line-height: 1.5;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-apple-head .month-tag,
body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-apple-head .breadcrumb-current {
  border: 1px solid #dce8fb;
  border-radius: 8px;
  background: #f3f7fd;
  color: #2355a7;
  font-size: 12px;
  letter-spacing: 0;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-apple-head .ghost-button {
  min-width: 94px;
  gap: 7px;
  border-radius: 10px;
  background: #f7f9fc;
  font-size: var(--attendance-body-size);
  font-weight: 650;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-apple-head .ghost-button .app-icon {
  width: 17px;
  height: 17px;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-tabs {
  min-height: 58px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--attendance-line);
  border-radius: 15px;
  background: #f5f7fa;
  overflow: visible;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-tabs .attendance-tab {
  min-width: 0;
  min-height: 44px !important;
  height: auto;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #55657b;
  font-size: var(--attendance-body-size);
  font-weight: 650;
  line-height: 1.35;
  white-space: normal;
  text-align: center;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-tabs .attendance-tab.active {
  border-color: #d6e5fc;
  background: #fff;
  color: var(--attendance-blue);
  box-shadow: 0 3px 12px rgba(27, 76, 143, .09);
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-tabs .attendance-tab.active::after {
  content: none;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-import-view {
  gap: 14px;
  padding: 0;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-import-section,
body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-import-history,
body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-summary-empty {
  margin: 0;
  padding: 22px;
  border: 1px solid var(--attendance-line);
  border-radius: 18px;
  background: var(--attendance-surface);
  box-shadow: 0 8px 28px rgba(20, 42, 80, .04);
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-import-top {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-import-copy {
  min-height: 96px;
  padding: 15px 18px;
  border: 0;
  border-radius: 12px;
  background: #f6f9fd;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-import-copy h3 {
  font-size: clamp(19px, 1.7vw, 24px);
  font-weight: 700;
  letter-spacing: -.025em;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-import-copy p,
body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-sync-card small,
body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-import-tip small {
  color: var(--attendance-muted);
  font-size: var(--attendance-caption-size);
  font-weight: 450;
  line-height: 1.5;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-sync-grid {
  gap: 10px;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-sync-card {
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--attendance-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-sync-card:hover {
  transform: none;
  border-color: #b6cef2;
  background: #f9fbff;
  box-shadow: 0 5px 18px rgba(24, 80, 155, .08);
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-sync-card strong {
  color: var(--attendance-ink);
  font-size: var(--attendance-body-size);
  font-weight: 680;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-sync-card .sync-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #eff5ff;
  box-shadow: none;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-upload-card {
  grid-template-columns: minmax(0, 1fr) minmax(230px, 285px);
  gap: 14px;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-import-section .upload-zone {
  min-height: 192px;
  padding: 20px;
  border: 1.5px dashed #b9cde9;
  border-radius: 13px;
  background: #f9fbfe;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-import-section .upload-zone:hover,
body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-import-section .upload-zone.dragging {
  background: #f1f7ff;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-import-section .upload-zone strong {
  font-size: clamp(16px, .95vw, 18px);
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-import-section .upload-zone p {
  font-size: var(--attendance-caption-size);
  line-height: 1.5;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .upload-zone-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #eaf2ff;
  box-shadow: none;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-import-tip,
body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-month-card {
  border: 1px solid var(--attendance-line);
  border-radius: 11px;
  background: #fff;
  box-shadow: none;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-import-history .section-heading h3 {
  color: var(--attendance-ink);
  font-size: 17px;
  font-weight: 680;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-import-notice {
  gap: 7px;
  margin-top: 14px;
  border-radius: 12px;
  font-weight: 550;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-import-notice > button {
  justify-self: start;
  margin-top: 5px;
  border-radius: 9px;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-context-strip,
body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-stepper,
body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-filter-bar,
body.hr-cake-workspace-v1[data-hr-view="attendance"] .reconcile-bar {
  border: 1px solid var(--attendance-line);
  border-radius: 13px;
  background: #fff;
  box-shadow: none;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-stats .stat-card {
  border: 1px solid var(--attendance-line);
  border-radius: 13px;
  background: #fff;
  box-shadow: none;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-stats .stat-card-alert {
  border-color: #f0d9d6;
  background: #fffafa;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-stats .stat-value-row strong {
  color: var(--attendance-ink);
  font-variant-numeric: tabular-nums;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-table-wrap {
  border: 1px solid var(--attendance-line);
  border-radius: 13px;
  background: #fff;
  box-shadow: none;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-table th {
  color: #607087;
  background: #f7f9fc;
  font-size: var(--attendance-caption-size);
  font-weight: 650;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-table td {
  border-color: #edf1f6;
  color: var(--attendance-ink);
  font-size: var(--attendance-caption-size);
  font-variant-numeric: tabular-nums;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-table tbody tr:hover td {
  background: #f7faff;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .dingtalk-selection-card .filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .dingtalk-selection-card .filter-row > * {
  min-width: 0;
  border-radius: 10px;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-summary-empty {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 184px;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-summary-empty-icon {
  display: grid;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 14px;
  background: #edf4ff;
  color: var(--attendance-blue);
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-summary-empty h3 {
  margin: 5px 0;
  color: var(--attendance-ink);
  font-size: 21px;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-summary-empty p {
  margin: 0;
  color: var(--attendance-muted);
  font-size: 14px;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-summary-empty > button {
  margin-left: auto;
  flex: 0 0 auto;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-filter-bar .search-box input {
  padding-left: 13px;
}

body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-sync-employee-list [hidden] {
  display: none !important;
}

@media (max-width: 1200px) {
  body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-tabs {
    display: flex;
    overflow-x: auto;
  }
  body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-tabs .attendance-tab {
    flex: 0 0 auto;
    min-width: 120px;
  }
  body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-import-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-apple-head {
    min-height: 0;
    padding: 18px;
  }
  body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-tabs {
    display: flex !important;
    grid-template-columns: none !important;
    overflow-x: auto !important;
  }
  body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-import-section,
  body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-import-history {
    padding: 16px;
  }
  body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-sync-grid,
  body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-upload-card {
    grid-template-columns: 1fr;
  }
  body.hr-cake-workspace-v1[data-hr-view="attendance"] .dingtalk-selection-card .filter-row {
    grid-template-columns: 1fr !important;
  }
  body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-summary-empty {
    align-items: flex-start;
    flex-direction: column;
  }
  body.hr-cake-workspace-v1[data-hr-view="attendance"] .attendance-summary-empty > button {
    margin-left: 0;
    width: 100%;
  }
}
