/* The Loom Coworking Space – Apple-like UI (Montserrat, Orange & White) */

:root {
  --loom-primary: #E85D04;
  --loom-primary-hover: #D54D02;
  --loom-primary-light: #FEF3EB;
  --loom-bg: #FFFFFF;
  --loom-bg-subtle: #FAFAFA;
  --loom-text: #1a1a1a;
  --loom-text-secondary: #333333;
  --loom-muted: #6b7280;
  --loom-border: #e5e7eb;
  --loom-border-light: #f3f4f6;
  --loom-error: #b91c1c;
  --loom-success: #15803d;
  --loom-radius: 10px;
  --loom-radius-sm: 8px;
  --loom-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --loom-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  color: var(--loom-text);
  background: var(--loom-bg);
  margin: 0;
  padding: 0;
  width: 100%;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* App shell: constrained width on desktop, full width on small screens */
body.app-shell-page .app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 90vw;
  margin: 0 auto;
  box-shadow: 0 0 0 1px var(--loom-border-light);
}

@media (min-width: 73rem) {
  body.app-shell-page {
    background: var(--loom-bg-subtle);
  }
}

.app-main {
  flex: 1;
  width: 100%;
  padding: 1rem 1.5rem 2rem;
}

/* App header: left = logo + name, right = attendant + shift + logout */
.app-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: var(--loom-bg);
  border-bottom: 1px solid var(--loom-border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-header-left a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--loom-text);
}

.app-header-left a:hover {
  color: var(--loom-primary);
}

.app-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  text-align: right;
}

.app-header-right .header-attendant {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--loom-text);
}

.app-header-right .header-shift {
  font-size: 0.85rem;
  color: var(--loom-muted);
}

.app-header-right .header-logout {
  margin-top: 0.25rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.site-logo {
  height: 60px;
  width: auto;
  display: block;
}

.site-name {
  font-weight: 600;
  font-size: 1.125rem;
}

/* Legacy site-header (login, about) when not using app-header */
.site-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 0;
  border-bottom: 1px solid var(--loom-border-light);
}

.site-header a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--loom-text);
}

.site-header a:hover {
  color: var(--loom-primary);
}

body.login-page {
  max-width: none;
  width: 100%;
}

body.login-page .login-card {
  max-width: 28rem;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

body.about-page {
  max-width: none;
  width: 100%;
}

body.about-page main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Breadcrumb / nav (inside app-main) */
nav.breadcrumb {
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

nav.breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.35rem 0;
  color: var(--loom-primary);
  text-decoration: none;
  font-weight: 500;
}

nav.breadcrumb a:hover {
  text-decoration: underline;
}

/* Typography */
h1 {
  font-weight: 600;
  font-size: 1.75rem;
  margin: 0 0 1rem;
  color: var(--loom-text);
}

h2 {
  font-weight: 600;
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--loom-text-secondary);
}

/* Links */
a {
  color: var(--loom-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Forms */
label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--loom-text-secondary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
input[type="date"],
input[type="month"],
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.75rem;
  margin-bottom: 1rem;
  font-family: inherit;
  font-size: 16px;
  color: var(--loom-text);
  background: var(--loom-bg);
  border: 1px solid var(--loom-border);
  border-radius: var(--loom-radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea {
  min-height: 88px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--loom-primary);
  box-shadow: 0 0 0 3px var(--loom-primary-light);
}

/* Buttons – touch targets min 44px */
button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.85rem 1.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--loom-border);
  background: var(--loom-bg-subtle);
  color: var(--loom-text);
  border-radius: var(--loom-radius-sm);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

/* Large action cards (Clock in, Add entry, Log pass visit) */
.action-card {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  min-height: 72px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--loom-text);
  background: var(--loom-bg);
  border: 2px solid var(--loom-border);
  border-radius: var(--loom-radius);
  box-shadow: var(--loom-shadow);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}

.action-card:hover {
  background: var(--loom-primary);
  color: #fff;
  border-color: var(--loom-primary);
  box-shadow: var(--loom-shadow-md);
}

.action-card:hover .material-icons {
  color: #fff;
}

.action-card.primary {
  background: var(--loom-primary);
  color: #fff;
  border-color: var(--loom-primary);
}

.action-card.primary:hover {
  background: var(--loom-primary-hover);
  border-color: var(--loom-primary-hover);
  color: #fff;
}

.action-card .material-icons {
  font-size: 2rem;
  width: 2rem;
  height: 2rem;
}

.action-card-block {
  width: 100%;
  justify-content: flex-start;
}

button.action-card {
  border: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

/* Dashboard categories – 2-column layout */
.dashboard-category {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 1.5rem;
  margin-bottom: 2rem;
}

.dashboard-category:last-child {
  margin-bottom: 0;
}

.dashboard-category-title {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--loom-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--loom-border-light);
}

.dashboard-category .meta {
  grid-column: 1 / -1;
}

.staff-clock-in-form {
  margin-bottom: 1rem;
}

.staff-clock-out-form {
  margin-top: 0.5rem;
}

/* Staff bottom nav (optional) */
.app-promo-strip {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 1rem calc(0.5rem + env(safe-area-inset-bottom, 0));
  background: var(--loom-bg);
  border-top: 1px solid var(--loom-border-light);
  color: var(--loom-muted);
  text-align: center;
  z-index: 99;
}

.app-promo-strip-heading {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--loom-text);
}

.app-promo-strip-socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 0.85rem;
  font-size: 0.75rem;
}

.app-promo-strip-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--loom-muted);
  text-decoration: none;
}

.app-promo-strip-link .material-icons {
  font-size: 0.95rem;
  opacity: 0.85;
}

.app-promo-strip-link:hover {
  color: var(--loom-primary);
}

body.has-promo-strip .app-main {
  padding-bottom: 4rem;
}

body.has-bottom-nav .app-main {
  padding-bottom: 5rem;
}

button:hover,
.btn:hover {
  background: var(--loom-border-light);
  border-color: var(--loom-muted);
}

button.primary,
.btn.primary {
  background: var(--loom-primary);
  color: #fff;
  border-color: var(--loom-primary);
}

button.primary:hover,
.btn.primary:hover {
  background: var(--loom-primary-hover);
  border-color: var(--loom-primary-hover);
  color: #fff;
}

.btn.btn-secondary {
  background: var(--loom-bg-subtle);
  color: var(--loom-text);
  border-color: var(--loom-border);
}

.btn.btn-secondary:hover {
  background: var(--loom-border-light);
  border-color: var(--loom-muted);
}

.btn.btn-danger {
  background: #fef2f2;
  color: var(--loom-error);
  border-color: var(--loom-error);
}

.btn.btn-danger:hover {
  background: var(--loom-error);
  color: #fff;
}

/* Entry form: bright button colors so staff recognize actions */
.btn-time-now {
  background: #3b82f6;
  color: #fff;
  border-color: #2563eb;
}
.btn-time-now:hover {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #fff;
}
.btn-save-close {
  background: #16a34a;
  color: #fff;
  border-color: #15803d;
}
.btn-save-close:hover {
  background: #15803d;
  border-color: #166534;
  color: #fff;
}
.btn-cancel {
  background: #6b7280;
  color: #fff;
  border-color: #4b5563;
}
.btn-cancel:hover {
  background: #4b5563;
  border-color: #374151;
  color: #fff;
}
.btn-add-order {
  background: #0d9488;
  color: #fff;
  border-color: #0f766e;
}
.btn-add-order:hover {
  background: #0f766e;
  border-color: #115e59;
  color: #fff;
}
.btn-remove {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #b91c1c;
}
.btn-remove:hover:not(:disabled) {
  background: #b91c1c;
  color: #fff;
}

button:focus-visible,
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--loom-primary-light);
}

/* Entries summary statistics (admin) */
.entries-stats {
  margin: 1rem 0 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--loom-bg-subtle);
  border: 1px solid var(--loom-border-light);
  border-radius: var(--loom-radius);
  box-shadow: var(--loom-shadow);
}

.entries-stats .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.entries-stats .stats-grid li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.entries-stats .stats-grid li strong {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--loom-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.entries-stats .stats-grid li span {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--loom-text);
}

/* Shifts: hours by staff summary */
.shifts-staff-summary {
  margin: 1rem 0 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--loom-bg-subtle);
  border: 1px solid var(--loom-border-light);
  border-radius: var(--loom-radius);
  box-shadow: var(--loom-shadow);
}

.shifts-staff-summary-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--loom-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--loom-border-light);
}

.shifts-staff-summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.shifts-staff-summary-list li {
  padding: 0.35rem 0;
  font-size: 0.95rem;
  color: var(--loom-text);
}

.shifts-staff-summary-list li:not(:last-child) {
  border-bottom: 1px solid var(--loom-border-light);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: var(--loom-bg);
  border-radius: var(--loom-radius);
  overflow: hidden;
  box-shadow: var(--loom-shadow);
}

th,
td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--loom-border-light);
}

th {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--loom-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--loom-bg-subtle);
}

tr:hover td {
  background: var(--loom-bg-subtle);
}

tr:last-child td {
  border-bottom: none;
}

/* Entries table: active (no time out) = green, closed (has time out) = greyed */
.entry-row-active td {
  background: rgba(34, 197, 94, 0.38);
}
.entry-row-active:hover td {
  background: rgba(34, 197, 94, 0.48);
}
.entry-row-closed td {
  background: rgba(59, 130, 246, 0.06);
  color: var(--loom-muted);
}
.entry-row-closed:hover td {
  background: rgba(59, 130, 246, 0.12);
  color: inherit;
}

/* Total column: bold and orange for active (in-progress) entries only */
.entry-total-active {
  font-weight: 700;
  color: var(--loom-primary) !important;
}

/* Alerts */
.error {
  color: var(--loom-error);
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #fef2f2;
  border-radius: var(--loom-radius-sm);
  font-size: 0.95rem;
}

.success {
  color: var(--loom-success);
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #f0fdf4;
  border-radius: var(--loom-radius-sm);
  font-size: 0.95rem;
}

/* Meta / secondary */
.meta {
  color: var(--loom-muted);
  font-size: 0.9rem;
  margin-top: 1rem;
}

.meta a {
  color: var(--loom-primary);
}

/* Footer (log out) */
.site-footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--loom-border-light);
}

.site-footer .meta a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Modal (services edit) */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.modal[aria-hidden="false"],
.modal.modal-open {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 28rem;
  max-height: 90vh;
  overflow: auto;
  background: var(--loom-bg);
  border-radius: var(--loom-radius);
  box-shadow: var(--loom-shadow-md);
  border: 1px solid var(--loom-border);
}

.modal-dialog-wide {
  max-width: 36rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--loom-border-light);
}

.modal-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--loom-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--loom-radius-sm);
}

.modal-close:hover {
  color: var(--loom-text);
  background: var(--loom-bg-subtle);
}

.modal-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-current-editing {
  margin: 0 0 0.5rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  background: var(--loom-primary-light);
  border: 1px solid var(--loom-primary);
  border-radius: var(--loom-radius-sm);
  color: var(--loom-text);
}

.modal-current-editing strong {
  color: var(--loom-primary);
}

.modal-body label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
}

.modal-body input {
  width: 100%;
  box-sizing: border-box;
}

.modal-footer {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--loom-border-light);
}

/* Utility: filter bar (entries) */
/* Entries page: shift info left, Add entry button right */
.entries-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.entries-header p {
  margin: 0;
}

/* Utility: filter bar (entries) */
.filter-bar {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--loom-border);
  background: var(--loom-bg-subtle);
  border-radius: var(--loom-radius);
}

.filter-bar p {
  margin: 0 0 0.5rem;
}

.filter-bar form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.filter-bar form:last-of-type {
  margin-bottom: 0;
}

.filter-bar .meta {
  margin: 0.75rem 0 0;
}

/* Filter bar 2-column layout (shifts) */
.filter-bar-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
  align-items: start;
}

.filter-bar-two-cols .filter-bar-col {
  min-width: 0;
}

.filter-bar-two-cols .filter-bar-presets {
  justify-self: start;
}

.filter-bar-two-cols .filter-bar-range {
  justify-self: end;
}

.filter-bar-two-cols .filter-bar-presets p:first-child {
  margin-top: 0;
}

.filter-bar-two-cols .filter-bar-range form {
  margin-bottom: 0;
}

/* From / To / Apply as 3 columns */
.filter-bar-range-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem 1rem;
  align-items: end;
}

.filter-bar-range-form .filter-bar-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.filter-bar-range-form .filter-bar-apply {
  display: flex;
  align-items: flex-end;
}

.filter-bar-two-cols .filter-bar-meta {
  grid-column: 1 / -1;
  margin: 0.25rem 0 0;
}

/* Utility: service info, billing breakdown (entry-form) */
.service-info,
.billing-breakdown {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--loom-border);
  background: var(--loom-bg-subtle);
  border-radius: var(--loom-radius-sm);
}

.service-info-heading {
  margin: 0 0 0.5rem;
}

.service-info-how {
  margin: 0 0 0.75rem;
  font-size: 0.9em;
  color: var(--loom-text-muted, #555);
}

.service-rate-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.service-rate-table th,
.service-rate-table td {
  padding: 0.4rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--loom-border);
}

.service-rate-table th {
  font-weight: 600;
  background: rgba(0, 0, 0, 0.04);
}

.service-rate-table tbody tr:last-child td {
  border-bottom: none;
}

.service-rate-table td:nth-child(3) {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.billing-breakdown {
  margin: 1rem 0;
  padding: 1rem;
}

/* Time computation: line-by-line breakdown */
.billing-computation {
  margin: 0.5rem 0 1rem;
  padding: 0.75rem 1rem;
  background: var(--loom-bg);
  border: 1px solid var(--loom-border);
  border-radius: var(--loom-radius-sm);
  font-size: 0.9rem;
}

.billing-computation .billing-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.2rem 0;
  font-variant-numeric: tabular-nums;
}

.billing-computation .billing-line.billing-sub {
  margin-top: 0.35rem;
  padding-left: 0.5rem;
  border-left: 2px solid var(--loom-border);
  font-weight: 500;
  color: var(--loom-text-secondary);
}

.billing-computation .billing-line.billing-total {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--loom-border);
  font-weight: 600;
}

.billing-computation .billing-line .billing-amount {
  white-space: nowrap;
}

/* Entry form: colored sections so staff see what to fill */
.form-section {
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--loom-radius);
  border-left: 4px solid;
}
.form-section-heading {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  padding: 0;
  color: inherit;
}
.form-section label {
  display: block;
  margin-top: 0.75rem;
}
.form-section label:first-of-type {
  margin-top: 0;
}
.form-section .form-section-heading + label,
.form-section .form-section-heading + * {
  margin-top: 0;
}
.form-section input[type="text"],
.form-section input[type="number"],
.form-section input[type="datetime-local"],
.form-section select,
.form-section textarea {
  margin-top: 0.25rem;
}
.required-dot {
  color: var(--loom-primary);
  font-weight: 600;
}
.optional-tag {
  font-size: 0.8em;
  font-weight: 500;
  color: var(--loom-muted);
  text-transform: lowercase;
}
.form-section-customer {
  background: rgba(59, 130, 246, 0.22);
  border-left: 5px solid #2563eb;
}
.form-section-service {
  background: rgba(34, 197, 94, 0.22);
  border-left: 5px solid #16a34a;
}
.form-section-time {
  background: rgba(234, 179, 8, 0.28);
  border-left: 5px solid #eab308;
}
.form-section-payment {
  background: rgba(139, 92, 246, 0.22);
  border-left: 5px solid #7c3aed;
}
.form-section-orders {
  background: rgba(245, 158, 11, 0.25);
  border-left: 5px solid #f59e0b;
}
.form-section-actions {
  background: rgba(107, 114, 128, 0.12);
  border-left: 5px solid #6b7280;
}

.order-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.order-row input[type="text"],
.order-row input[type="number"] {
  margin-bottom: 0;
}

.order-row input[type="number"].order-qty {
  width: 5rem;
}

.order-row input[type="number"].order-price {
  width: 6rem;
}

/* Utility: edit panel / assign panel (pass-types, services, users, customers) */
.edit-panel,
.assign-panel {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--loom-border);
  background: var(--loom-bg-subtle);
  border-radius: var(--loom-radius-sm);
}

.hidden {
  display: none !important;
}

.form-inline {
  display: inline;
  margin-right: 0.5rem;
}

.time-out-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.time-out-row input[type="datetime-local"] {
  flex: 0 1 auto;
  min-width: 12rem;
}

/* Dashboard nav list */
.dashboard-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dashboard-nav li {
  margin: 0.5rem 0;
}

.dashboard-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.6rem 0;
  font-weight: 500;
}

/* Icon alignment (Material Icons / inline) */
.material-icons,
.icon {
  font-size: 1.1em;
  vertical-align: middle;
  width: 1.25em;
  height: 1.25em;
  display: inline-block;
  fill: currentColor;
}

.btn .material-icons,
.btn .icon {
  font-size: 1.2em;
}

/* Icon-only table action buttons (edit, delete, etc.) */
.btn-icon,
a.btn-icon {
  min-width: 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--loom-radius-sm);
}
.btn-icon .material-icons,
a.btn-icon .material-icons {
  font-size: 1.35rem;
  width: 1.35rem;
  height: 1.35rem;
}
.table-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.order-row-remove {
  white-space: nowrap;
}

/* ========== Guide / documentation page ========== */
.guide-doc {
  max-width: 52rem;
  margin: 0 auto;
}

.guide-doc .guide-lead {
  font-size: 1.1rem;
  color: var(--loom-text-secondary);
  margin: 0 0 2rem;
  line-height: 1.6;
}

.guide-doc .guide-toc {
  margin: 0 0 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--loom-bg-subtle);
  border: 1px solid var(--loom-border);
  border-radius: var(--loom-radius);
}

.guide-doc .guide-toc-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--loom-muted);
  margin: 0 0 0.75rem;
}

.guide-doc .guide-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.guide-doc .guide-toc-list li {
  margin: 0.35rem 0;
}

.guide-doc .guide-toc-list a {
  display: inline-block;
  padding: 0.25rem 0;
  color: var(--loom-text);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.guide-doc .guide-toc-list a:hover {
  color: var(--loom-primary);
  border-bottom-color: var(--loom-primary);
  text-decoration: none;
}

.guide-doc .guide-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--loom-border-light);
}

.guide-doc .guide-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.guide-doc .guide-section h2 {
  font-size: 1.4rem;
  margin: 0 0 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--loom-primary);
  color: var(--loom-text);
}

.guide-doc .guide-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.6rem;
  color: var(--loom-text-secondary);
}

.guide-doc .guide-section h3:first-of-type {
  margin-top: 1rem;
}

.guide-doc .guide-section p {
  margin: 0 0 0.85rem;
  line-height: 1.6;
}

.guide-doc .guide-section ul,
.guide-doc .guide-section ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
  line-height: 1.6;
}

.guide-doc .guide-section li {
  margin: 0.35rem 0;
}

.guide-doc .guide-steps {
  list-style: none;
  padding-left: 0;
  counter-reset: step;
}

.guide-doc .guide-steps li {
  position: relative;
  padding-left: 3.25rem;
  margin: 0.75rem 0;
  min-height: 2rem;
}

.guide-doc .guide-steps .guide-list-icon {
  margin-right: 0.35rem;
}

.guide-doc .guide-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.6rem;
  height: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: var(--loom-primary);
  border-radius: 50%;
}

.guide-doc .guide-callout {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  border-radius: var(--loom-radius-sm);
  border-left: 4px solid var(--loom-primary);
  background: var(--loom-primary-light);
  font-size: 0.95rem;
  line-height: 1.5;
}

.guide-doc .guide-callout-title {
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--loom-text);
}

.guide-doc .guide-callout p:last-child {
  margin-bottom: 0;
}

.guide-doc .guide-screen-ref {
  display: inline-block;
  margin: 0.25rem 0;
  padding: 0.35rem 0.6rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--loom-text-secondary);
  background: var(--loom-bg-subtle);
  border: 1px solid var(--loom-border);
  border-radius: 6px;
}

.guide-doc .guide-back {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--loom-border-light);
}

/* Guide icons – inline with text */
.guide-doc .guide-icon {
  font-size: 1.1em;
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.2em;
  margin-right: 0.35rem;
  color: var(--loom-primary);
}

.guide-doc h2 .guide-icon {
  font-size: 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
  vertical-align: -0.25rem;
  margin-right: 0.4rem;
}

.guide-doc h3 .guide-icon {
  font-size: 1.1rem;
  width: 1.1rem;
  height: 1.1rem;
  vertical-align: -0.15rem;
  margin-right: 0.35rem;
}

.guide-doc .guide-toc-list a .guide-icon {
  margin-right: 0.5rem;
}

.guide-doc .guide-callout .guide-icon {
  color: var(--loom-primary);
  margin-right: 0.35rem;
}

.guide-doc .guide-list-icon {
  margin-right: 0.4rem;
  vertical-align: -0.2em;
  color: var(--loom-primary);
}
