/* Login page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background:
    radial-gradient(1200px 600px at 10% 10%, rgba(99, 102, 241, 0.25), transparent 50%),
    radial-gradient(800px 400px at 90% 80%, rgba(192, 38, 211, 0.20), transparent 50%),
    radial-gradient(600px 600px at 50% 50%, rgba(6, 182, 212, 0.15), transparent 70%),
    var(--color-bg);
}
.login-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-xl), 0 0 0 1px var(--color-border);
  border: 1px solid var(--color-border);
}
.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--space-6);
  gap: var(--space-3);
}
.login-logo .brand-mark {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  font-size: 32px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent), var(--color-review));
  box-shadow: 0 8px 20px -2px rgba(79, 70, 229, 0.4);
}
.login-logo h1 {
  font-size: 1.5rem;
  margin: 0;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-logo .muted { color: var(--color-text-muted); font-size: 0.85rem; }
.login-error {
  background: var(--color-danger-light);
  color: var(--color-danger);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  font-size: 0.9rem;
  border-left: 3px solid var(--color-danger);
}

/* Task detail */
.task-header {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
  background-image: linear-gradient(135deg, var(--color-surface), color-mix(in srgb, var(--color-surface) 90%, var(--color-primary-light) 10%));
}
.task-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}
.task-title { margin: 0; font-size: 1.4rem; line-height: 1.3; }
.task-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}
.task-meta-cell { font-size: 0.85rem; }
.task-meta-cell .label { color: var(--color-text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.task-meta-cell .value { color: var(--color-text); font-weight: 500; }
.task-description {
  background: var(--color-surface-2);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  margin-top: var(--space-3);
  white-space: pre-wrap;
  color: var(--color-text-soft);
  line-height: 1.6;
  border-left: 3px solid var(--color-primary);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: var(--space-6);
}
.timeline::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
  opacity: 0.3;
}
.timeline-item {
  position: relative;
  padding-bottom: var(--space-5);
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid var(--color-surface);
  box-shadow: 0 0 0 1px var(--color-border);
}
.timeline-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
  font-size: 0.85rem;
}
.timeline-head .author { font-weight: 600; color: var(--color-text); }
.timeline-head .time { color: var(--color-text-muted); }
.timeline-head .role-tag {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--color-primary);
  color: white;
  font-weight: 700;
}
.timeline-content {
  background: var(--color-surface-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  white-space: pre-wrap;
  line-height: 1.5;
}

/* Chat (comments) */
.chat { display: flex; flex-direction: column; gap: var(--space-4); }
.chat-bubble {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}
.chat-bubble.is-admin {
  flex-direction: row-reverse;
}
.chat-bubble .bubble {
  background: var(--color-surface-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  max-width: 70%;
  word-wrap: break-word;
}
.chat-bubble.is-admin .bubble {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: white;
  box-shadow: 0 4px 12px -2px rgba(79, 70, 229, 0.3);
}
.chat-meta {
  font-size: 0.75rem;
  margin-top: var(--space-1);
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.chat-bubble.is-admin .chat-meta { color: rgba(255, 255, 255, 0.85); }

/* Task list (rows) */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.task-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.task-row {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  transition: all var(--transition);
  position: relative;
}
.task-row:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.task-row.is-mine {
  border-left: 4px solid var(--color-primary);
  background: linear-gradient(90deg, var(--color-primary-light) 0%, var(--color-surface) 8%);
}
.task-row[data-status="urgent"], .task-row.prio--urgent-cell {
  background: linear-gradient(90deg, var(--color-danger-light) 0%, var(--color-surface) 10%);
}
.task-row-main { flex: 1; min-width: 0; }
.task-row-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  flex-wrap: wrap;
}
.task-id {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: var(--color-surface-2);
  padding: 1px 6px;
  border-radius: 4px;
}
.task-row-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}
.task-row-title a {
  color: var(--color-text);
}
.task-row-title a:hover {
  color: var(--color-primary);
}
.task-row-desc {
  color: var(--color-text-soft);
  font-size: 0.88rem;
  margin: 0 0 var(--space-2);
  line-height: 1.5;
}
.task-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: 0.78rem;
  color: var(--color-text-muted);
}
.task-row-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex-shrink: 0;
  align-items: stretch;
}

.result-meta {
  font-size: 0.85rem;
  color: var(--color-text-soft);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 700px) {
  .task-row { flex-direction: column; align-items: stretch; }
  .task-row-actions { flex-direction: row; }
}

/* Report card */
.report-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.report-card:hover { box-shadow: var(--shadow-md); }
.report-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
  gap: var(--space-2);
}
.report-head .meta { font-size: 0.85rem; color: var(--color-text-muted); }
.report-summary {
  background: var(--color-surface-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  white-space: pre-wrap;
  border-left: 3px solid var(--color-primary);
}
.report-images { margin-top: var(--space-3); }

/* Review actions */
.review-actions-card {
  background: linear-gradient(135deg, var(--color-surface), var(--color-accent-light));
  border: 2px dashed var(--color-border);
}
.review-form {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  border: 2px solid transparent;
  transition: all var(--transition);
}
.review-form--approve {
  border-color: var(--color-success);
  background: linear-gradient(135deg, var(--color-surface), var(--color-success-light));
}
.review-form--reject {
  border-color: var(--color-danger);
  background: linear-gradient(135deg, var(--color-surface), var(--color-danger-light));
}

/* Filter bar */
.filter-bar {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: var(--space-5);
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: opacity var(--transition);
}
.filter-bar .form-group { margin: 0; flex: 1; min-width: 150px; }
.filter-bar .form-control { padding: 8px 12px; }
.filter-bar.is-filtering {
  opacity: 0.6;
  pointer-events: none;
}
.filter-bar.is-filtering::after {
  content: 'Đang lọc...';
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
  box-shadow: var(--shadow-md);
}
.filter-bar.is-filtering::before {
  content: '';
  width: 12px;
  height: 12px;
  border: 2px solid var(--color-primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin-loader 0.7s linear infinite;
}
@keyframes spin-loader { to { transform: rotate(360deg); } }

/* Charts (CSS only) */
.chart-wrap { padding: var(--space-4) 0; }
.chart-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-3);
  align-items: end;
  height: 180px;
  padding-top: var(--space-3);
}
.chart-bar {
  background: linear-gradient(180deg, var(--color-accent), var(--color-primary), var(--color-review));
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  position: relative;
  min-height: 6px;
  transition: all var(--transition-slow);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: var(--space-2);
  box-shadow: 0 -2px 8px rgba(79, 70, 229, 0.2);
}
.chart-bar:hover { filter: brightness(1.15); transform: scaleY(1.02); transform-origin: bottom; }
.chart-bar .count {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-surface);
  padding: 0 4px;
  border-radius: 4px;
}
.chart-labels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-3);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-2);
}
.chart-label-cell {
  text-align: center;
}
.chart-label-cell > div:first-child {
  font-weight: 600;
  color: var(--color-text);
}

/* Notifications */
.notif-item {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  transition: background var(--transition);
  text-decoration: none;
  color: inherit;
}
.notif-item:hover { background: var(--color-surface-2); color: inherit; }
.notif-item.is-unread { background: var(--color-primary-light); }
.notif-item.is-unread:hover { background: color-mix(in srgb, var(--color-primary-light) 80%, var(--color-surface) 20%); }
.notif-item .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  margin-top: 8px;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}
.notif-item.is-read .dot { background: transparent; box-shadow: none; border: 2px solid var(--color-border-strong); }
.notif-item .body { flex: 1; }
.notif-item .message { margin: 0; }
.notif-item .time { font-size: 0.8rem; color: var(--color-text-muted); }

/* Toolbar above lists */
.toolbar {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.toolbar .spacer { flex: 1; }

/* Error page */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-7) var(--space-4);
  background:
    radial-gradient(800px 400px at 50% 0%, rgba(239, 68, 68, 0.10), transparent 60%),
    var(--color-bg);
}
.error-page .card { text-align: center; max-width: 480px; }
.error-page h1 { font-size: 4rem; margin: 0; background: linear-gradient(135deg, var(--color-danger), var(--color-review)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ============================================================
   CONTRACTS � Pipeline 6 b�?c + Card list
   ============================================================ */

/* Card grid cho danh s�ch h?p �?ng */
.contract-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-4);
}
.contract-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.contract-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent), var(--color-info));
}
.contract-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.contract-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
}
.contract-card-code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
}
.contract-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 4px 0;
}
.contract-card-customer {
  font-size: 0.85rem;
  color: var(--color-text-soft);
}
.contract-card-progress {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--color-surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 999px;
  transition: width var(--transition);
}
.progress-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}
.contract-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.85rem;
  border-top: 1px dashed var(--color-border);
  padding-top: 8px;
  margin-top: 8px;
}
.contract-card-value {
  font-weight: 700;
  color: var(--color-success);
}
.contract-card-date {
  color: var(--color-text-muted);
}

/* Pipeline */
.pipeline-card { margin-bottom: var(--space-5); }
.pipeline-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--color-surface-2);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.pipeline-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-success), #34d399);
  border-radius: 999px;
  transition: width 0.6s ease;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.pipeline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  gap: 6px;
  padding: var(--space-3) 0 var(--space-2);
  flex-wrap: wrap;
}
.pipeline-step {
  flex: 1;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 0 4px;
  transition: all var(--transition);
}
.pipeline-step-line {
  position: absolute;
  top: 22px;
  left: -50%;
  right: 50%;
  height: 3px;
  background: var(--color-surface-2);
  z-index: 0;
}
.pipeline-step-line--hide-left { left: 50%; }
.pipeline-step-line--hide-right { right: 50%; }
.pipeline-step--completed .pipeline-step-line,
.pipeline-step--in_progress .pipeline-step-line {
  background: linear-gradient(90deg, var(--color-success), #34d399);
}
.pipeline-step-circle {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  z-index: 1;
  border: 3px solid var(--color-surface-2);
  transition: all var(--transition);
}
.pipeline-step--pending .pipeline-step-circle {
  background: var(--color-surface);
  border-color: var(--color-border-strong);
  color: var(--color-text-muted);
}
.pipeline-step--in_progress .pipeline-step-circle {
  background: linear-gradient(135deg, var(--color-warning), #fbbf24);
  color: white;
  border-color: var(--color-warning);
  box-shadow: 0 0 0 4px var(--color-warning-light);
}
.pipeline-step--completed .pipeline-step-circle {
  background: linear-gradient(135deg, var(--color-success), #34d399);
  color: white;
  border-color: var(--color-success);
  box-shadow: 0 0 0 4px var(--color-success-light);
}
.pipeline-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.pipeline-step-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--color-warning);
  animation: pipelinePulse 1.6s ease-out infinite;
  pointer-events: none;
}
@keyframes pipelinePulse {
  0%   { transform: scale(0.85); opacity: 0.7; }
  100% { transform: scale(1.6);  opacity: 0;   }
}

.pipeline-step.is-locked .pipeline-step-circle {
  opacity: 0.6;
  filter: grayscale(0.5);
}

.pipeline-step-label {
  margin-top: var(--space-2);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}
.pipeline-step-idx {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.pipeline-step-meta {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--color-text-soft);
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  min-height: 30px;
}
.pipeline-meta-line {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
}
.pipeline-meta-icon { font-size: 0.85rem; }
.pipeline-meta-pending { color: var(--color-text-muted); font-style: italic; }
.pipeline-meta-locked  { color: var(--color-text-muted); font-style: italic; }

.pipeline-step-note {
  margin-top: 6px;
  background: var(--color-info-light);
  color: var(--color-info);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-left: 2px solid var(--color-info);
}

.pipeline-step-actions {
  margin-top: 10px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

@media (max-width: 760px) {
  .pipeline { flex-wrap: wrap; }
  .pipeline-step { min-width: 100px; }
  .pipeline-step-line { display: none; }
}

/* ============================================================
   RENTALS — Quản lý cho thuê máy
   ============================================================ */

.rental-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-4);
}
.rental-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.rental-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-info), var(--color-primary), var(--color-accent));
}
.rental-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-info);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.rental-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
}
.rental-card-code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
}
.rental-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}
.rental-card-customer {
  font-size: 0.85rem;
  color: var(--color-text-soft);
}
.rental-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--color-surface-2);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px dashed var(--color-border);
}
.rental-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  gap: 8px;
}
.rental-meta-label { color: var(--color-text-soft); }
.rental-meta-value { font-weight: 600; color: var(--color-text); text-align: right; }
.rental-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.85rem;
  border-top: 1px dashed var(--color-border);
  padding-top: 8px;
  margin-top: auto;
}
.rental-card-price { font-weight: 700; color: var(--color-success); }
.rental-card-date  { color: var(--color-text-muted); }

/* Summary cards trên trang detail */
.rental-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}
.rental-summary-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.rental-summary-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.rental-summary-card.is-warning { border-color: var(--color-warning); background: linear-gradient(135deg, var(--color-surface), var(--color-warning-light)); }
.rental-summary-card.is-primary {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-surface));
  border-color: var(--color-primary);
}
.rental-summary-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: white;
  flex-shrink: 0;
}
.rental-summary-info { flex: 1; min-width: 0; }
.rental-summary-label { font-size: 0.75rem; color: var(--color-text-soft); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.rental-summary-value { font-size: 1.25rem; font-weight: 800; color: var(--color-text); margin-top: 2px; }

/* Form nhập counter */
.rental-reading-form {
  background: var(--color-surface-2);
  padding: var(--space-4);
  border-radius: 8px;
  border: 1px dashed var(--color-border);
}

/* Bảng data-table (cho readings) */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th, .data-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.data-table th {
  background: var(--color-surface-2);
  font-weight: 600;
  color: var(--color-text-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: sticky; top: 0;
}
.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: var(--color-surface-2); }
.data-table tfoot td {
  border-top: 2px solid var(--color-border-strong);
  border-bottom: none;
}
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-mono, ui-monospace, monospace); }

/* Cost breakdown */
.rental-cost-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rental-cost-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 14px;
  background: var(--color-surface-2);
  border-radius: 8px;
  font-size: 0.95rem;
}
.rental-cost-row strong { font-family: var(--font-mono, ui-monospace, monospace); }
.rental-cost-total {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-surface));
  border: 1px solid var(--color-primary);
  font-size: 1.05rem;
}
.rental-cost-total strong { color: var(--color-primary); font-size: 1.15rem; }

/* Toggle switch (cho "Có hợp đồng") */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.toggle input { display: none; }
.toggle-slider {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  transition: all 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-slider {
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}
.toggle-label { font-weight: 600; min-width: 56px; }

/* btn-xs (tiny button) */
.btn-xs {
  padding: 2px 8px;
  font-size: 0.78rem;
  border-radius: 4px;
}
