/* ============================================================
   style.css – Homebush Meats
   Obfuscation prefixes: divv_, sppn_, elle_, clss_
   ============================================================ */

/* ----- Reset & base ----- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
  background: #f5efe8;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* ----- Main container (login card) ----- */
.divv_container {
  width: 100%;
  max-width: 420px;
  background: #fcf7f0;
  border-radius: 32px 32px 28px 28px;
  padding: 2.5rem 2rem 2.2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px #6b4c3b inset;
  transition: transform 0.2s ease;
  margin: 2rem auto;
}

/* subtle hover lift */
.divv_container:hover {
  transform: translateY(-3px);
}

/* ----- Logo area ----- */
.divv_logo {
  text-align: center;
  margin-bottom: 2rem;
}

.divv_logo img {
  max-width: 80px;
  height: auto;
  display: inline-block;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
  border-radius: 12px;
}

/* if no image, use text fallback */
.divv_logo::after {
  content: "🥩 Homebush Meats";
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #3d2a1c;
  margin-top: 0.5rem;
  text-shadow: 0 1px 0 #e4d5c4;
}

/* ----- Form ----- */
.clss_login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* field wrappers */
.divv_field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.divv_field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #3d2a1c;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-left: 0.2rem;
}

.divv_field input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  background: #fefcf9;
  border: 2px solid #dac9b8;
  border-radius: 16px;
  transition: border-color 0.25s, box-shadow 0.25s;
  outline: none;
  color: #2b1e16;
}

.divv_field input:focus {
  border-color: #b87c5a;
  box-shadow: 0 0 0 4px rgba(184, 124, 90, 0.25);
}

.divv_field input::placeholder {
  color: #b7a392;
  opacity: 0.7;
}

/* ----- Button ----- */
.clss_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.8rem;
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: 60px;
  background: #7a4f34;
  color: #fcf7f0;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: 0 4px 0 #4d3222;
  margin-top: 0.5rem;
}

.clss_btn:hover {
  background: #8f5e40;
  box-shadow: 0 6px 0 #4d3222;
  transform: translateY(-2px);
}

.clss_btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #4d3222;
}

.clss_btn-primary {
  background: #a8653e;
  box-shadow: 0 4px 0 #6b3f28;
}

.clss_btn-primary:hover {
  background: #ba7850;
}

.clss_btn-sm {
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  margin-top: 0;
}

.clss_btn-secondary {
  background: #6b5a4a;
  box-shadow: 0 4px 0 #4d3d32;
}

.clss_btn-secondary:hover {
  background: #7d6a58;
}

.clss_btn-danger {
  background: #8b3a3a;
  box-shadow: 0 4px 0 #5a2424;
}

.clss_btn-danger:hover {
  background: #a54444;
}

.clss_btn-icon {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  min-width: 44px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.clss_btn-cancel {
  background: #dac9b8;
  box-shadow: 0 4px 0 #b7a392;
  color: #3d2a1c;
}

.clss_btn-cancel:hover {
  background: #e5d7c9;
}

.clss_btn-logout {
  background: #8b3a3a;
  box-shadow: 0 4px 0 #5a2424;
  padding: 0.5rem 1.5rem;
  font-size: 0.9rem;
  min-height: 38px;
}

.clss_btn-logout:hover {
  background: #a54444;
}

/* ----- Message area ----- */
.divv_message {
  margin-top: 0.2rem;
  font-size: 0.95rem;
  min-height: 1.8rem;
  text-align: center;
  color: #b34a3c;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  background: rgba(179, 74, 60, 0.06);
  transition: all 0.2s;
}

.divv_message.clss_success {
  color: #2d7842;
  background: rgba(45, 120, 66, 0.08);
}

/* ----- Dashboard common ----- */
.divv_dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 2px solid #dac9b8;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.divv_user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.divv_welcome {
  font-size: 1.1rem;
  color: #3d2a1c;
}

.divv-dashboard-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* ----- Customer management ----- */
.divv-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.divv-search-box {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  max-width: 400px;
}

.divv-search-box input {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 2px solid #dac9b8;
  border-radius: 12px;
  font-size: 0.95rem;
  background: #fefcf9;
  outline: none;
  transition: border-color 0.25s;
}

.divv-search-box input:focus {
  border-color: #b87c5a;
  box-shadow: 0 0 0 4px rgba(184, 124, 90, 0.15);
}

.divv-customer-table {
  overflow-x: auto;
  background: #fefcf9;
  border-radius: 16px;
  border: 1px solid #dac9b8;
  margin-top: 1rem;
}

.divv-customer-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.divv-customer-table th {
  background: #f5efe8;
  padding: 0.8rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #3d2a1c;
  border-bottom: 2px solid #dac9b8;
  white-space: nowrap;
}

.divv-customer-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #ece3da;
  vertical-align: middle;
}

.divv-customer-table tr:hover td {
  background: #f8f2ea;
}

.clss_action-btns {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}

.clss_badge {
  display: inline-block;
  padding: 0.25rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #d4edda;
  color: #155724;
}

.clss_badge-inactive {
  background: #f8d7da;
  color: #721c24;
}

.divv-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6b5a4a;
}

.divv-empty-state p {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

/* Modal styles */
.divv-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.divv-modal-overlay.active {
  display: flex;
}

.divv-modal {
  background: #fcf7f0;
  border-radius: 24px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.divv-modal h2 {
  margin-bottom: 1.5rem;
  color: #3d2a1c;
}

.divv-modal .divv_field {
  margin-bottom: 1rem;
}

.divv-modal .divv_field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #3d2a1c;
  display: block;
  margin-bottom: 0.2rem;
}

.divv-modal .divv_field input,
.divv-modal .divv_field textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 2px solid #dac9b8;
  border-radius: 12px;
  font-size: 0.95rem;
  background: #fefcf9;
  outline: none;
  transition: border-color 0.25s;
  font-family: inherit;
}

.divv-modal .divv_field input:focus,
.divv-modal .divv_field textarea:focus {
  border-color: #b87c5a;
  box-shadow: 0 0 0 4px rgba(184, 124, 90, 0.15);
}

.divv-modal .divv_field textarea {
  resize: vertical;
  min-height: 60px;
}

.divv-modal .divv_field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.divv-modal-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.5rem;
  justify-content: flex-end;
}

/* Responsive */
@media (max-width: 600px) {
  .divv-dashboard-wrapper {
    padding: 1rem;
  }
  .divv-header-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .divv-search-box {
    max-width: 100%;
  }
  .divv-modal .divv_field-row {
    grid-template-columns: 1fr;
  }
  .divv-customer-table table {
    font-size: 0.85rem;
  }
  .divv-customer-table th,
  .divv-customer-table td {
    padding: 0.5rem 0.7rem;
  }
  .divv_dashboard-header {
    flex-direction: column;
    align-items: stretch;
  }
  .divv_user-info {
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .divv_container {
    padding: 2rem 1.2rem 1.8rem;
    border-radius: 24px;
  }
  .divv_logo img {
    max-width: 120px;
  }
  .divv_field input {
    padding: 0.75rem 0.9rem;
    font-size: 0.95rem;
  }
  .clss_btn {
    font-size: 1rem;
    padding: 0.8rem 1.2rem;
  }
}

@media (max-width: 360px) {
  .divv_container {
    padding: 1.5rem 1rem;
  }
  .divv_logo::after {
    font-size: 1.1rem;
  }
}

/* Accessibility (reduce motion) */
@media (prefers-reduced-motion: reduce) {
  .divv_container,
  .clss_btn {
    transition: none;
    transform: none !important;
  }
  .clss_btn:active {
    transform: none !important;
  }
}