.employee-modal .employee-modal-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: 12px;
  margin-top: 18px;
}

.employee-modal .employee-modal-actions > button,
.employee-modal .employee-modal-actions > .compact-action-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 52px !important;
  padding: 0 16px !important;
}

.employee-modal .employee-modal-actions > button span {
  display: inline !important;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .employee-modal .employee-modal-actions {
    gap: 8px;
  }

  .employee-modal .employee-modal-actions > button,
  .employee-modal .employee-modal-actions > .compact-action-button {
    height: 48px !important;
  }
}

.employee-detail-modal .employee-detail-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  gap: 12px;
  margin-top: 24px;
}

.employee-detail-modal .employee-detail-actions.two-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.employee-detail-modal .employee-detail-actions > button,
.employee-detail-modal .employee-detail-actions > .compact-action-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 52px !important;
  max-height: none !important;
  padding: 0 14px !important;
}

.employee-detail-modal .employee-detail-actions .labeled-action-button span {
  display: inline !important;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .employee-detail-modal .employee-detail-actions {
    gap: 7px;
  }

  .employee-detail-modal .employee-detail-actions > button,
  .employee-detail-modal .employee-detail-actions > .compact-action-button {
    height: 48px !important;
    padding: 0 6px !important;
  }
}

/* Employee card print */
@media print {
  @page employeeCard {
    size: A4 portrait;
    margin: 0;
  }

  .print-employee-card {
    page: employeeCard;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column;
    width: 210mm !important;
    min-height: 297mm !important;
    margin: 0 auto !important;
    padding: 17mm 18mm 14mm !important;
    background: #fff !important;
    color: #111827 !important;
    font-family: Inter, "Noto Sans KR", Arial, sans-serif !important;
    line-height: 1.45;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .print-employee-card h1 {
    margin: 3mm 0 1.5mm !important;
    color: #111827 !important;
    font-size: 30px !important;
    font-weight: 850;
    letter-spacing: -.03em;
    text-align: left !important;
  }

  .print-employee-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12mm;
    padding-bottom: 8mm;
    border-bottom: 1px solid #d1d5db;
  }

  .print-employee-header span,
  .print-employee-header p,
  .print-employee-field span,
  .print-employee-footer {
    color: #6b7280 !important;
  }

  .print-employee-header > div:first-child > span {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
  }

  .print-employee-header p {
    margin: 0;
    font-size: 12px;
    font-weight: 650;
  }

  .print-employee-status {
    min-width: 32mm;
    padding: 4mm 5mm;
  }

  .print-employee-status span,
  .print-employee-status strong {
    display: block;
  }

  .print-employee-status span {
    color: #6b7280 !important;
    font-size: 9px;
    font-weight: 750;
  }

  .print-employee-status strong {
    margin-top: 1.5mm;
    color: #111827 !important;
    font-size: 14px;
  }

  .print-employee-content {
    display: grid;
    grid-template-columns: 43mm minmax(0, 1fr);
    gap: 10mm;
    align-items: start;
    padding-top: 9mm;
  }

  .print-employee-photo {
    display: grid;
    place-items: center;
    width: 43mm;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 1px solid #d1d5db;
    border-radius: 5mm;
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    font-size: 11px;
    font-weight: 750;
  }

  .print-employee-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .print-employee-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3mm;
  }

  .print-employee-field {
    min-height: 17mm;
    padding: 3.5mm 4mm;
    break-inside: avoid;
  }

  .print-employee-field span,
  .print-employee-field strong {
    display: block;
  }

  .print-employee-field span {
    font-size: 9px;
    font-weight: 750;
  }

  .print-employee-field strong {
    margin-top: 1.5mm;
    color: #111827 !important;
    font-size: 11px;
    font-weight: 750;
    overflow-wrap: anywhere;
  }

  .print-employee-field:last-child {
    grid-column: 1 / -1;
  }

  .print-employee-field:last-child strong {
    min-height: 16mm;
    white-space: pre-wrap;
  }

  .print-employee-footer {
    display: flex;
    justify-content: space-between;
    gap: 12mm;
    margin-top: auto;
    padding-top: 7mm;
    border-top: 1px solid #d1d5db;
    font-size: 10px;
    font-weight: 650;
  }
}

/* Every menu tab uses the same blue operational state. */

.employee-list-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  white-space: normal;
}

.hr-card {
  overflow-x: auto;
}

.employee-list-table {
  min-width: 760px;
}

.employee-import-modal-card {
  width: min(680px, 100%);
}

.employee-import-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.employee-import-stats > div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f9fc;
}

.employee-import-stats span,
.employee-import-stats strong {
  display: block;
}

.employee-import-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.employee-import-stats strong {
  margin-top: 5px;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.employee-import-guide {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.employee-import-issues {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff4f2;
  color: var(--danger);
}

.employee-import-issues ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.employee-import-issues li {
  display: grid;
  grid-template-columns: minmax(100px, auto) minmax(0, 1fr);
  gap: 10px;
  color: var(--ink);
  font-size: 12px;
}

.employee-import-issues li span {
  color: var(--muted);
}

.employee-import-modal-actions {
  margin-top: 20px;
}

.employee-import-modal-actions.one-action {
  grid-template-columns: 1fr;
}

@media (max-width: 720px) {
  .hr-card > .card-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .employee-list-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .employee-list-actions button {
    flex: 1 1 130px;
  }

  .employee-list-actions .pill {
    align-self: center;
  }
}

@media (max-width: 520px) {
  .employee-import-stats {
    grid-template-columns: 1fr;
  }

  .employee-import-issues li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

body:not(.logged-out) .tab-row > .secondary {
  border:1px solid transparent !important;
  background:#fff !important;
  color:var(--blue) !important;
  box-shadow:none !important;
}

body:not(.logged-out) .tab-row > .secondary.active-tab {
  border-color:transparent !important;
  background:var(--blue) !important;
  color:#fff !important;
}

body:not(.logged-out) .tab-row .standard-tab-icon,body:not(.logged-out) .tab-row .delivery-tab-emoji{ display:none !important; }

body:not(.logged-out) .form-shell:not(.request-three-level):not(.inbound-three-level) #addLine.add-line {
  border-color:var(--blue) !important;
  background:var(--blue) !important;
  color:#fff !important;
  box-shadow:none !important;
}

body:not(.logged-out) .form-shell:not(.request-three-level):not(.inbound-three-level) #addLine.add-line:hover { background:#1f6fe5 !important; }

.attendance-loading {
  display:grid;
  place-items:center;
  min-height:260px;
  gap:16px;
}

.attendance-tabs {
  overflow-x:auto;
  scrollbar-width:none;
}

.attendance-tabs::-webkit-scrollbar { display:none; }

.attendance-today-layout,
.attendance-admin-grid {
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(280px,.75fr);
  gap:18px;
}

.attendance-hero {
  padding:28px;
  background:#fff;
}

.attendance-hero-heading,
.attendance-admin-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.attendance-hero-heading small,
.attendance-summary-grid article span,
.attendance-policy-card dt,
.attendance-location-summary span {
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}

.attendance-hero-heading h2 {
  margin:6px 0 0;
  font-size:clamp(30px,5vw,48px);
  letter-spacing:-.04em;
}

.attendance-live-dot {
  width:16px;
  height:16px;
  border-radius:50%;
  background:#94a3b8;
  box-shadow:0 0 0 8px rgba(148,163,184,.14);
}

.attendance-live-dot.working {
  background:#22c55e;
  box-shadow:0 0 0 8px rgba(34,197,94,.14);
}

.attendance-time-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin:28px 0 14px;
}

.attendance-time-grid > div,
.attendance-location-summary {
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:18px;
  border:1px solid #e6edf8;
  border-radius:16px;
  background:rgba(255,255,255,.88);
}

.attendance-time-grid span { color:var(--muted);font-size:13px;font-weight:700; }
.attendance-time-grid strong { font-size:28px;letter-spacing:-.02em; }
.attendance-location-summary strong { font-size:15px; }

.attendance-punch-button {
  width:100% !important;
  min-height:66px;
  margin-top:18px;
  border-radius:18px !important;
  font-size:20px !important;
}

.attendance-privacy {
  margin:12px 0 0;
  color:var(--muted);
  font-size:12px;
  line-height:1.55;
  text-align:center;
}

.attendance-policy-card dl { margin:0 0 18px; }
.attendance-policy-card dl > div {
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:14px 0;
  border-bottom:1px solid #eef2f7;
}
.attendance-policy-card dd { margin:0;font-weight:800;text-align:right; }

.attendance-month-nav {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  margin:0 0 18px;
}
.attendance-month-nav button { min-width:44px !important;width:44px !important;padding:0 !important; }
.attendance-month-nav strong { min-width:130px;text-align:center;font-size:18px; }
.attendance-admin-head .attendance-month-nav { margin:0; }
.attendance-personal-toolbar {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
}
.attendance-personal-toolbar .attendance-month-nav { margin:0; }
.attendance-employee-filter {
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:240px;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}
.attendance-employee-filter select { min-height:46px; }

.attendance-summary-grid {
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
}
.attendance-summary-grid article { min-width:0;padding:18px; }
.attendance-summary-grid article strong { display:block;margin-top:8px;font-size:22px;letter-spacing:-.03em; }
.attendance-summary-grid.compact {
  grid-template-columns:repeat(3,minmax(0,1fr));
  margin:0 0 18px;
}
.attendance-summary-grid.compact > div {
  padding:14px;
  border-radius:14px;
  background:#f6f8fc;
}
.attendance-summary-grid.compact span { display:block;color:var(--muted);font-size:12px;font-weight:700; }
.attendance-summary-grid.compact strong { display:block;margin-top:5px;font-size:22px; }

.attendance-table-wrap { overflow-x:auto; }
.attendance-record-table { min-width:840px; }
.attendance-outside-reason { min-width:180px;line-height:1.5;overflow-wrap:anywhere; }
.attendance-status {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:4px 10px;
  border-radius:999px;
  background:#eef2f7;
  color:#475569;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}
.attendance-status.confirmed { background:#e9f9ef;color:#15803d; }
.attendance-status.needs-review { background:#fff5df;color:#b45309; }

.attendance-admin-grid { margin-top:18px; }
.attendance-today-admin,
.attendance-exception-card { min-width:0; }
.attendance-employee-status-list { display:grid;gap:2px; }
.attendance-employee-status-list > div {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 0;
  border-top:1px solid #eef2f7;
}
.attendance-employee-status-list > div > span:first-child { display:flex;flex-direction:column;gap:2px; }
.attendance-employee-status-list small { color:var(--muted); }

.attendance-request-item {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  padding:16px 0;
  border-top:1px solid #eef2f7;
}
.attendance-request-item > div:first-child { display:flex;flex-direction:column;gap:4px;min-width:0; }
.attendance-request-item p { margin:4px 0 0;color:var(--muted);overflow-wrap:anywhere; }
.attendance-request-item > div:last-child { display:flex;align-items:center;gap:8px; }
.attendance-monthly-admin { margin-top:18px; }
.attendance-monthly-admin table { min-width:860px; }

.attendance-confirm-check {
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:16px 0 20px;
  padding:14px;
  border-radius:14px;
  background:#fff8e8;
  font-weight:700;
  line-height:1.45;
}
.attendance-confirm-check input { margin-top:3px; }
.attendance-outside-modal h2 { max-width:640px;font-size:22px; }
.attendance-adjustment-reason,
.attendance-workdays { grid-column:1/-1; }
.attendance-workdays > div { display:flex;flex-wrap:wrap;gap:8px; }
.attendance-workdays > div label { position:relative; }
.attendance-workdays > div input { position:absolute;opacity:0; }
.attendance-workdays > div span {
  display:grid;
  place-items:center;
  width:44px;
  height:40px;
  border:1px solid #dbe3ef;
  border-radius:12px;
  background:#fff;
  font-weight:800;
}
.attendance-workdays > div input:checked + span { border-color:var(--blue);background:var(--blue);color:#fff; }
.attendance-saturday-settings { margin:16px 0; }
.attendance-saturday-settings h3 { margin:0 0 4px;font-size:15px; }
.attendance-saturday-settings p { margin:0 0 10px; }
.attendance-settings-note { color:var(--muted);font-size:12px;line-height:1.5; }
.attendance-use-location { width:100% !important;margin:6px 0 18px; }
.modal-card .attendance-settings-actions.compact-action-grid {
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  width:100%;
  gap:12px;
  margin-top:18px;
}
.modal-card .attendance-settings-actions .compact-action-button {
  display:flex !important;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100% !important;
  min-width:0 !important;
  max-width:none !important;
  height:52px !important;
  max-height:none !important;
  padding:0 14px !important;
}
.attendance-settings-actions .labeled-action-button span {
  display:inline !important;
  font-size:14px;
  font-weight:800;
  white-space:nowrap;
}

@media (max-width:1100px) {
  .attendance-summary-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}

@media (max-width:800px) {
  .attendance-today-layout,
  .attendance-admin-grid { grid-template-columns:1fr; }
  .attendance-admin-head { align-items:stretch;flex-direction:column; }
  .attendance-admin-head .inline-actions { display:grid;grid-template-columns:1fr 1fr; }
  .attendance-personal-toolbar { align-items:stretch;flex-direction:column; }
  .attendance-employee-filter { min-width:0;width:100%; }
}

@media (max-width:520px) {
  .attendance-tabs {
    display:flex !important;
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    overflow:visible;
  }

  .attendance-tabs > .secondary {
    flex:1 1 0 !important;
    width:0 !important;
    min-width:0 !important;
    max-width:none !important;
    padding-left:6px !important;
    padding-right:6px !important;
    line-height:1.2;
    white-space:normal;
  }

  .attendance-hero { padding:20px; }
  .attendance-time-grid { gap:8px;margin-top:20px; }
  .attendance-time-grid > div,
  .attendance-location-summary { padding:14px; }
  .attendance-time-grid strong { font-size:23px; }
  .attendance-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; }
  .attendance-summary-grid article { padding:14px; }
  .attendance-summary-grid article strong { font-size:18px; }
  .attendance-summary-grid.compact { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .attendance-request-item { grid-template-columns:1fr; }
  .attendance-request-item > div:last-child { display:grid;grid-template-columns:1fr 1fr; }
  .modal-card .attendance-settings-actions .compact-action-button { height:48px !important; }
}
