:root {
  --green-950: #123524;
  --green-850: #1f5137;
  --green-700: #2f6f4e;
  --green-100: #eaf6ee;
  --green-50: #f6fbf7;
  --accent: #d9b66d;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  width: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  width: 100%;
  font-family: 'Roboto', Arial, sans-serif;
  color: var(--green-50);
  background:
    radial-gradient(circle at top left, rgba(217, 182, 109, 0.22), transparent 32rem),
    linear-gradient(135deg, var(--green-950) 0%, var(--green-850) 50%, var(--green-700) 100%);
}

.home-page {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 24px;
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: 32px;
  align-items: center;
  width: min(1120px, 100%);
  padding: 32px;
  border: 1px solid rgba(234, 246, 238, 0.24);
  border-radius: 28px;
  background: rgba(18, 53, 36, 0.62);
  box-shadow: 0 24px 80px rgba(10, 31, 21, 0.32);
  backdrop-filter: blur(10px);
}

.hero-copy {
  padding: 12px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(3rem, 8vw, 5.75rem);
  font-weight: 700;
  line-height: 0.95;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
}

.lead {
  max-width: 520px;
  margin: 22px 0 0;
  color: var(--green-100);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.6;
}

.hero-image {
  display: block;
  width: 100%;
  height: min(56vw, 520px);
  min-height: 320px;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 18px 56px rgba(8, 28, 18, 0.38);
}

.site-footer {
  min-height: 72px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 18px 20px;
  color: rgba(246, 251, 247, 0.78);
  background: rgba(18, 53, 36, 0.72);
  text-align: center;
}

.footer-logo {
  display: block;
  width: 48px;
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid rgba(246, 251, 247, 0.82);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(8, 28, 18, 0.26);
}

@media (max-width: 800px) {
  .home-page {
    align-items: flex-start;
    padding-top: 28px;
  }

  .hero-card {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .hero-image {
    height: 360px;
    min-height: 260px;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn-primary-action,
.btn-secondary-action,
.btn-new-batch-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.btn-primary-action {
  color: var(--green-950);
  background: var(--accent);
  box-shadow: 0 12px 26px rgba(217, 182, 109, 0.28);
}

.btn-secondary-action {
  color: #ffffff;
  background: rgba(246, 251, 247, 0.14);
  border: 1px solid rgba(246, 251, 247, 0.38);
}

.btn-new-batch-action {
  color: #ffffff;
  background: linear-gradient(135deg, #1f8f4d, #0f5f33);
  box-shadow: 0 12px 26px rgba(31, 143, 77, 0.28);
}

.btn-primary-action:hover,
.btn-primary-action:focus,
.btn-secondary-action:hover,
.btn-secondary-action:focus,
.btn-new-batch-action:hover,
.btn-new-batch-action:focus {
  color: inherit;
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-primary-action:hover,
.btn-primary-action:focus {
  color: var(--green-950);
  box-shadow: 0 16px 34px rgba(217, 182, 109, 0.36);
}

.btn-secondary-action:hover,
.btn-secondary-action:focus {
  color: #ffffff;
  background: rgba(246, 251, 247, 0.2);
}

.btn-new-batch-action:hover,
.btn-new-batch-action:focus {
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(31, 143, 77, 0.36);
}

.page-shell {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 24px;
}

.content-card {
  width: min(760px, 100%);
  padding: 34px;
  border: 1px solid rgba(234, 246, 238, 0.24);
  border-radius: 28px;
  background: rgba(18, 53, 36, 0.68);
  box-shadow: 0 24px 80px rgba(10, 31, 21, 0.32);
  backdrop-filter: blur(10px);
}

.contact-card {
  align-self: flex-start;
}

.placeholder-card {
  text-align: center;
}

.back-link {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--green-100);
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover,
.back-link:focus {
  color: #ffffff;
  text-decoration: none;
}

.page-title {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.35rem, 6vw, 4.25rem);
  font-weight: 700;
  line-height: 1;
}

.page-description {
  margin: 18px 0 28px;
  color: var(--green-100);
  font-size: 1.08rem;
  line-height: 1.6;
}

.contact-form label {
  color: #ffffff;
  font-weight: 700;
}

.contact-form .form-control {
  min-height: 48px;
  color: var(--green-950);
  border: 1px solid rgba(234, 246, 238, 0.32);
  border-radius: 14px;
}

.contact-form textarea.form-control {
  min-height: 150px;
}

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

  .page-shell {
    align-items: flex-start;
    padding-top: 28px;
  }

  .content-card {
    padding: 24px;
  }
}

.login-card {
  max-width: 520px;
}

.login-form {
  margin-top: 8px;
}

.login-error {
  margin: 0 0 20px;
  padding: 12px 14px;
  color: #ffb4b4;
  border: 1px solid rgba(255, 180, 180, 0.42);
  border-radius: 14px;
  background: rgba(128, 24, 24, 0.18);
  font-weight: 700;
  line-height: 1.4;
}

.admin-shell {
  align-items: flex-start;
  min-height: auto;
  padding-top: 42px;
}

.admin-card {
  max-width: 1120px;
  width: 100%;
}

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.admin-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(234, 246, 238, 0.16);
}

.admin-section h2 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 700;
}

.admin-user-form {
  margin-top: 0;
}

.admin-table-wrapper {
  overflow-x: auto;
  border: 1px solid rgba(234, 246, 238, 0.16);
  border-radius: 16px;
}

.admin-table {
  width: 100%;
  min-width: 760px;
  margin: 0;
  color: #ffffff;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(234, 246, 238, 0.12);
  vertical-align: middle;
}

.admin-table th {
  color: var(--green-100);
  background: rgba(5, 48, 25, 0.72);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-success {
  margin: 0 0 20px;
  padding: 12px 14px;
  color: #c9ffd8;
  border: 1px solid rgba(174, 255, 197, 0.42);
  border-radius: 14px;
  background: rgba(18, 102, 48, 0.2);
  font-weight: 700;
  line-height: 1.4;
}

.admin-muted {
  color: var(--green-100);
  font-weight: 700;
}

.btn-danger-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  color: #ffffff;
  background: #b42318;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-danger-action:hover,
.btn-danger-action:focus {
  color: #ffffff;
  background: #912018;
  box-shadow: 0 12px 24px rgba(180, 35, 24, 0.28);
  transform: translateY(-1px);
}

@media (max-width: 800px) {
  .admin-header {
    flex-direction: column;
  }
}

.dryer-shell {
  padding-top: 42px;
}

.dryer-card {
  max-width: 1180px;
}

.dryer-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dryer-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dryer-status-card,
.dryer-quick-action,
.dryer-moisture-form,
.dryer-stop-action {
  padding: 18px;
  border: 1px solid rgba(234, 246, 238, 0.16);
  border-radius: 18px;
  background: rgba(5, 48, 25, 0.34);
}

.dryer-status-card {
  min-height: 118px;
}

.dryer-status-card strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
  font-size: 1.18rem;
}

.dryer-card-label {
  display: block;
  color: var(--green-100);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1;
}

.status-active {
  color: #0f3b24;
  background: #c9ffd8;
}

.status-empty {
  color: #fff2c2;
  background: rgba(217, 182, 109, 0.22);
  border: 1px solid rgba(217, 182, 109, 0.38);
}

.status-warning {
  color: #3b2500;
  background: #ffd17a;
}

.dryer-stop-action {
  margin-top: 16px;
}

.dryer-quick-action,
.dryer-moisture-form,
.dryer-stop-action {
  display: flex;
  gap: 12px;
  align-items: center;
}

.dryer-quick-action .btn-primary-action,
.dryer-quick-action .btn-new-batch-action,
.dryer-moisture-form .btn-primary-action,
.dryer-stop-action .btn-danger-action {
  width: 100%;
  min-height: 48px;
}

.dryer-moisture-form .form-control {
  min-height: 48px;
}

.dryer-table {
  min-width: 0;
}

.dryer-table th:last-child,
.dryer-table td:last-child {
  text-align: right;
}

.dryer-reading-row {
  cursor: pointer;
}

.dryer-reading-row:hover td,
.dryer-reading-row:focus td {
  background: rgba(234, 246, 238, 0.08);
}

.dryer-reading-detail td {
  color: var(--green-100);
  font-size: 0.92rem;
  padding-top: 0;
}

.contact-form .form-control:disabled,
.contact-form .form-control[readonly],
.dryer-moisture-form .form-control:disabled {
  color: rgba(18, 53, 36, 0.78);
  background: rgba(234, 246, 238, 0.72);
  cursor: not-allowed;
}

button:disabled,
.btn-primary-action:disabled,
.btn-new-batch-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 1020px) {
  .dryer-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .dryer-shell {
    padding: 18px 12px;
  }

  .dryer-card {
    padding: 18px 14px;
    border-radius: 20px;
  }

  .dryer-card .admin-header {
    gap: 12px;
  }

  .dryer-card .page-title {
    font-size: 1.75rem;
  }

  .dryer-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .dryer-status-card,
  .dryer-quick-action,
  .dryer-moisture-form,
  .dryer-stop-action {
    padding: 12px;
    border-radius: 14px;
  }

  .dryer-status-card {
    min-height: 92px;
  }

  .dryer-status-card strong {
    font-size: 1rem;
  }

  .dryer-card-label {
    font-size: 0.68rem;
    letter-spacing: 0.05em;
  }

  .dryer-actions-stack {
    gap: 10px;
  }

  .dryer-stop-action {
    margin-top: 10px;
  }

  .dryer-moisture-form {
    flex-direction: column;
  }

  .dryer-table th,
  .dryer-table td {
    padding: 12px 10px;
  }
}

@media (max-width: 380px) {
  .dryer-status-grid {
    grid-template-columns: 1fr;
  }
}

.admin-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

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

.admin-password-form .form-control {
  min-width: 160px;
  min-height: 42px;
  color: var(--green-950);
  border: 1px solid rgba(234, 246, 238, 0.32);
  border-radius: 14px;
}

.admin-small-action {
  min-height: 42px;
  padding: 10px 16px;
}

.admin-dashboard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-section-header {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.admin-section-header h2 {
  margin-bottom: 0;
}

.admin-target-form {
  max-width: 540px;
}

.admin-table-link {
  color: #ffffff;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(217, 182, 109, 0.78);
  text-underline-offset: 4px;
}

.admin-table-link:hover,
.admin-table-link:focus {
  color: var(--accent);
}

@media (max-width: 1020px) {
  .admin-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .admin-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .admin-section-header {
    align-items: stretch;
  }

  .admin-section-header .btn-secondary-action,
  .admin-target-form .btn-primary-action {
    width: 100%;
  }
}

.admin-home-card {
  max-width: 980px;
}

.admin-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.admin-module-card {
  display: flex;
  min-height: 170px;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  color: #ffffff;
  border: 1px solid rgba(234, 246, 238, 0.18);
  border-radius: 22px;
  background: rgba(234, 246, 238, 0.1);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.admin-module-card:hover,
.admin-module-card:focus {
  color: #ffffff;
  border-color: rgba(217, 182, 109, 0.72);
  background: rgba(234, 246, 238, 0.16);
  box-shadow: 0 16px 36px rgba(10, 31, 21, 0.24);
  text-decoration: none;
  transform: translateY(-2px);
}

.admin-module-title {
  color: var(--accent);
  font-size: 1.45rem;
  font-weight: 700;
}

.admin-module-description {
  margin-top: 18px;
  color: var(--green-100);
  line-height: 1.55;
}

.admin-back-link,
.construction-back-link {
  margin: 6px 0 0;
}

.construction-back-link {
  margin-bottom: 22px;
}

@media (max-width: 720px) {
  .admin-module-grid {
    grid-template-columns: 1fr;
  }

  .admin-module-card {
    min-height: 140px;
  }
}
