/* The landing page (/, static/index.html): sign-in, the Claude connector page and the refusal
   texts. The administration (/sprava) has its own stylesheet, admin-v2.css. */

:root {
  --brand-navy: #092f50;
  --brand-navy-dark: #06213a;
  /* AgriMachines greens. The brand green carries white text at only ~3.1:1 — under the 4.5:1
     WCAG AA minimum for normal text — so surfaces with white text (primary buttons) and links use
     the text green (white on it ~4.9:1); the brand green stays for accents and borders, the dark
     green for hover states. */
  --brand-green: #31A735;
  --brand-green-text: #218136;
  --brand-green-dark: #175E27;
  --brand-text: #3a3a3a;
  /* Muted text: #5a6b80 keeps 4.5:1 on white. */
  --brand-grey-text: #5a6b80;
  --brand-lightgrey: #f5f5f6;
  --brand-white: #ffffff;
  --font: "Usual", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--brand-text);
  background: var(--brand-lightgrey);
}

.hidden {
  display: none !important;
}

button {
  font-family: inherit;
  cursor: pointer;
}

button:focus-visible {
  outline: 3px solid #215fb5;
  outline-offset: 2px;
}

/* --- Sign-in screen --- */

#login-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: linear-gradient(160deg, var(--brand-navy) 0%, var(--brand-green-dark) 140%);
}

.login-logo {
  width: 96px;
  height: auto;
  margin-bottom: 28px;
}

.login-card {
  background: var(--brand-white);
  border-radius: 12px;
  padding: 48px 40px;
  width: min(400px, 100%);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.login-card h1 {
  font-size: 22px;
  margin: 0 0 4px;
  color: var(--brand-navy);
}

.login-card p {
  color: var(--brand-grey-text);
  margin: 0 0 28px;
  font-size: 14px;
}

.btn-microsoft {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  background: var(--brand-green-text);
  color: var(--brand-white);
  font-size: 15px;
  font-weight: 600;
  transition: background 0.15s ease;
}

.btn-microsoft:hover {
  background: var(--brand-green-dark);
}

.login-error {
  margin-top: 16px;
  color: #c0392b;
  font-size: 13px;
}

.login-error:empty {
  margin: 0;
}

/* --- Signed in: the connector page --- */

.topbar {
  background: linear-gradient(100deg, var(--brand-navy) 0%, var(--brand-navy-dark) 100%);
  border-bottom: 2px solid var(--brand-green);
  color: var(--brand-white);
  padding: 10px 20px;
}

.topbar-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-logo {
  height: 24px;
  width: auto;
}

.topbar-title {
  font-weight: 700;
  font-size: 16px;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  min-width: 0;
}

.user-name {
  opacity: 0.85;
  overflow-wrap: anywhere;
}

.topbar .btn-secondary {
  color: var(--brand-white);
  border-color: rgba(255, 255, 255, 0.4);
  padding: 6px 12px;
}

.topbar .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-secondary {
  background: transparent;
  color: var(--brand-text);
  border: 1px solid #d9d9d9;
  padding: 9px 18px;
  border-radius: 7px;
  font-size: 13.5px;
}

.btn-secondary:hover {
  background: var(--brand-lightgrey);
}

.app-body {
  padding: 0 12px;
}

.connector-page {
  max-width: 720px;
  margin: 32px auto;
  padding: 24px 28px;
  background: var(--brand-white);
  border: 1px solid #e3e3e3;
  border-radius: 14px;
  color: var(--brand-text);
  font-size: 14px;
  line-height: 1.5;
}

.connector-page h1 {
  margin: 0 0 8px;
  color: var(--brand-navy);
  font-size: 20px;
}

.connector-steps li {
  margin-bottom: 10px;
}

.connector-url {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.connector-url code {
  word-break: break-all;
  background: #e9edf7;
  color: var(--brand-navy);
  padding: 2px 6px;
  border-radius: 5px;
}

.connector-note {
  color: var(--brand-grey-text);
}

@media (max-width: 780px) {
  .connector-page {
    margin: 12px 0;
    padding: 16px;
  }
}
