.admin-page:not(.page-ready) {
  visibility: hidden;
}

.admin-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover {
  background: rgba(255, 255, 255, 0.25);
}

.container {
  max-width: 100%;
  margin: 0;
  padding: 0 24px;
}

.admin-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.admin-toolbar {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.icon-button {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  padding: 10px 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.3);
}

.icon-button .icon {
  font-size: 1.1em;
}

.icon-label {
  font-size: 0.9em;
}

/* Smart Action Button Pattern - contextual button that changes position and color based on enabled state */
.smart-action-button-container {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  transition: justify-content 0.2s ease;
}

.smart-action-button-container.is-active {
  justify-content: flex-start;
}

.smart-action-button-container .refresh-button[disabled] {
  background: #a7a9b8;
  color: #f4f4f8;
  border-color: rgba(45, 47, 119, 0.2);
  box-shadow: none;
  cursor: not-allowed;
}


.weather-table {
  min-width: 0;
  table-layout: fixed;
}

.weather-table th,
.weather-table td {
  white-space: normal;
  word-break: break-word;
}

.user-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.user-empty {
  text-align: center;
  color: #58608a;
  padding: 20px 0;
}

.user-card {
  border: 1px solid rgba(45, 47, 119, 0.15);
  border-radius: 14px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 10px 22px rgba(45, 47, 119, 0.1);
}

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

.user-header-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.user-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-role-badge {
  background: rgba(25, 118, 210, 0.18);
  color: #1565c0;
}

.user-title {
  font-weight: 700;
  font-size: 1.1em;
  color: #2d2f77;
}

.user-subtitle {
  color: #58608a;
  font-size: 0.9em;
}

.user-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.badge {
  background: rgba(45, 47, 119, 0.12);
  color: #2d2f77;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8em;
}

.badge-ok {
  background: rgba(46, 125, 50, 0.18);
  color: #1b5e20;
}

.badge-warn {
  background: rgba(255, 193, 7, 0.25);
  color: #8d6e00;
}

.badge-err {
  background: rgba(176, 0, 32, 0.2);
  color: #b00020;
}

.badge-muted {
  background: rgba(96, 125, 139, 0.2);
  color: #455a64;
}

.user-sections {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-section summary {
  font-weight: 700;
  color: #2d2f77;
  cursor: pointer;
  padding: 6px 0;
}

.user-section[open] summary {
  color: #1c1f55;
}

.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 8px 0 12px;
}

.user-grid label,
.user-properties label {
  font-size: 0.9em;
  color: #333;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.user-grid input,
.user-grid select,
.user-properties select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #c8cbe1;
}

.inline-field {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-field input {
  flex: 1;
}

.inline-action {
  padding: 8px 12px;
  font-size: 0.85em;
}

.help-text {
  display: block;
  margin-top: 6px;
  font-size: 0.8em;
  color: #5b6288;
}

.user-properties {
  margin-bottom: 12px;
}

.user-properties-label {
  font-weight: 700;
  color: #2d2f77;
  margin-bottom: 6px;
}

.user-properties-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 12px;
  background: rgba(45, 47, 119, 0.05);
  border-radius: 10px;
  padding: 10px;
}

.prop-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #2d2f77;
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  margin-top: 12px;
}

.user-actions-left,
.user-actions-right {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.user-actions-right {
  margin-left: auto;
}

.user-reset-wrap {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.user-reset-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85em;
  color: #2d2f77;
  font-weight: 600;
}

.user-reset-label .user-reset {
  min-width: 180px;
}

.user-actions .refresh-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}


.inline-status {
  color: #2d2f77;
  font-weight: 600;
}

.user-reset-wrap {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.user-tabs {
  display: flex;
  gap: 10px;
  margin: 10px 0 16px;
  flex-wrap: wrap;
}

.tab-button {
  border-radius: 999px;
  border: 1px solid rgba(45, 47, 119, 0.25);
  background: rgba(255, 255, 255, 0.7);
  color: #2d2f77;
  padding: 6px 14px;
  font-weight: 700;
  cursor: pointer;
}

.tab-button.active {
  background: #2d2f77;
  color: #fff;
  box-shadow: 0 6px 12px rgba(45, 47, 119, 0.2);
}

.property-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.property-save {
  margin-left: auto;
}

.property-actions.dirty .property-save {
  margin-left: 0;
}

.property-actions .refresh-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.rules-actions,
.add-user-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.rules-actions #save-rules,
.add-user-actions #add-user {
  margin-left: auto;
}

.rules-actions.dirty #save-rules,
.add-user-actions.dirty #add-user {
  margin-left: 0;
}

.rules-actions .refresh-button[disabled],
.add-user-actions .refresh-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.property-delete {
  background: #b00020;
  box-shadow: 0 6px 12px rgba(176, 0, 32, 0.25);
}

.production-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.summary-card {
  background: #ffffff;
  border: 1px solid rgba(45, 47, 119, 0.12);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(45, 47, 119, 0.08);
}

.summary-label {
  color: #58608a;
  font-weight: 600;
  font-size: 0.9em;
}

.summary-value {
  font-size: 1.6em;
  font-weight: 700;
  color: #2d2f77;
  margin-top: 6px;
}

.summary-note {
  color: #8a90b8;
  font-size: 0.8em;
  margin-top: 4px;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.customer-badge {
  background: #f7f8ff;
  border: 1px solid rgba(45, 47, 119, 0.12);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(45, 47, 119, 0.08);
}

.badge-code {
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #2d2f77;
  margin-bottom: 10px;
}

.badge-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #4a4f7a;
  font-weight: 600;
}

.badge-empty {
  color: #6f75a3;
  font-weight: 600;
}

.customer-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.customer-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.customer-table th,
.customer-table td {
  white-space: nowrap;
}

.hidden {
  display: none;
}

.tab-panel {
  margin-top: 12px;
}

.access-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  justify-content: flex-end;
}

.access-stack .user-grid {
  grid-template-columns: 1fr;
}

.access-stack .user-properties-list {
  grid-template-columns: 1fr;
}

.property-group {
  background: rgba(45, 47, 119, 0.04);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
}

.property-group-title {
  font-weight: 700;
  color: #2d2f77;
  margin-bottom: 8px;
}

.diagnostics-modal .modal-content {
  max-width: 720px;
  text-align: left;
}

.diagnostics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.diagnostics-card {
  background: rgba(45, 47, 119, 0.06);
  border-radius: 12px;
  padding: 12px;
}

.diagnostics-card h3 {
  margin: 0 0 8px;
  color: #2d2f77;
  font-size: 0.95em;
}

.diagnostics-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #34385e;
  font-weight: 600;
}

.diagnostics-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  justify-content: flex-end;
}

.calendar-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.calendar-controls label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: #2d2f77;
}

.calendar-nav {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: nowrap;
}

.calendar-jump {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 600;
  color: #2d2f77;
  align-items: center;
  text-align: center;
}

.calendar-jump select {
  text-align-last: center;
}

.occupancy-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.occupancy-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.occupancy-legend {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: center;
  margin-left: 8px;
  font-weight: 600;
  color: #1c1f3a;
}

.occupancy-legend-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: 8px;
  flex-wrap: nowrap;
}

.occupancy-legend-wrap .legend-action {
  margin-left: 4px;
}

.occupancy-legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.legend-swatch {
  width: 28px;
  height: 16px;
  border-radius: 8px;
  border: 1px solid rgba(28, 31, 58, 0.15);
  display: inline-block;
}

.legend-occupied {
  background: #4caf50;
}

.legend-empty {
  background: #ef5350;
}

.legend-turnover {
  background: #f6c453;
}

.occupancy-table th,
.occupancy-table td {
  text-align: center;
  width: auto;
  padding: 0;
  border-right: 2px solid #2a2e67;
}

.occupancy-table .sticky-col {
  position: sticky;
  left: 0;
  background: #f7f7fb;
  z-index: 2;
  text-align: left;
  font-weight: 600;
}

.occupancy-rate-row th {
  background: #e9edff;
  color: #1c1f3a;
}

.occupancy-rate-row .sticky-col {
  background: #dee3ff;
}

.occupancy-label {
  color: #1c1f3a;
}

.occupancy-cell {
  height: 34px;
  min-width: 42px;
  position: relative;
}

.occupancy-occupied {
  background: #4caf50;
}

.occupancy-empty {
  background: #ef5350;
}

.occupancy-turnover-in {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #ef5350 0 50%, #4caf50 50% 100%);
}

.occupancy-turnover-out {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #4caf50 0 50%, #ef5350 50% 100%);
}

.occupancy-turnover-both {
  position: relative;
  overflow: hidden;
  background: #4caf50;
}

.occupancy-turnover-in::after,
.occupancy-turnover-out::after,
.occupancy-turnover-both::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #f6c453;
  clip-path: polygon(0 0, 100% 0, 62% 100%, 38% 100%);
}

.occupancy-tentative::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(20, 70, 30, 0.55) 1px, transparent 1px);
  background-size: 6px 6px;
  opacity: 0.85;
  pointer-events: none;
}

.occupancy-cleaning::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(246, 196, 83, 0.9);
  background-image:
    radial-gradient(circle, rgba(76, 175, 80, 0.8) 1px, transparent 1px),
    radial-gradient(circle, rgba(239, 83, 80, 0.8) 1px, transparent 1px);
  background-size: 8px 8px;
  background-position: 0 0, 4px 4px;
  pointer-events: none;
}

.occupancy-unknown {
  background: #e0e0e0;
  color: #616161;
}

.occupancy-rate {
  font-weight: 700;
  color: #1c1f3a;
  background: #e9edff;
}

.info-button {
  margin-left: auto;
}

.page-info-button {
  position: fixed;
  top: 18px;
  right: 24px;
  z-index: 200;
  box-shadow: 0 10px 20px rgba(18, 22, 45, 0.2);
}

.info-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 23, 50, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
}

.info-modal.hidden {
  display: none;
}

.info-modal-content {
  background: #ffffff;
  color: #1c1f3a;
  border-radius: 16px;
  padding: 18px 20px;
  width: min(520px, 92vw);
  box-shadow: 0 18px 40px rgba(15, 18, 45, 0.35);
}

.info-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.info-modal-body ul {
  margin: 6px 0 12px 18px;
}

.occupancy-rate.muted {
  color: #24295b;
  background: #dfe4ff;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.hub-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
  border-radius: 14px;
  background: #ffffff;
  color: #2d2f77;
  font-weight: 700;
  font-size: 1.02em;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(25, 30, 70, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hub-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(25, 30, 70, 0.18);
}

.hub-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hub-title {
  margin: 0;
  color: #2d2f77;
  font-size: 1.1em;
}

.hub-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hub-toolbar-floating {
  margin-top: 4px;
  margin-bottom: 18px;
}

.hub-toolbar .icon-button {
  background: #f4f6ff;
  border: 1px solid rgba(45, 47, 119, 0.2);
  color: #2d2f77;
}

.hub-toolbar .icon-button:hover {
  background: #e4e9ff;
}

.ops-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ops-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hub-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hub-page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hub-page-left,
.hub-page-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hub-pill {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.hub-pill.is-active {
  background: #ffffff;
  color: #2d2f77;
  box-shadow: 0 12px 24px rgba(25, 30, 70, 0.2);
}

.hub-card {
  padding: 0;
  overflow: hidden;
}

.hub-frame-wrap {
  width: 100%;
  min-height: 520px;
}

.hub-frame {
  width: 100%;
  height: 70vh;
  min-height: 520px;
  border: none;
  display: block;
  background: #ffffff;
}

body.embedded {
  background: transparent;
}

body.embedded .container {
  padding: 0;
}

body.embedded header,
body.embedded .admin-toolbar,
body.embedded .page-info-button {
  display: none;
}

body.embedded .admin-layout {
  margin-top: 0;
}

body.embedded .admin-card {
  border-radius: 0;
  box-shadow: none;
}
.profile-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.profile-nav-left,
.profile-nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-nav-right .icon-button {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.ops-body {
  flex: 1;
  display: flex;
}

.ops-frame {
  flex: 1;
  width: 100%;
  border: none;
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(25, 30, 70, 0.18);
  background: #ffffff;
}

.user-reset-wrap input {
  min-width: 180px;
}

@media (max-width: 900px) {
  .user-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .user-badges {
    justify-content: flex-start;
  }
}

@media (max-width: 1100px) {
  .admin-row {
    grid-template-columns: 1fr;
  }
}

.panel-left {
  align-self: flex-start;
}

.panel-right {
  align-self: flex-start;
}

.auth-only {
  display: none;
}

.cleaning-summary {
  margin-top: 12px;
}

.cleaning-summary-card {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #f3f4ff;
  color: #1c1f3a;
  font-weight: 600;
}

.cleaning-teams {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.cleaning-team-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(44, 53, 120, 0.12);
  padding: 14px 16px;
  color: #1c1f3a;
}

.cleaning-team-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 700;
}

.cleaning-group {
  margin-top: 10px;
}

.cleaning-group-title {
  font-weight: 700;
  color: #2d2f77;
  margin-bottom: 6px;
}

.cleaning-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.cleaning-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: #f8f9ff;
  border-radius: 10px;
  font-weight: 600;
}

.cleaning-task {
  cursor: grab;
}

.cleaning-task.is-dragging {
  opacity: 0.6;
  cursor: grabbing;
}

.cleaning-list.is-drop-target,
.cleaning-team-card.is-drop-target {
  outline: 2px dashed rgba(45, 47, 119, 0.45);
  background: rgba(45, 47, 119, 0.06);
}

.cleaning-unit {
  color: #1c1f3a;
}

.cleaning-tags {
  color: #5c5fd3;
  font-weight: 700;
}

.cleaning-empty {
  color: #6b6f94;
  font-weight: 600;
}

.cleaning-unassigned {
  margin-top: 16px;
}

.cleaning-override {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cleaning-override input {
  min-width: 140px;
}

.admin-card h2 {
  margin-bottom: 12px;
  color: #2d2f77;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.admin-grid label {
  font-size: 0.9em;
  color: #333;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-grid input {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.admin-grid select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.admin-grid select.is-required {
  border-color: #b00020;
  box-shadow: 0 0 0 2px rgba(176, 0, 32, 0.15);
}

.timeclock-role-hint {
  font-size: 0.82em;
  color: #6b6f7b;
}

.timeclock-role-hint.is-warn {
  color: #b00020;
  font-weight: 600;
}

.station-help {
  display: flex;
  align-items: flex-end;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(45, 47, 119, 0.4);
  color: #2d2f77;
  font-weight: 600;
  text-decoration: none;
  background: rgba(45, 47, 119, 0.08);
  min-height: 38px;
}

.link-button:hover {
  background: rgba(45, 47, 119, 0.16);
}

#login-status {
  color: #b00020;
  font-weight: 600;
}

.refresh-status.is-error {
  color: #b00020;
  font-weight: 600;
}

.refresh-status.is-success {
  color: #1b5e20;
  font-weight: 600;
}

.timeclock-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

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

@media (max-width: 900px) {
  .timeclock-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeclock-action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .timeclock-action-row .refresh-button {
    width: 100%;
    justify-content: center;
  }

  .timeclock-actions {
    gap: 14px;
  }
}

@media (max-width: 600px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .timeclock-period {
    width: 100%;
  }
}

.timeclock-action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.timeclock-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  touch-action: manipulation;
}

.timeclock-action[disabled] {
  opacity: 0.45;
  filter: grayscale(0.4);
  cursor: not-allowed;
  box-shadow: none;
}

.timeclock-action.is-muted {
  background: #a7a9b8;
  color: #f4f4f8;
  border-color: rgba(45, 47, 119, 0.2);
}

.timeclock-action.is-primary {
  order: 0;
}

.timeclock-action.is-secondary {
  order: 1;
}

.timeclock-action-row #timeclock-refresh {
  order: 2;
}

.timeclock-page .timeclock-period {
  font-weight: 600;
  color: #2d2f77;
  background: rgba(45, 47, 119, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(45, 47, 119, 0.2);
}

.timeclock-actions.is-busy {
  opacity: 0.7;
}

.timeclock-actions.is-busy .refresh-button {
  cursor: progress;
}

.timeclock-action-indicator {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #2d2f77;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.timeclock-action.is-active .timeclock-action-indicator {
  opacity: 1;
  transform: translateX(0);
}

.timeclock-action-label {
  font-weight: 600;
}

.timeclock-login-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.timeclock-signup-panel .admin-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.timeclock-login-status {
  font-weight: 600;
}

.timeclock-login-status.is-error {
  color: #b00020;
}

.timeclock-signup-panel .link-button {
  padding: 6px 12px;
}

.timeclock-create-link {
  color: #2d2f77;
  font-weight: 600;
  text-decoration: underline;
}

.timeclock-create-link:hover {
  color: #1f2261;
}

.timeclock-status {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(45, 47, 119, 0.12);
  color: #2d2f77;
  font-weight: 700;
}

.timeclock-status.is-active {
  background: rgba(46, 125, 50, 0.2);
  color: #1b5e20;
}

.timeclock-report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.timeclock-report-controls {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.timeclock-payroll-panel {
  border: 1px solid rgba(45, 47, 119, 0.15);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.85);
}

.timeclock-payroll-meta {
  display: grid;
  gap: 6px;
  font-size: 0.9em;
  color: #2d2f77;
  padding-top: 24px;
}

.timeclock-payroll-actions {
  align-items: center;
}

.timeclock-payroll-actions .refresh-status {
  min-width: 160px;
}

.timeclock-period {
  color: #2d2f77;
  font-weight: 600;
}

.timeclock-table {
  width: 100%;
  border-collapse: collapse;
}

.timeclock-table th,
.timeclock-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(45, 47, 119, 0.12);
  font-size: 0.9em;
}

.timeclock-table th {
  text-align: left;
  color: #2d2f77;
}

.timeclock-employee-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeclock-employee-row {
  display: grid;
  grid-template-columns: 1.2fr 0.6fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(45, 47, 119, 0.15);
  background: #ffffff;
}

.timeclock-employee-row label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85em;
  color: #333;
}

.timeclock-employee-row input {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.timeclock-employee-row select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.timeclock-employee-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.timeclock-employee-status {
  font-size: 0.8em;
  color: #58608a;
}

.timeclock-employee-status.is-error {
  color: #b00020;
}

.timeclock-config-actions {
  display: flex;
  justify-content: flex-end;
  transition: justify-content 0.2s ease;
  gap: 8px;
}

.timeclock-config-actions .refresh-button[disabled] {
  background: #a7a9b8;
  color: #f4f4f8;
  border-color: rgba(45, 47, 119, 0.2);
  box-shadow: none;
  cursor: not-allowed;
}

.timeclock-config-actions.is-dirty {
  justify-content: flex-start;
}

.timeclock-entry-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.timeclock-report-locked .timeclock-report-table,
.timeclock-report-locked .timeclock-report-user {
  opacity: 0.7;
  filter: grayscale(0.4);
}

.timeclock-report-locked .timeclock-entry-actions .refresh-button {
  cursor: not-allowed;
}

.timeclock-entry-status {
  font-size: 0.8em;
  color: #58608a;
}

.timeclock-entry-status.is-error {
  color: #b00020;
}

.timeclock-employee-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timeclock-employee-name {
  font-weight: 700;
  color: #2d2f77;
}

.timeclock-employee-email {
  font-size: 0.85em;
  color: #58608a;
}

.timeclock-report-user {
  border: 1px solid rgba(45, 47, 119, 0.15);
  border-radius: 12px;
  padding: 14px;
  background: #ffffff;
  margin-bottom: 16px;
}

.timeclock-report-user-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.timeclock-report-user-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9em;
  color: #2d2f77;
}

.timeclock-admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.timeclock-admin-actions .timeclock-action {
  min-width: 140px;
}

.timeclock-role-rates {
  margin-top: 12px;
}

.timeclock-role-manager {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeclock-role-add {
  display: flex;
  gap: 10px;
  align-items: center;
}

.timeclock-role-add input {
  flex: 1;
}

.timeclock-role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeclock-role-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(45, 47, 119, 0.12);
  color: #2d2f77;
  font-weight: 600;
  border: 1px solid rgba(45, 47, 119, 0.25);
}

.timeclock-role-remove {
  border: none;
  background: rgba(0, 0, 0, 0.08);
  color: #2d2f77;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}

.timeclock-role-remove:hover {
  background: rgba(0, 0, 0, 0.15);
}

.timeclock-role-rate-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.timeclock-role-rate {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85em;
  color: #333;
}

.timeclock-role-rate input {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.timeclock-payperiod-manager {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.timeclock-payperiod-add {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.timeclock-payperiod-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeclock-payperiod-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(45, 47, 119, 0.15);
  background: #ffffff;
}

.timeclock-report-user-name {
  font-weight: 700;
  color: #2d2f77;
}

.timeclock-report-user-meta {
  font-size: 0.85em;
  color: #58608a;
}

.timeclock-report-user-hours {
  font-weight: 700;
  color: #1b5e20;
}

.timeclock-empty {
  color: #58608a;
  font-style: italic;
}

@media (max-width: 900px) {
  .timeclock-employee-row {
    grid-template-columns: 1fr;
  }
  .timeclock-report-header {
    align-items: flex-start;
  }
  .timeclock-payroll-meta {
    padding-top: 0;
  }
  .timeclock-payroll-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .timeclock-payroll-actions .refresh-button {
    width: 100%;
    justify-content: center;
  }
}

/* Mobile Timeclock Optimizations */
.timeclock-mobile .hub-header {
  display: none;
}

.timeclock-mobile .timeclock-card-header {
  display: none;
}

.timeclock-mobile .admin-grid {
  grid-template-columns: 1fr;
  gap: 20px;
}

.timeclock-mobile .timeclock-action-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.timeclock-mobile .timeclock-action {
  width: 100%;
  min-height: 80px;
  font-size: 1.3em;
  padding: 20px;
  border-radius: 16px;
  justify-content: center;
  border: 2px solid;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.timeclock-mobile #timeclock-clockin.is-active {
  background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%);
  border-color: #1b5e20;
  color: white;
  font-weight: 700;
}

.timeclock-mobile #timeclock-clockout.is-active {
  background: linear-gradient(135deg, #c62828 0%, #e53935 100%);
  border-color: #b71c1c;
  color: white;
  font-weight: 700;
}

.timeclock-mobile .timeclock-action.is-muted {
  background: #e0e0e0;
  color: #9e9e9e;
  border-color: #bdbdbd;
  box-shadow: none;
}

.timeclock-mobile #timeclock-refresh {
  display: none;
}

.timeclock-mobile .timeclock-action-indicator {
  width: 14px;
  height: 14px;
}

.timeclock-mobile #timeclock-last {
  display: none;
}

.timeclock-mobile label {
  font-size: 1.1em;
}

.timeclock-mobile select,
.timeclock-mobile input {
  font-size: 1.1em;
  min-height: 50px;
  padding: 12px 16px;
}

.timeclock-mobile .timeclock-status {
  font-size: 1.2em;
  min-height: 50px;
  justify-content: center;
}

.timeclock-mobile .timeclock-role-hint {
  font-size: 1em;
  margin-top: 8px;
  display: block;
}

.timeclock-mobile .admin-card {
  padding: 24px;
}

.timeclock-mobile #timeclock-logout {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  min-width: 200px;
  background: rgba(198, 40, 40, 0.95);
  border: 2px solid #b71c1c;
  color: white;
  font-weight: 700;
  padding: 14px 28px;
  font-size: 1.1em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.timeclock-mobile #timeclock-logout:hover {
  background: rgba(183, 28, 28, 0.95);
}

