:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #667085;
  --border: #d7dde3;
  --green: #19856f;
  --green-dark: #0e5f51;
  --gold: #c9972c;
  --danger: #b42318;
  --success: #087443;
  --shadow: 0 18px 50px rgba(31, 41, 51, 0.1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.brand-bar {
  min-height: 108px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 28px;
  align-items: center;
  padding: 20px 0 26px;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: block;
  max-width: 100%;
  object-fit: contain;
}

.logo-farm4trade {
  height: 100px;
  justify-self: start;
}

.logo-cranswick {
  height: 74px;
  justify-self: center;
}

.logo-adal {
  height: 60px;
  justify-self: end;
  background: #6a1fb1;
}

.view {
  margin-top: 48px;
}

.auth-view {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 220px);
}

.hidden {
  display: none;
}

.panel {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-panel {
  max-width: 420px;
  padding: 32px;
}

.upload-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.3fr) auto;
  gap: 18px;
  align-items: end;
  padding: 28px;
}

.panel-heading {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: 0;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  color: #344054;
  font-size: 0.92rem;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #c8d0d8;
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

input:focus {
  outline: 3px solid rgba(25, 133, 111, 0.18);
  border-color: var(--green);
}

input[type="file"] {
  padding: 9px;
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  color: #fff;
  background: var(--green);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--green-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

button.secondary {
  min-height: 38px;
  color: var(--green-dark);
  background: #e7f2ef;
}

button.secondary:hover {
  background: #d6e9e4;
}

.message {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.message.error {
  color: var(--danger);
}

.message.success {
  color: var(--success);
}

.topline {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.session-box {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 820px) {
  .brand-bar {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .logo,
  .logo-farm4trade,
  .logo-cranswick,
  .logo-adal {
    height: auto;
    max-height: 58px;
    justify-self: center;
  }

  .topline {
    display: grid;
    align-items: start;
  }

  .upload-panel {
    grid-template-columns: 1fr;
  }
}
