/* ==========================================================================
   Project Pulse Dashboard Styles
   Matches C&A Electric navy/yellow contractor palette
   ========================================================================== */

/* ---------- Dashboard Nav ---------- */
.dash-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  box-shadow: var(--shadow);
}

.dash-nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dash-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-nav-brand svg { border-radius: 6px; }

.dash-nav-company {
  display: block;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.dash-nav-app {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--yellow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 1px;
}

.dash-nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255,255,255,0.65);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.15);
  transition: color 0.2s, border-color 0.2s;
}

.dash-nav-back:hover { color: var(--white); border-color: rgba(255,255,255,0.4); }

.btn-new-project {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--yellow);
  color: var(--navy);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 9px 18px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 2px 10px rgba(245,166,35,0.3);
}

.btn-new-project:hover { background: var(--yellow-lt); transform: translateY(-1px); }

/* ---------- Dashboard Hero Stats ---------- */
.dash-hero {
  background: var(--navy);
  padding: 40px 20px 48px;
  position: relative;
}

.dash-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(245,166,35,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.dash-hero-inner {
  max-width: 1140px;
  margin: 0 auto;
  position: relative;
}

.dash-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245,166,35,0.15);
  border: 1px solid rgba(245,166,35,0.35);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--yellow-lt);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.dash-hero-grid {
  display: grid;
  grid-template-columns: 2fr repeat(5, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .dash-hero-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .dash-hero-grid { grid-template-columns: 1fr 1fr; }
}

.dash-total-card {
  background: var(--yellow);
  border-radius: 12px;
  padding: 24px 28px;
  color: var(--navy);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dash-total-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(13,33,55,0.7);
  margin-bottom: 8px;
}

.dash-total-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.dash-total-count {
  font-size: 0.78rem;
  color: rgba(13,33,55,0.65);
  font-weight: 600;
}

.dash-stage-card {
  background: var(--blue);
  border-radius: 12px;
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.dash-stage-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.dash-stage-icon { color: var(--yellow); }

.dash-stage-name {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.55);
}

.dash-stage-value {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.dash-stage-count {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
}

.dash-stage-quote_sent { background: var(--blue); }
.dash-stage-scheduled { background: var(--blue-mid, #1e5080); }
.dash-stage-in_progress { background: #2a4d6e; }
.dash-stage-complete { background: #1a4538; }
.dash-stage-permits { background: #2d1a6b; }

/* ---------- Dashboard Content ---------- */
.dash-content {
  padding: 40px 20px;
}

.dash-content-inner {
  max-width: 1140px;
  margin: 0 auto;
}

.dash-projects-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}

.dash-section-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--charcoal);
}

.dash-project-count {
  font-size: 0.85rem;
  color: var(--gray-400);
  font-weight: 600;
}

/* ---------- Project Cards ---------- */
.dash-project-card {
  display: grid;
  grid-template-columns: 10px 1fr auto auto auto;
  align-items: center;
  gap: 20px;
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 12px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.dash-project-card:hover {
  border-color: var(--yellow);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.dash-project-stage-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dash-stage-dot-quote_sent { background: #3b82f6; }
.dash-stage-dot-scheduled { background: #f97316; }
.dash-stage-dot-in_progress { background: #eab308; }
.dash-stage-dot-complete { background: #22c55e; }

.dash-project-info { min-width: 0; }

.dash-project-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-project-client {
  font-size: 0.8rem;
  color: var(--gray-400);
}

.dash-project-value {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  white-space: nowrap;
}

.dash-project-stage { }

.stage-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.stage-badge-quote_sent { background: rgba(59,130,246,0.1); color: #3b82f6; }
.stage-badge-scheduled { background: rgba(249,115,22,0.1); color: #f97316; }
.stage-badge-in_progress { background: rgba(234,179,8,0.1); color: #ca8a04; }
.stage-badge-complete { background: rgba(34,197,94,0.1); color: #16a34a; }

.dash-project-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-edit, .btn-delete {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1.5px solid var(--gray-100);
  background: var(--off-white);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn-edit { color: var(--blue); }
.btn-edit:hover { background: var(--blue); color: var(--white); border-color: var(--blue); }

.btn-delete { color: #dc2626; }
.btn-delete:hover { background: #dc2626; color: var(--white); border-color: #dc2626; }

/* ---------- Empty State ---------- */
.dash-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 60px 20px;
  color: var(--gray-400);
  text-align: center;
}

.dash-empty svg { opacity: 0.4; }
.dash-empty p { font-size: 0.92rem; }

/* ---------- Modal ---------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal.open { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13,33,55,0.7);
  backdrop-filter: blur(4px);
}

.modal-box {
  position: relative;
  background: var(--white);
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 480px;
  margin: 20px;
  box-shadow: var(--shadow-lg);
}

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

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--charcoal);
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: var(--off-white);
  color: var(--gray-400);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.modal-close:hover { background: var(--gray-100); color: var(--charcoal); }

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

.btn-cancel {
  padding: 10px 20px;
  background: var(--off-white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gray-700);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-cancel:hover { background: var(--gray-100); }

.btn-save {
  padding: 10px 24px;
  background: var(--yellow);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--navy);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 10px rgba(245,166,35,0.3);
}

.btn-save:hover { background: var(--yellow-lt); transform: translateY(-1px); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transform: translateY(80px);
  opacity: 0;
  transition: transform 0.25s, opacity 0.25s;
  z-index: 300;
}

.toast.show { transform: translateY(0); opacity: 1; }

.toast-success { background: #1a4538; color: #86efac; }
.toast-error { background: #450a0a; color: #fca5a5; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .dash-project-card {
    grid-template-columns: 10px 1fr;
    grid-template-rows: auto auto;
  }

  .dash-project-info { grid-column: 2; }
  .dash-project-value,
  .dash-project-stage,
  .dash-project-actions {
    grid-column: 2;
  }

  .dash-project-value { font-size: 0.9rem; }
  .dash-project-actions { flex-direction: row; }
  .modal-box { padding: 24px 20px; }
}

/* ---------- Estimate Button ---------- */
.btn-estimate {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(13,33,55,0.08);
  color: var(--navy);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: var(--radius);
  border: 1.5px solid rgba(13,33,55,0.15);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.btn-estimate:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
  transform: translateY(-1px);
}

/* ---------- Estimate Panel ---------- */
.estimate-panel {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 560px;
  max-width: 100vw;
  background: var(--white);
  box-shadow: -4px 0 32px rgba(13,33,55,0.15);
  z-index: 250;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.estimate-panel.open {
  display: flex;
  transform: translateX(0);
}

.estimate-panel-inner {
  padding: 28px 24px 40px;
  width: 100%;
}

.estimate-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--gray-100);
}

.estimate-panel-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 4px;
}

.estimate-panel-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--charcoal);
  margin: 0;
}

.estimate-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-estimate-save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--yellow);
  color: var(--navy);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 2px 8px rgba(245,166,35,0.25);
}

.btn-estimate-save:hover { background: var(--yellow-lt); transform: translateY(-1px); }

.estimate-panel-close {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid var(--gray-100);
  background: var(--off-white);
  color: var(--gray-400);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.estimate-panel-close:hover { background: var(--gray-100); color: var(--charcoal); }

/* ---------- Assembly Picker ---------- */
.estimate-assembly-picker { margin-bottom: 20px; }

.estimate-assembly-picker-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-400);
  margin-bottom: 12px;
}

.assembly-loading { color: var(--gray-400); font-size: 0.85rem; padding: 12px 0; }

.assembly-category { margin-bottom: 16px; }

.assembly-cat-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--gray-100);
}

.assembly-cat-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.assembly-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  background: var(--off-white);
  border: 1.5px solid var(--gray-100);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.assembly-item:hover {
  border-color: var(--yellow);
  background: rgba(245,166,35,0.05);
  transform: translateY(-1px);
}

.assembly-name {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1.2;
}

.assembly-meta {
  font-size: 0.68rem;
  color: var(--gray-400);
  font-weight: 600;
}

/* ---------- Custom Line Form ---------- */
.estimate-custom-row {
  background: var(--off-white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 20px;
}

.estimate-custom-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-400);
  margin-bottom: 10px;
}

.estimate-custom-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.est-input {
  padding: 8px 12px;
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.85rem;
  background: var(--white);
  color: var(--charcoal);
  transition: border-color 0.2s;
}

.est-input:focus { outline: none; border-color: var(--yellow); }

.est-input-qty { width: 60px; }
.est-input-sm { width: 80px; }

.btn-add-custom {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  flex-shrink: 0;
}

.btn-add-custom:hover { background: #1a4a6b; transform: translateY(-1px); }

/* ---------- Line Items Table ---------- */
.estimate-lines-section {
  margin-bottom: 20px;
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
}

.estimate-lines-header {
  display: grid;
  grid-template-columns: 1fr 60px 70px 80px 65px 85px 28px;
  gap: 8px;
  padding: 8px 12px;
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.estimate-empty {
  padding: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray-400);
}

.estimate-line-row {
  display: grid;
  grid-template-columns: 1fr 60px 70px 80px 65px 85px 28px;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-100);
  background: var(--white);
  transition: background 0.15s;
}

.estimate-line-row:last-child { border-bottom: none; }
.estimate-line-row:hover { background: var(--off-white); }

.est-line-desc {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.est-line-name {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--charcoal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.est-line-source {
  font-size: 0.68rem;
  color: var(--gray-400);
  font-style: italic;
}

.est-edit {
  width: 100%;
  padding: 5px 7px;
  border: 1px solid var(--gray-100);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--charcoal);
  background: var(--off-white);
  text-align: right;
}

.est-edit:focus { outline: none; border-color: var(--blue); background: var(--white); }

.est-line-total {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--navy);
  text-align: right;
  white-space: nowrap;
}

.btn-line-delete {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--gray-400);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-line-delete:hover { background: #fee2e2; color: #dc2626; }

/* ---------- Estimate Summary ---------- */
.estimate-summary {
  background: var(--navy);
  border-radius: 10px;
  padding: 20px;
  color: var(--white);
}

.estimate-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  padding: 4px 0;
}

.estimate-summary-row span:nth-child(2) {
  font-family: var(--font-heading);
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  margin-right: 8px;
}

.estimate-summary-row span:last-child {
  font-family: var(--font-heading);
  font-weight: 700;
  color: rgba(255,255,255,0.9);
}

.estimate-summary-divider {
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin: 12px 0;
}

.estimate-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 800;
}

.estimate-summary-total span:first-child { color: var(--white); }
.estimate-summary-total span:last-child {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--yellow);
}

/* ---------- Permits Button ---------- */
.btn-permits {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: var(--radius);
  border: 1.5px solid rgba(139, 92, 246, 0.25);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.btn-permits:hover {
  background: #7c3aed;
  color: #fff;
  border-color: #7c3aed;
  transform: translateY(-1px);
}

/* ---------- Permits Modal ---------- */
#permit-modal .modal-box {
  max-width: 680px;
}

.permit-list {
  margin-bottom: 24px;
  max-height: 340px;
  overflow-y: auto;
}

.permit-loading,
.permit-empty {
  padding: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray-400);
}

.permit-table {
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
}

.permit-table-header {
  display: grid;
  grid-template-columns: 90px 70px 1fr 90px 80px 56px;
  gap: 8px;
  padding: 8px 12px;
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.permit-row {
  display: grid;
  grid-template-columns: 90px 70px 1fr 90px 80px 56px;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.15s;
}

.permit-row:last-child { border-bottom: none; }
.permit-row:hover { background: var(--off-white); }

.permit-type-cell {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--charcoal);
  text-transform: capitalize;
}

.permit-jurisdiction-cell {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
  background: rgba(13,33,55,0.06);
  padding: 2px 8px;
  border-radius: 4px;
  text-align: center;
  font-size: 0.72rem;
}

.permit-status-cell select {
  width: 100%;
  padding: 5px 8px;
  border: 1.5px solid var(--gray-100);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--charcoal);
  background: var(--white);
  cursor: pointer;
}

.permit-status-cell select:focus { outline: none; border-color: var(--blue); }

.permit-number-cell {
  font-size: 0.78rem;
  color: var(--gray-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.permit-inspection-cell {
  font-size: 0.78rem;
  color: var(--gray-400);
}

.permit-actions-cell {
  display: flex;
  gap: 4px;
  align-items: center;
}

.btn-permit-edit,
.btn-permit-delete {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: 1.5px solid var(--gray-100);
  background: var(--off-white);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn-permit-edit { color: var(--blue); }
.btn-permit-edit:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

.btn-permit-delete { color: #dc2626; }
.btn-permit-delete:hover { background: #dc2626; color: #fff; border-color: #dc2626; }

/* ---------- Add Permit Form ---------- */
.permit-add-section {
  border-top: 2px solid var(--gray-100);
  padding-top: 20px;
}

.permit-add-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-400);
  margin-bottom: 12px;
}

.permit-form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.permit-form-row .form-group {
  flex: 1;
  min-width: 100px;
}

.permit-form-row .form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 4px;
}

.permit-form-row .form-group select,
.permit-form-row .form-group input {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--charcoal);
  background: var(--white);
}

.permit-form-row .form-group select:focus,
.permit-form-row .form-group input:focus {
  outline: none;
  border-color: var(--yellow);
}