/* ============================================================
 * AtoZAS Staff Attendance System styles (isolated)
 * Scoped under #attendanceSection so it cannot affect the
 * rest of the site.
 * ============================================================ */

#attendanceSection {
  padding: 20px 0 24px;
  background: #f5f7fb;
  border-top: 1px solid #e5e9f2;
}

#attendanceSection .att-wrap {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 28px;
  box-sizing: border-box;
}

#attendanceSection .att-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

#attendanceSection .att-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

#attendanceSection .att-header h2 span.att-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #1d4ed8;
  background: #e0e7ff;
  border-radius: 999px;
  padding: 3px 10px;
  margin-left: 8px;
  vertical-align: middle;
}

#attendanceSection .att-whoami {
  font-size: 0.82rem;
  color: #475569;
}

#attendanceSection .att-whoami strong { color: #0f172a; }

/* toolbar */
#attendanceSection .att-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e5e9f2;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

/* Month prev / current / next cards */
#attendanceSection .att-month-nav {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

#attendanceSection .att-month-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  white-space: normal;
  text-align: left;
  line-height: 1.25;
}

#attendanceSection .att-month-card-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e3a5f;
}

#attendanceSection .att-month-card-top i {
  font-size: 0.82rem;
  color: #2563eb;
}

#attendanceSection .att-month-card-sub {
  font-size: 0.8rem;
  font-weight: 500;
  color: #60a5fa;
  padding-left: 1.45rem;
}

#attendanceSection .att-btn.att-month-prev,
#attendanceSection .att-btn.att-month-next {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: none;
  white-space: normal;
}

#attendanceSection .att-btn.att-month-prev:hover,
#attendanceSection .att-btn.att-month-next:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

#attendanceSection .att-btn.att-month-next .att-month-card-sub {
  padding-left: 0;
}

#attendanceSection .att-month-current {
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 10px 16px;
}

#attendanceSection .att-month-title {
  font-weight: 700;
  color: #2563eb;
  font-size: 1.05rem;
  min-width: 0;
}

#attendanceSection .att-month-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  color: #166534;
  background: #dcfce7;
  border-radius: 999px;
  padding: 2px 10px;
  line-height: 1.4;
}
/* display:inline-block above overrides the HTML [hidden] attribute — force hide. */
#attendanceSection .att-month-badge[hidden] {
  display: none !important;
}

#attendanceSection .att-btn {
  border: 1px solid #d5dbe7;
  background: #ffffff;
  color: #1e293b;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
#attendanceSection .att-btn:hover { background: #f1f5f9; border-color: #b9c2d6; }
#attendanceSection .att-btn.primary {
  background: #2563eb; border-color: #2563eb; color: #fff;
}
#attendanceSection .att-btn.primary:hover { background: #1d4ed8; }
#attendanceSection .att-btn:disabled { opacity: 0.5; cursor: not-allowed; }

#attendanceSection select.att-select {
  border: 1px solid #d5dbe7;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.85rem;
  background: #fff;
  color: #1e293b;
  cursor: pointer;
}

#attendanceSection .att-spacer { flex: 1 1 auto; }

/* Save / Print / Share / Download action group */
#attendanceSection .att-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
#attendanceSection .att-btn.att-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#attendanceSection .att-btn.att-action i { font-size: 0.85rem; }

#attendanceSection .att-status {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  min-height: 18px;
}
#attendanceSection .att-status.success { color: #16a34a; }
#attendanceSection .att-status.error { color: #dc2626; }

/* grid */
#attendanceSection .att-table-scroll {
  overflow: auto;
  max-height: 70vh;
  border: 1px solid #e5e9f2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

#attendanceSection table.att-table {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  font-size: 0.8rem;
}

#attendanceSection table.att-table th,
#attendanceSection table.att-table td {
  border-right: 1px solid #eef1f6;
  border-bottom: 1px solid #eef1f6;
  padding: 0;
  text-align: center;
  background: #fff;
}

#attendanceSection table.att-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  padding: 6px 4px;
  white-space: nowrap;
}

#attendanceSection .att-col-idx {
  min-width: 34px;
  width: 34px;
  position: sticky;
  left: 0;
  z-index: 2;
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
}
#attendanceSection thead .att-col-idx { z-index: 5; }

#attendanceSection .att-col-name {
  min-width: 170px;
  width: 170px;
  position: sticky;
  left: 34px;
  z-index: 2;
  background: #fff;
  text-align: left;
}
#attendanceSection thead .att-col-name {
  z-index: 5;
  background: #f8fafc;
}

#attendanceSection .att-name-input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 8px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  outline: none;
}
#attendanceSection .att-name-input:focus { background: #eef2ff; }

#attendanceSection .att-col-day {
  min-width: 44px;
  width: 44px;
}
#attendanceSection .att-day-num { display: block; font-size: 0.8rem; }
#attendanceSection .att-day-wd { display: block; font-size: 0.6rem; color: #94a3b8; font-weight: 600; }

#attendanceSection th.att-weekend,
#attendanceSection td.att-weekend { background: #fed7aa; }
#attendanceSection td.att-weekend .att-hour-input { background: #fed7aa; }

#attendanceSection .att-hour-input {
  width: 44px;
  border: none;
  background: transparent;
  text-align: center;
  padding: 8px 1px;
  font-size: 0.78rem;
  white-space: nowrap;
  color: #1e293b;
  outline: none;
  -moz-appearance: textfield;
}
#attendanceSection .att-hour-input::-webkit-outer-spin-button,
#attendanceSection .att-hour-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#attendanceSection .att-hour-input:focus {
  background: #dbeafe;
  box-shadow: inset 0 0 0 2px #2563eb;
}
#attendanceSection .att-hour-input[readonly],
#attendanceSection .att-hour-input:disabled {
  cursor: default;
  color: #334155;
  opacity: 1;
  background: transparent;
}
#attendanceSection td.att-future {
  background: #f1f5f9;
}
#attendanceSection td.att-future .att-hour-input {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}
#attendanceSection .att-hour-input[readonly]:focus,
#attendanceSection .att-hour-input:disabled:focus {
  background: transparent;
  box-shadow: none;
}
#attendanceSection .att-name-input[readonly] {
  cursor: default;
  background: transparent;
  color: #0f172a;
}
#attendanceSection tr.att-row-mine {
  background: #f0f9ff;
}
#attendanceSection tr.att-row-mine .att-hour-input:not([readonly]) {
  background: #fff;
}
#attendanceSection tr.att-row-readonly .att-name-input,
#attendanceSection tr.att-row-readonly .att-hour-input {
  color: #475569;
}

#attendanceSection .att-col-total,
#attendanceSection .att-col-wd,
#attendanceSection .att-col-remaining {
  min-width: 78px;
  width: 78px;
  font-weight: 700;
  background: #f8fafc;
  color: #0f172a;
  position: sticky;
  right: 0;
}
#attendanceSection .att-col-remaining { right: 0; min-width: 104px; width: 104px; }
#attendanceSection .att-col-wd { right: 104px; min-width: 88px; width: 88px; }
#attendanceSection .att-col-total { right: 192px; }
#attendanceSection thead .att-col-total,
#attendanceSection thead .att-col-wd,
#attendanceSection thead .att-col-remaining { z-index: 5; }

#attendanceSection .att-total-cell,
#attendanceSection .att-wd-cell,
#attendanceSection .att-remaining-cell { padding: 8px 6px; }

/* Remaining Hours column */
#attendanceSection .att-col-target {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 2px;
}
#attendanceSection .att-remaining-cell { font-weight: 800; }
#attendanceSection .att-remaining-pending { color: #b91c1c; }
#attendanceSection .att-remaining-extra { color: #15803d; }
#attendanceSection .att-remaining-done { color: #0f172a; }

#attendanceSection tbody tr:hover td { background: #f9fbff; }
#attendanceSection tbody tr:hover .att-col-idx { background: #eef2ff; }

/* import panel */
#attendanceSection .att-import-panel {
  display: none;
  background: #ffffff;
  border: 1px solid #e5e9f2;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}
#attendanceSection .att-import-panel.open { display: block; }

#attendanceSection .att-import-panel h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: #0f172a;
}
#attendanceSection .att-import-help {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0 0 12px;
  line-height: 1.5;
}
#attendanceSection .att-import-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
#attendanceSection .att-import-row label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}
#attendanceSection input[type="file"].att-file {
  font-size: 0.82rem;
}
#attendanceSection input[type="month"].att-month-field {
  border: 1px solid #d5dbe7;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.82rem;
}
#attendanceSection .att-import-note { font-size: 0.82rem; color: #475569; margin: 6px 0; }
#attendanceSection .att-import-note.success { color: #16a34a; }
#attendanceSection .att-import-note.error { color: #dc2626; }
#attendanceSection .att-import-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}
#attendanceSection .att-import-list span {
  font-size: 0.75rem;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 4px 8px;
  color: #334155;
}
#attendanceSection .att-import-actions { display: flex; gap: 10px; }

/* Tabs: Current vs Imported */
#attendanceSection .att-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

/* Admin-only allowed emails panel */
#attendanceSection .att-members-panel {
  background: #ffffff;
  border: 1px solid #e5e9f2;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
/* Keep panel fully hidden unless Allowed emails tab is active.
   (display:flex above would otherwise override the HTML [hidden] attribute.) */
#attendanceSection .att-members-panel[hidden] {
  display: none !important;
}
#attendanceSection .att-members-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-shrink: 0;
}
#attendanceSection .att-members-head h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #0f172a;
}
#attendanceSection .att-members-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
}
#attendanceSection .att-members-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
#attendanceSection .att-members-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(60vh, 480px);
  overflow: auto;
  border: 1px solid #eef2f7;
  border-radius: 8px;
}
#attendanceSection .att-members-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.82rem;
  color: #334155;
  flex-wrap: wrap;
}
#attendanceSection .att-members-list li:last-child { border-bottom: none; }
#attendanceSection .att-member-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  flex: 1 1 200px;
}
#attendanceSection .att-member-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.88rem;
}
#attendanceSection .att-member-email {
  word-break: break-all;
  color: #64748b;
  font-size: 0.78rem;
}
#attendanceSection .att-member-admin {
  font-size: 0.68rem;
  font-weight: 700;
  color: #1d4ed8;
  background: #e0e7ff;
  border-radius: 999px;
  padding: 2px 8px;
  flex-shrink: 0;
}
#attendanceSection .att-member-actions {
  display: inline-flex;
  gap: 6px;
  flex-shrink: 0;
}
#attendanceSection .att-member-actions .att-btn {
  padding: 5px 10px;
  font-size: 0.75rem;
}
#attendanceSection .att-member-delete:not(:disabled) {
  color: #b91c1c;
  border-color: #fecaca;
}
#attendanceSection .att-member-delete:not(:disabled):hover {
  background: #fef2f2;
  border-color: #f87171;
}
#attendanceSection .att-members-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  flex-shrink: 0;
}
#attendanceSection .att-members-add .att-title-field {
  flex: 1 1 220px;
  min-width: 180px;
  border: 1px solid #d5dbe7;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.85rem;
}
#attendanceSection .att-members-note {
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: #94a3b8;
}
#attendanceSection .att-members-panel .att-status {
  display: block;
  margin: 0 0 10px;
  min-height: 18px;
}
#attendanceSection .att-tab {
  border: 1px solid #d5dbe7;
  background: #fff;
  color: #475569;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
#attendanceSection .att-tab.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
#attendanceSection .att-title-field {
  border: 1px solid #d5dbe7;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.82rem;
  min-width: 200px;
}
#attendanceSection .att-year-filter-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  margin-left: 8px;
}

/* Import list + sheet side-by-side */
#attendanceSection .att-imports-layout {
  display: flex;
  align-items: stretch;
  gap: 12px;
  min-height: 0;
}
#attendanceSection .att-imports-sidebar {
  flex: 0 0 240px;
  width: 240px;
  max-width: 30%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fff;
  border: 1px solid #e5e9f2;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}
#attendanceSection .att-imports-sidebar-toolbar {
  flex-shrink: 0;
  margin-bottom: 0;
  border: none;
  border-bottom: 1px solid #e5e9f2;
  border-radius: 0;
  box-shadow: none;
  padding: 8px;
  gap: 6px;
}
#attendanceSection .att-imports-sidebar-toolbar .att-month-title {
  width: 100%;
  flex: 1 1 100%;
  min-width: 0;
  font-size: 0.82rem;
}
#attendanceSection .att-imports-sidebar-toolbar .att-year-filter-label {
  margin-left: 0;
  font-size: 0.72rem;
}
#attendanceSection .att-imports-sidebar-toolbar .att-select {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.72rem;
  padding: 5px 7px;
}
#attendanceSection .att-imports-sidebar-toolbar .att-spacer {
  display: none;
}
#attendanceSection .att-imports-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: min(70vh, 720px);
  -webkit-overflow-scrolling: touch;
}
#attendanceSection .att-imports-empty {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 14px 10px;
  color: #64748b;
  font-size: 0.75rem;
  text-align: center;
}
#attendanceSection .att-import-card {
  text-align: left;
  border: 1px solid #e5e9f2;
  background: #fff;
  border-radius: 8px;
  padding: 7px 9px;
  cursor: pointer;
  box-shadow: none;
  transition: all 0.15s ease;
  width: 100%;
  flex-shrink: 0;
}
#attendanceSection .att-import-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}
#attendanceSection .att-import-card.active {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 1px #2563eb;
}
#attendanceSection .att-import-card-title {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.78rem;
  margin-bottom: 2px;
  word-break: break-word;
  line-height: 1.25;
}
#attendanceSection .att-import-card-meta,
#attendanceSection .att-import-card-date {
  font-size: 0.65rem;
  color: #64748b;
  line-height: 1.3;
}
#attendanceSection .att-imports-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
#attendanceSection .att-import-sheet-view {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
#attendanceSection .att-import-sheet-view[hidden] {
  display: none !important;
}
#attendanceSection .att-imports-main .att-table-scroll {
  max-height: min(70vh, 720px);
}
#attendanceSection .att-imports-placeholder {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: #94a3b8;
  font-size: 0.92rem;
  text-align: center;
  padding: 24px;
}
#attendanceSection .att-imports-placeholder[hidden],
#attendanceSection .att-imports-layout.has-sheet .att-imports-placeholder {
  display: none;
}

/* Excel-like imported sheet look (match original Google/Excel sheet) */
#attendanceSection table.att-excel {
  font-size: 0.75rem;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
#attendanceSection table.att-excel thead th {
  background: #fff2cc;
  color: #000;
  border: 1px solid #b1b1b1;
  font-weight: 700;
  padding: 4px 2px;
}
#attendanceSection table.att-excel th.att-sunday,
#attendanceSection table.att-excel td.att-sunday {
  background: #ff0000 !important;
}
#attendanceSection table.att-excel td.att-sunday .att-hour-input {
  background: #ff0000;
  color: #111;
}
#attendanceSection table.att-excel th.att-col-total,
#attendanceSection table.att-excel th.att-col-wd,
#attendanceSection table.att-excel th.att-col-remaining,
#attendanceSection table.att-excel td.att-col-total,
#attendanceSection table.att-excel td.att-col-wd {
  background: #c6efce !important;
  color: #000;
  font-weight: 700;
}
#attendanceSection table.att-excel td.att-col-remaining {
  background: #fff2cc !important;
  font-weight: 800;
}
#attendanceSection table.att-excel td.att-name-g0,
#attendanceSection table.att-excel td.att-name-g0 .att-name-input {
  background: #ffe699;
}
#attendanceSection table.att-excel td.att-name-g1,
#attendanceSection table.att-excel td.att-name-g1 .att-name-input {
  background: #f8cbad;
}
#attendanceSection table.att-excel td,
#attendanceSection table.att-excel th {
  border: 1px solid #b1b1b1;
  box-sizing: border-box;
}
#attendanceSection table.att-excel .att-hour-input,
#attendanceSection table.att-excel .att-name-input {
  font-size: 0.75rem;
}
/* Narrow S.No + Name sticky that does NOT cover day column 1 */
#attendanceSection table.att-excel .att-col-idx,
#attendanceSection table.att-excel th.att-col-idx,
#attendanceSection table.att-excel td.att-col-idx {
  position: sticky;
  left: 0;
  z-index: 5;
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  padding: 2px 0 !important;
  overflow: hidden;
  text-align: center;
  background: #fff;
  color: #000;
  font-weight: 600;
  font-size: 0.7rem;
}
#attendanceSection table.att-excel thead .att-col-idx {
  z-index: 7;
  background: #fff2cc !important;
}
#attendanceSection table.att-excel .att-col-name,
#attendanceSection table.att-excel th.att-col-name,
#attendanceSection table.att-excel td.att-col-name {
  position: sticky;
  left: 34px; /* exactly after S.No width */
  z-index: 4;
  width: 110px !important;
  min-width: 110px !important;
  max-width: 110px !important;
  overflow: hidden;
}
#attendanceSection table.att-excel thead .att-col-name {
  z-index: 6;
  background: #fff2cc !important;
}
#attendanceSection table.att-excel .att-col-day {
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  position: static;
  z-index: 1;
}
#attendanceSection table.att-excel .att-name-input {
  padding: 6px 4px;
  width: 100%;
  box-sizing: border-box;
}
#attendanceSection table.att-excel .att-day-wd { display: none; }
#attendanceSection table.att-excel tr.att-excel-gap td {
  height: 18px;
  background: #f5f7fb;
  border: none;
  padding: 0;
}

/* ---- "Attendance" nav button on the main page ---- */
.nav-attendance-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  transition: all 0.2s ease;
}
.nav-attendance-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
  color: #fff;
}
.nav-attendance-btn i { font-size: 0.95rem; }

/* ---- Standalone attendance page ---- */
body.attendance-page {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f7fb;
  color: #0f172a;
}

.att-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
  background: #ffffff;
  border-bottom: 1px solid #e5e9f2;
  padding: 10px 20px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  position: sticky;
  top: 0;
  z-index: 20;
}
.att-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.att-topbar-brand img { height: 40px; width: auto; display: block; }
.att-topbar .att-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#attendanceSection .att-back-home {
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  border: 1px solid #d5dbe7;
  background: #fff;
  color: #334155;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
}
#attendanceSection .att-back-home:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

/* Profile button + dropdown */
.att-profile {
  position: relative;
  flex-shrink: 0;
}
.att-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d5dbe7;
  background: #ffffff;
  color: #1e293b;
  border-radius: 999px;
  padding: 6px 12px 6px 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.att-profile-btn:hover,
.att-profile.open .att-profile-btn {
  background: #f1f5f9;
  border-color: #b9c2d6;
}
.att-profile-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}
.att-profile-btn .fa-chevron-down {
  font-size: 0.65rem;
  color: #64748b;
}
.att-profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 260px;
  background: #fff;
  border: 1px solid #e5e9f2;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  padding: 12px;
  z-index: 30;
}
.att-profile-info {
  padding: 6px 8px 12px;
  border-bottom: 1px solid #eef1f6;
  margin-bottom: 10px;
}
.att-profile-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  word-break: break-word;
}
.att-profile-email {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 4px;
  word-break: break-all;
}
.att-profile-logout {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.att-profile-logout:hover {
  background: #fee2e2;
}

body.attendance-page #attendanceSection {
  border-top: none;
  background: transparent;
  padding: 12px 0 20px;
}

/* Access gate (shown while checking / when unauthorized) */
.att-gate {
  display: flex;
  justify-content: center;
  padding: 24px 0;
}
.att-gate-card {
  background: #fff;
  border: 1px solid #e5e9f2;
  border-radius: 14px;
  padding: 34px 30px;
  text-align: center;
  max-width: 420px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.att-gate-card i {
  font-size: 2rem;
  color: #94a3b8;
  margin-bottom: 12px;
}
.att-gate-card p {
  font-size: 0.95rem;
  color: #334155;
  margin: 0 0 18px;
  line-height: 1.5;
}
.att-gate-card .att-btn { text-decoration: none; display: inline-flex; }

/* ============================================================
 * Responsive — tablets & phones
 * Goals:
 *  - Keep # / Name sticky on the left
 *  - Total / Days / Remaining are NOT sticky on mobile (scroll to see)
 *  - Horizontal scroll ONLY inside the table area
 *  - Smaller fonts on mobile so Current / Import / Allowed emails stay clear
 * ============================================================ */
@media (max-width: 768px) {
  body.attendance-page {
    overflow-x: hidden;
  }

  #attendanceSection {
    padding: 10px 0 16px;
    overflow-x: hidden;
  }
  body.attendance-page #attendanceSection {
    padding: 8px 0 16px;
  }
  #attendanceSection .att-wrap {
    padding: 0 10px;
    max-width: 100%;
    overflow-x: hidden;
  }

  #attendanceSection .att-header {
    gap: 6px;
    margin-bottom: 8px;
  }
  #attendanceSection .att-header h2 {
    font-size: 1.15rem;
  }
  #attendanceSection .att-header h2 span.att-badge {
    font-size: 0.58rem;
    padding: 2px 7px;
    margin-left: 4px;
  }
  #attendanceSection .att-back-home {
    font-size: 0.72rem;
    padding: 6px 9px;
  }

  /* Tabs: wrap in place — no left/right swipe on the tab bar */
  #attendanceSection .att-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    overflow: visible;
  }
  #attendanceSection .att-tab {
    flex: 1 1 auto;
    font-size: 0.72rem;
    padding: 7px 10px;
    border-radius: 8px;
    text-align: center;
  }

  /* Toolbar */
  #attendanceSection .att-toolbar {
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
  }
  #attendanceSection .att-month-nav {
    width: 100%;
    flex: 1 1 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  #attendanceSection .att-month-current {
    grid-column: 1 / -1;
    order: -1;
    padding: 10px 12px;
  }
  #attendanceSection .att-btn.att-month-prev,
  #attendanceSection .att-btn.att-month-next {
    width: 100%;
    padding: 9px 10px;
    white-space: normal;
  }
  #attendanceSection .att-month-card-top {
    font-size: 0.82rem;
    gap: 6px;
  }
  #attendanceSection .att-month-card-sub {
    font-size: 0.72rem;
    padding-left: 1.2rem;
  }
  #attendanceSection .att-btn.att-month-next .att-month-card-sub {
    padding-left: 0;
  }
  #attendanceSection .att-month-title {
    min-width: 0;
    font-size: 0.95rem;
  }
  #attendanceSection .att-month-badge {
    font-size: 0.62rem;
    padding: 2px 8px;
  }
  #attendanceSection .att-btn {
    font-size: 0.72rem;
    padding: 6px 9px;
  }
  #attendanceSection select.att-select {
    flex: 1 1 120px;
    font-size: 0.72rem;
    padding: 6px 8px;
    max-width: 100%;
  }
  #attendanceSection .att-status {
    font-size: 0.7rem;
    width: 100%;
  }

  /* Table: scroll only here; sticky columns stay put */
  #attendanceSection .att-table-scroll {
    max-height: 65vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    max-width: 100%;
  }
  #attendanceSection table.att-table {
    font-size: 0.68rem;
  }
  #attendanceSection table.att-table thead th {
    font-size: 0.65rem;
    padding: 4px 2px;
  }

  /* Left sticky — keep */
  #attendanceSection .att-col-idx {
    min-width: 26px;
    width: 26px;
    position: sticky;
    left: 0;
  }
  #attendanceSection .att-col-name {
    min-width: 96px;
    width: 96px;
    position: sticky;
    left: 26px;
  }
  #attendanceSection .att-name-input {
    font-size: 0.7rem;
    padding: 6px 6px;
  }

  /* Day cells — compact */
  #attendanceSection .att-col-day {
    min-width: 40px;
    width: 40px;
  }
  #attendanceSection .att-day-num { font-size: 0.68rem; }
  #attendanceSection .att-day-wd { font-size: 0.5rem; }
  #attendanceSection .att-hour-input {
    width: 40px;
    padding: 8px 0;
    font-size: 0.66rem;
    white-space: nowrap;
  }

  /* Right summary columns: NOT sticky on mobile — only visible after scrolling left */
  #attendanceSection .att-col-total,
  #attendanceSection .att-col-wd,
  #attendanceSection .att-col-remaining,
  #attendanceSection table.att-excel th.att-col-total,
  #attendanceSection table.att-excel th.att-col-wd,
  #attendanceSection table.att-excel th.att-col-remaining,
  #attendanceSection table.att-excel td.att-col-total,
  #attendanceSection table.att-excel td.att-col-wd,
  #attendanceSection table.att-excel td.att-col-remaining {
    position: static !important;
    right: auto !important;
    font-size: 0.65rem;
  }
  #attendanceSection .att-col-remaining {
    min-width: 72px;
    width: 72px;
  }
  #attendanceSection .att-col-wd {
    min-width: 48px;
    width: 48px;
  }
  #attendanceSection .att-col-total {
    min-width: 56px;
    width: 56px;
  }
  #attendanceSection .att-col-target {
    font-size: 0.5rem;
  }
  #attendanceSection .att-total-cell,
  #attendanceSection .att-wd-cell,
  #attendanceSection .att-remaining-cell {
    padding: 6px 3px;
  }

  /* Excel/import table — left sticky only; right columns scroll normally */
  #attendanceSection table.att-excel {
    font-size: 0.65rem;
  }
  #attendanceSection table.att-excel .att-col-idx,
  #attendanceSection table.att-excel th.att-col-idx,
  #attendanceSection table.att-excel td.att-col-idx {
    position: sticky;
    left: 0;
    width: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;
    font-size: 0.6rem;
  }
  #attendanceSection table.att-excel .att-col-name,
  #attendanceSection table.att-excel th.att-col-name,
  #attendanceSection table.att-excel td.att-col-name {
    position: sticky;
    left: 26px;
    width: 88px !important;
    min-width: 88px !important;
    max-width: 88px !important;
  }
  #attendanceSection table.att-excel .att-col-day {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
  }
  #attendanceSection table.att-excel .att-hour-input,
  #attendanceSection table.att-excel .att-name-input {
    font-size: 0.65rem;
  }

  /* ---- Import Sheet section ---- */
  #attendanceSection .att-import-panel {
    padding: 12px;
    overflow-x: hidden;
  }
  #attendanceSection .att-import-panel h3 {
    font-size: 0.88rem;
  }
  #attendanceSection .att-import-help {
    font-size: 0.7rem;
    line-height: 1.4;
  }
  #attendanceSection .att-import-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  #attendanceSection .att-import-row label {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    font-size: 0.7rem;
  }
  #attendanceSection input[type="file"].att-file,
  #attendanceSection input[type="month"].att-month-field,
  #attendanceSection .att-title-field {
    font-size: 0.72rem;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  #attendanceSection .att-import-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  #attendanceSection .att-imports-layout {
    flex-direction: column;
    gap: 10px;
  }
  #attendanceSection .att-imports-sidebar {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
  }
  #attendanceSection .att-imports-list {
    grid-template-columns: none;
    max-height: 160px;
    gap: 4px;
    padding: 6px;
  }
  #attendanceSection .att-import-card {
    padding: 6px 8px;
  }
  #attendanceSection .att-import-card-title {
    font-size: 0.72rem;
  }
  #attendanceSection .att-import-card-meta,
  #attendanceSection .att-import-card-date {
    font-size: 0.6rem;
  }
  #attendanceSection .att-imports-empty {
    padding: 16px 12px;
    font-size: 0.78rem;
  }
  #attendanceSection .att-imports-placeholder {
    min-height: 120px;
    font-size: 0.82rem;
    padding: 16px;
  }
  #attendanceSection .att-imports-main .att-table-scroll {
    max-height: 55vh;
  }

  /* Import sheet actions: Save / Share / Download / Delete stay on one line */
  #attendanceSection .att-import-sheet-view .att-toolbar {
    gap: 6px;
  }
  #attendanceSection .att-import-sheet-view .att-actions {
    flex: 1 1 100%;
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 4px;
    min-width: 0;
  }
  #attendanceSection .att-import-sheet-view .att-actions .att-btn {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    padding: 7px 4px;
    font-size: 0.65rem;
    white-space: nowrap;
    gap: 3px;
  }
  #attendanceSection .att-import-sheet-view .att-actions .att-btn i {
    font-size: 0.72rem;
  }
  #attendanceSection .att-import-sheet-view .att-actions .att-btn span {
    display: inline;
  }
  #attendanceSection .att-import-sheet-view .att-status {
    width: 100%;
  }

  /* ---- Allowed emails section ---- */
  #attendanceSection .att-members-panel {
    padding: 12px;
    min-height: 0;
    overflow-x: hidden;
  }
  #attendanceSection .att-members-head h3 {
    font-size: 0.9rem;
  }
  #attendanceSection .att-members-count {
    font-size: 0.72rem;
  }
  #attendanceSection .att-members-add {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  #attendanceSection .att-members-add .att-title-field {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    font-size: 0.72rem;
    padding: 7px 9px;
  }
  #attendanceSection .att-members-add .att-btn {
    width: 100%;
  }
  #attendanceSection .att-members-list {
    min-height: 0;
    max-height: min(55vh, 420px);
  }
  #attendanceSection .att-members-list li {
    font-size: 0.72rem;
    padding: 8px;
    gap: 6px;
  }
  #attendanceSection .att-member-name {
    font-size: 0.78rem;
  }
  #attendanceSection .att-member-email {
    font-size: 0.68rem;
  }
  #attendanceSection .att-member-admin {
    font-size: 0.58rem;
  }
  #attendanceSection .att-member-actions {
    width: 100%;
    justify-content: flex-start;
  }
  #attendanceSection .att-member-actions .att-btn {
    padding: 5px 9px;
    font-size: 0.68rem;
  }
  #attendanceSection .att-members-note {
    font-size: 0.65rem;
  }

  .att-topbar { padding: 8px 10px; }
  .att-topbar-brand img { height: 34px; }
  .att-profile-menu { width: min(240px, calc(100vw - 20px)); }
  .nav-attendance-btn span { display: none; }
  .nav-attendance-btn { padding: 9px 11px; }
}

@media (max-width: 640px) {
  /* Actions on their own row — no sideways shift of the page */
  #attendanceSection .att-spacer { flex-basis: 100%; height: 0; }
  #attendanceSection .att-actions {
    width: 100%;
    justify-content: stretch;
  }
  #attendanceSection .att-btn.att-action {
    flex: 1 1 0;
    justify-content: center;
    padding: 8px 6px;
    font-size: 0.7rem;
  }
  #attendanceSection .att-btn.att-action span {
    display: inline;
  }

  /* Keep import-sheet action row locked to one line (incl. Delete) */
  #attendanceSection .att-import-sheet-view .att-actions {
    flex-wrap: nowrap;
    width: 100%;
  }
  #attendanceSection .att-import-sheet-view .att-actions .att-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 7px 3px;
    font-size: 0.62rem;
  }

  #attendanceSection .att-header h2 { font-size: 1.05rem; }
  #attendanceSection .att-tab { font-size: 0.68rem; padding: 6px 8px; }
}

@media (max-width: 400px) {
  #attendanceSection .att-col-name { min-width: 84px; width: 84px; }
  #attendanceSection .att-col-remaining { min-width: 64px; width: 64px; }
  #attendanceSection .att-col-wd { min-width: 42px; width: 42px; }
  #attendanceSection .att-col-total { min-width: 52px; width: 52px; }
  #attendanceSection .att-col-day { min-width: 38px; width: 38px; }
  #attendanceSection .att-hour-input { width: 38px; font-size: 0.62rem; padding: 7px 0; white-space: nowrap; }
  #attendanceSection table.att-excel .att-col-name,
  #attendanceSection table.att-excel th.att-col-name,
  #attendanceSection table.att-excel td.att-col-name {
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px !important;
  }
}

/* ---------- Working-hours entry popup ---------- */
#attendanceSection .att-hour-input.att-hour-open {
  cursor: pointer;
  background: #ffffff;
}
#attendanceSection .att-hour-input.att-hour-open:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}
#attendanceSection .att-hour-input.att-hour-locked {
  cursor: not-allowed;
}
#attendanceSection .att-hour-input.att-hour-open::-webkit-outer-spin-button,
#attendanceSection .att-hour-input.att-hour-open::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Permission / notice popup for locked day clicks */
.att-notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.att-notice-card {
  background: #fff;
  border-radius: 12px;
  padding: 22px 24px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
  text-align: center;
}
.att-notice-text {
  margin: 0 0 16px;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #0f172a;
}
#attendanceSection .att-hour-input.att-hour-open { -moz-appearance: textfield; }

.att-time-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
  backdrop-filter: blur(2px);
}
.att-time-overlay.open { display: flex; }

.att-time-modal {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border: 1px solid #e8edf5;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
  padding: 22px 24px 20px;
  font-family: 'Poppins', sans-serif;
  animation: attTimePop 0.16s ease-out;
}
@keyframes attTimePop {
  from { transform: translateY(8px) scale(0.98); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.att-time-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}
.att-time-head h3 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.att-time-close {
  border: none;
  background: #f1f5f9;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1.25rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.att-time-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.att-time-sub {
  margin: 0 0 16px;
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 500;
}

.att-time-absent {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 11px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.att-time-absent:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}
.att-time-absent input {
  width: 17px;
  height: 17px;
  accent-color: #2563eb;
  cursor: pointer;
  flex: 0 0 auto;
}
.att-time-absent span {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
}

.att-time-body.att-time-disabled {
  opacity: 0.42;
  pointer-events: none;
}
.att-time-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.att-time-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.att-time-field > span {
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  letter-spacing: 0.01em;
}

.att-time-field input,
.att-time-field select {
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #0f172a;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-height: 44px;
  box-sizing: border-box;
}
.att-time-field input:hover,
.att-time-field select:hover {
  border-color: #c5d0e0;
}
.att-time-field input:focus,
.att-time-field select:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.att-time-clock {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.att-time-clock select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(100% - 14px) calc(50% - 2px),
    calc(100% - 9px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}
.att-time-clock select:first-of-type,
.att-time-clock select:nth-of-type(2) {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  text-align-last: center;
}
.att-time-colon {
  flex: 0 0 auto;
  font-size: 1.15rem;
  font-weight: 700;
  color: #64748b;
  line-height: 1;
  padding-bottom: 1px;
}
.att-time-ampm {
  flex: 0 0 84px !important;
  margin-left: 2px;
  font-weight: 600;
  text-align: center;
  text-align-last: center;
}

.att-time-field input[type="number"] {
  width: 100%;
  -moz-appearance: textfield;
}
.att-time-field input[type="number"]::-webkit-outer-spin-button,
.att-time-field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.att-time-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 13px 16px;
  background: linear-gradient(180deg, #f5f9ff 0%, #eef5ff 100%);
  border: 1px solid #d7e6ff;
  border-radius: 12px;
}
.att-time-result-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e3a8a;
}
.att-time-result-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1d4ed8;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.att-time-note {
  margin: 10px 0 0;
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.45;
}

.att-time-error {
  min-height: 16px;
  margin-top: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #dc2626;
}

.att-time-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #eef2f7;
}
.att-time-actions .att-btn {
  border: 1px solid #dbe3ef;
  background: #ffffff;
  color: #1e293b;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.att-time-actions .att-btn:hover {
  background: #f8fafc;
  border-color: #c5d0e0;
}
.att-time-actions .att-btn.primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.att-time-actions .att-btn.primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}
.att-time-actions .att-spacer { flex: 1 1 auto; }

@media (max-width: 480px) {
  .att-time-modal { padding: 18px 16px 16px; border-radius: 16px; }
  .att-time-clock { gap: 6px; }
  .att-time-ampm { flex-basis: 76px !important; }
  .att-time-actions { flex-wrap: wrap; }
  .att-time-actions .att-spacer { display: none; }
  .att-time-actions .att-btn { flex: 1 1 auto; }
}
