:root {
  --admin-bg: #f6f4f0;
  --admin-surface: #ffffff;
  --admin-surface-soft: #fbfaf8;
  --admin-border: #e5ddd4;
  --admin-text: #2d2823;
  --admin-muted: #746b62;
  --admin-primary: #c55a00;
  --admin-primary-dark: #9e4300;
  --admin-success: #237a57;
  --admin-warning: #a85c00;
  --admin-danger: #bf4545;
  --admin-sidebar: #28231f;
  --admin-sidebar-soft: #37302a;
}

.brand-logo {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  padding: 2px;
  border-radius: 50%;
  background: #ffffff;
  object-fit: contain;
}

.auth-brand .brand-logo {
  width: 52px;
  height: 52px;
}

.product-detail-image {
  flex: 0 0 auto;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  background: var(--admin-surface-soft);
  object-fit: cover;
}

.admin-image-preview-trigger {
  cursor: zoom-in;
}

.admin-image-preview {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  place-items: center;
  padding: 3.5rem 1rem 1rem;
  overflow: hidden;
  border: 0;
  background: rgba(9, 14, 11, 0.96);
}

.admin-image-preview[hidden] {
  display: none !important;
}

body.admin-image-preview-open {
  overflow: hidden;
}

.admin-image-preview-status {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  color: #ffffff;
  font-size: 0.95rem;
}

.admin-image-preview-status:not([hidden])::before {
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: admin-image-preview-spin 0.75s linear infinite;
  content: '';
}

.admin-image-preview-status.is-error::before {
  display: none;
}

@keyframes admin-image-preview-spin {
  to { transform: rotate(360deg); }
}

.admin-image-preview-content {
  display: block;
  width: auto;
  height: auto;
  max-width: min(96vw, 1600px);
  max-height: calc(100vh - 5rem);
  object-fit: contain;
}

.admin-image-preview-content[hidden],
.admin-image-preview-status[hidden] {
  display: none !important;
}

.admin-image-preview-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 1.15rem;
}

.admin-image-preview-close:hover,
.admin-image-preview-close:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.auth-body {
  background-color: #eef0e9;
  background-image: linear-gradient(rgba(44, 58, 47, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(44, 58, 47, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
}

.auth-page-admin {
  padding: 2rem 1rem;
}

.auth-card-admin {
  width: min(100%, 480px);
  overflow: hidden;
  border-color: #e2e2d9;
  border-radius: 8px;
  box-shadow: 0 26px 70px rgba(35, 43, 36, 0.14);
}

.auth-form-panel {
  display: flex;
  flex-direction: column;
  padding: 2.5rem 3rem 2rem;
  background: #ffffff;
}

.auth-brand-block {
  display: flex;
  justify-content: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid #eceee9;
}

.auth-form-panel .auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  text-align: center;
  text-decoration: none;
}

.auth-logo-frame {
  display: grid;
  width: 100px;
  height: 100px;
  place-items: center;
  margin-bottom: 0.35rem;
  border: 1px solid #ead6bd;
  border-radius: 50%;
  background: #fffaf3;
  box-shadow: 0 8px 22px rgba(92, 59, 28, 0.1);
}

.auth-brand .auth-logo-frame .brand-logo {
  width: 84px;
  height: 84px;
  padding: 0;
}

.auth-brand-name {
  color: #292e29;
  font-size: 1.15rem;
  font-weight: 750;
}

.auth-brand-label {
  color: #797c72;
  font-size: 0.67rem;
  font-weight: 700;
}

.auth-brand-label,
.auth-form-heading .eyebrow {
  letter-spacing: 0.08em;
}

.auth-form .auth-form-heading {
  margin-bottom: 1.7rem;
}

.auth-form-heading h1 {
  margin-bottom: 0.45rem;
  color: #282f2a;
  font-size: 1.85rem;
  font-weight: 700;
}

.auth-form .form-label {
  color: #343b36;
  font-size: 0.88rem;
  font-weight: 650;
}

.auth-form .form-control {
  min-height: 48px;
  border-color: #d9ded8;
  border-radius: 5px;
  background-color: #fbfcfa;
}

.auth-form .form-control:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 0.2rem rgba(197, 90, 0, 0.14);
}

.auth-submit {
  min-height: 50px;
  border-radius: 5px;
  font-weight: 650;
}

.auth-security-note {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  margin: 1.25rem 0 0;
  color: #6a746d;
  font-size: 0.8rem;
}

.auth-form-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #eceee9;
  color: #778078;
  font-size: 0.78rem;
}

.auth-form-footer i {
  color: var(--admin-success);
}

html[data-theme="dark"] .auth-form-panel {
  background: var(--admin-surface);
}

html[data-theme="dark"] .auth-form-heading h1,
html[data-theme="dark"] .auth-form .form-label {
  color: var(--admin-text);
}

html[data-theme="dark"] .auth-form .form-control {
  border-color: var(--admin-border);
  background: var(--admin-surface-soft);
  color: var(--admin-text);
}

@media (max-width: 767.98px) {
  .auth-page-admin {
    padding: 4.25rem 1rem 1rem;
  }

  .auth-form-panel {
    padding: 2rem 1.5rem 1.5rem;
  }

  .auth-form-footer {
    margin-top: 1.6rem;
  }
}

.people-avatar {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  object-fit: cover;
  background: #eee8e1;
  color: #746b62;
}

.people-avatar-large {
  width: 72px;
  height: 72px;
}

.people-avatar-empty {
  font-size: 18px;
}

.installation-history-section {
  display: grid;
  gap: 1rem;
}

.installation-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.installation-history-heading h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.installation-history-list {
  display: grid;
  gap: 0.85rem;
}

.installation-record {
  min-width: 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  background: var(--admin-surface);
}

.installation-record-header,
.installation-record-heading,
.installation-record-state {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.installation-record-header {
  justify-content: space-between;
}

.installation-record-heading {
  min-width: 0;
  flex-wrap: wrap;
}

.installation-record-heading h3 {
  overflow-wrap: anywhere;
}

.installation-report-number,
.installation-detail-label {
  color: var(--admin-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.installation-pole,
.installation-quantity {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: var(--admin-surface-soft);
  color: var(--admin-text);
  font-size: 0.82rem;
}

.installation-record-date {
  margin: 0.55rem 0 0.9rem;
  color: var(--admin-muted);
  font-size: 0.82rem;
}

.installation-record-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--admin-border);
}

.installation-detail {
  display: grid;
  align-content: start;
  gap: 0.3rem;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.88rem;
}

.installation-detail-notes {
  grid-column: span 2;
}

.installation-detail-photo {
  grid-column: span 2;
}

.installation-proof-link {
  display: block;
  width: 112px;
  height: 80px;
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: 4px;
  background: var(--admin-surface-soft);
}

.installation-proof {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.installation-history-empty {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  border: 1px dashed var(--admin-border);
  border-radius: 6px;
  color: var(--admin-muted);
}

.installation-history-empty i {
  font-size: 1.25rem;
}

@media (max-width: 991.98px) {
  .installation-record-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .installation-record {
    padding: 0.9rem;
  }

  .installation-record-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .installation-record-details {
    grid-template-columns: minmax(0, 1fr);
  }

  .installation-detail-notes,
  .installation-detail-photo {
    grid-column: auto;
  }
}