:root {
  --bg: #eef3f8;
  --panel: #ffffff;
  --card: #ffffff;
  --line: #d7e0ea;
  --text: #1d2a3a;
  --muted: #5f7085;
  --brand: #143f6b;
  --brand-2: #0f3154;
  --ok-bg: #eaf8ef;
  --ok-text: #21653a;
  --err-bg: #fff0f0;
  --err-text: #a12525;
  --info-bg: #eef5ff;
  --info-text: #143f6b;
  --shadow: 0 18px 40px rgba(17, 38, 68, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, "Noto Sans Hebrew", sans-serif;
}

body {
  min-height: 100vh;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.panel {
  display: grid;
  gap: 20px;
}

.hero {
  background: linear-gradient(135deg, #173d69 0%, #0d2844 100%);
  color: #fff;
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero h1 {
  margin: 0 0 8px 0;
  font-size: 34px;
}

.hero p {
  margin: 0;
  color: rgba(255,255,255,0.9);
  line-height: 1.6;
}

.badge {
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.grid {
  display: grid;
  gap: 16px;
}

.login-grid {
  grid-template-columns: 1fr 220px;
}

.customer-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.mail-grid {
  grid-template-columns: 1fr;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

.field span {
  font-weight: 700;
}

.field-hint {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.85em;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  color: var(--text);
}

textarea {
  resize: vertical;
  line-height: 1.6;
}

input[readonly] {
  background: #f7f9fc;
}

button {
  border: 0;
  border-radius: 14px;
  padding: 13px 18px;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  transition: background 0.15s ease;
}

button:hover {
  background: var(--brand-2);
}

.action-field {
  justify-content: end;
}

.action-row {
  display: flex;
  justify-content: flex-start;
}

.status {
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--info-bg);
  color: var(--info-text);
  font-weight: 700;
  min-height: 54px;
  display: flex;
  align-items: center;
}

.status.ok {
  background: var(--ok-bg);
  color: var(--ok-text);
}

.status.err {
  background: var(--err-bg);
  color: var(--err-text);
}

.note {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--muted);
  background: #fbfcfe;
  line-height: 1.7;
}

.autocomplete-wrap {
  position: relative;
}

.autocomplete-box {
  position: absolute;
  top: 88px;
  right: 0;
  left: 0;
  z-index: 30;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  max-height: 320px;
  overflow: auto;
}

.autocomplete-box.hidden {
  display: none;
}

.autocomplete-item {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  cursor: pointer;
  line-height: 1.6;
}

.autocomplete-item:last-child {
  border-bottom: 0;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background: #f4f8fd;
}

.autocomplete-empty {
  padding: 12px 14px;
  color: var(--muted);
}

@media (max-width: 860px) {
  .login-grid,
  .customer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .page {
    padding: 14px;
  }

  .autocomplete-box {
    top: 84px;
  }
}

.download-warning {
  margin-top: 10px;
  color: #b00020;
  font-weight: 700;
  font-size: 14px;
}

.status.ok {
  color: #b00020 !important;
  font-weight: 700;
}


.download-warning {
  margin-top: 12px;
  padding: 12px 14px;
  border: 2px solid #b00020;
  border-radius: 10px;
  background: #fff5f6;
  color: #b00020;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.5;
}

.download-warning::before {
  content: "⚠ ";
  font-size: 16px;
  margin-left: 4px;
}

.status.ok {
  color: #b00020 !important;
  font-weight: 700;
}


.status.error {
  color: #b00020;
  font-weight: 700;
}

input[type="file"].error-border {
  border: 2px solid #b00020;
}

