@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg: #111d35;
  --bg-deep: #0a1020;
  --navy-800: #17233f;
  --navy-700: #212f4d;
  --gold: #b8a882;
  --gold-soft: rgba(184,168,130,0.4);
  --white: #f5f1ea;
  --muted: rgba(245,241,234,0.5);
  --line: rgba(184,168,130,0.18);
  --error: #d9694f;
  --success: #8fae7a;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  font-size: 17px;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 100px;
}

h1 {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 2.1rem;
  letter-spacing: 0.01em;
  margin: 0 0 8px;
  color: var(--white);
}

.subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 32px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px 20px;
}

.field {
  margin-bottom: 22px;
}

label {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 10px;
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
  width: 100%;
  background: var(--navy-800);
  border: 1px solid var(--navy-700);
  color: var(--white);
  padding: 16px 14px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 1.05rem;
  -webkit-appearance: none;
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='%23b8a882' d='M7 9L0 0h14z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

input[type="file"] {
  width: 100%;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 12px 0;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 480px) {
  .row { grid-template-columns: 1fr; }
  .wrap { padding: 28px 16px 90px; }
  h1 { font-size: 1.7rem; }
}

button {
  background: var(--gold);
  color: var(--bg-deep);
  border: none;
  padding: 16px 26px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  width: 100%;
}

button:hover { background: #c9bb98; }
button:disabled { opacity: 0.5; cursor: default; }

button.secondary {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--white);
  width: auto;
  padding: 10px 18px;
  font-size: 0.7rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.status-queued { background: rgba(245,241,234,0.08); color: var(--muted); }
.status-processing { background: rgba(184,168,130,0.15); color: var(--gold); }
.status-done { background: rgba(143,174,122,0.15); color: var(--success); }
.status-error { background: rgba(217,105,79,0.15); color: var(--error); }

.link-btn {
  color: var(--gold);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
}

.link-btn:hover { text-decoration: underline; }

.error-text {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 10px;
}

.login-wrap {
  max-width: 360px;
  margin: 15vh auto 0;
  padding: 0 20px;
}

.gold-divider { width: 40px; height: 1px; background: var(--gold); opacity: 0.5; margin: 24px 0; }

/* --- Кастомные элементы взамен нативных (которые ОС красит по-своему) --- */

.visually-hidden {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.file-btn {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 12px 20px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.file-btn:active { background: rgba(184,168,130,0.1); }

.file-name {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.custom-select {
  position: relative;
}

.cs-trigger {
  width: 100%;
  background: var(--navy-800);
  border: 1px solid var(--navy-700);
  color: var(--white);
  padding: 16px 14px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.cs-trigger::after {
  content: '';
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--gold);
  margin-left: 12px;
  flex-shrink: 0;
}

.cs-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--navy-800);
  border: 1px solid var(--gold-soft);
  border-radius: 6px;
  overflow: hidden;
  z-index: 20;
  display: none;
  box-shadow: 0 12px 28px rgba(0,0,0,0.45);
}

.cs-options.open { display: block; }

.cs-option {
  padding: 14px 16px;
  font-size: 1rem;
  color: var(--white);
  cursor: pointer;
  border-bottom: 1px solid rgba(184,168,130,0.1);
}

.cs-option:last-child { border-bottom: none; }
.cs-option:active { background: rgba(184,168,130,0.15); }
.cs-option.selected { color: var(--gold); }

/* --- Карточки заданий (взамен таблицы) --- */

.jobs-empty {
  color: var(--muted);
  text-align: center;
  padding: 48px 0;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
}

.job-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  margin-top: 16px;
}

.job-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.job-title {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--white);
  word-break: break-word;
}

.job-meta {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 4px;
}

.job-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(184,168,130,0.1);
}

.job-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
