:root {
  --blue-50: #eef4ff;
  --blue-100: #d9e5fb;
  --blue-600: #12233f;
  --blue-800: #0f1727;
  --blue-400: #2f6de1;
  --green-50: #eef8f0;
  --green-700: #2e7a54;
  --red-50: #fdeeed;
  --red-700: #a64538;
  --amber-50: #f7f0e2;
  --amber-700: #8d6b35;
  --gray-25: #fffdfa;
  --gray-50: #f6f2eb;
  --gray-100: #e7ded2;
  --gray-200: #d8cdbd;
  --gray-500: #5f697d;
  --gray-900: #182033;
  --border: 1px solid var(--gray-100);
  --radius-md: 16px;
  --radius-lg: 26px;
  --shadow: 0 20px 46px rgba(17, 24, 39, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Manrope", "Avenir Next", "Segoe UI", Arial, sans-serif;
  color: var(--gray-900);
  background:
    radial-gradient(circle at top left, rgba(47, 109, 225, 0.1), transparent 26%),
    radial-gradient(circle at top right, rgba(201, 164, 104, 0.13), transparent 22%),
    linear-gradient(180deg, #fbf8f4 0%, #f3ede4 100%);
  line-height: 1.5;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 18px 56px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: var(--border);
}

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

.logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--blue-800);
  letter-spacing: -0.02em;
}

.logo span { color: var(--blue-400); }

.badge {
  border: 1px solid var(--blue-100);
  background: linear-gradient(135deg, rgba(47, 109, 225, 0.08), rgba(201, 164, 104, 0.14));
  color: var(--blue-800);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 12px;
  font-weight: 700;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn,
.btn-secondary,
.btn-link,
.chip-button {
  font: inherit;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

.btn {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-400));
  color: #fff;
  padding: 12px 18px;
  font-weight: 700;
  box-shadow: 0 18px 30px rgba(18, 35, 63, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn:hover {
  filter: saturate(1.03);
  transform: translateY(-1px);
  box-shadow: 0 22px 34px rgba(18, 35, 63, 0.22);
}

.btn:disabled,
.btn-secondary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.88);
  color: var(--gray-900);
  border: 1px solid var(--gray-100);
  padding: 10px 16px;
  font-weight: 700;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn-secondary:hover {
  border-color: var(--blue-100);
  box-shadow: 0 12px 20px rgba(17, 24, 39, 0.08);
  transform: translateY(-1px);
}

.btn-link {
  background: transparent;
  color: var(--blue-600);
  padding: 10px 12px;
  font-weight: 700;
}

.chip-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border: 1px solid var(--gray-100);
  background: rgba(255, 255, 255, 0.88);
  color: var(--gray-900);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.chip-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(17, 24, 39, 0.08);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(47, 109, 225, 0.1), rgba(201, 164, 104, 0.22));
  border: 1px solid var(--blue-100);
  color: var(--blue-800);
  font-weight: 800;
  flex-shrink: 0;
}

.card {
  background: rgba(255, 255, 255, 0.82);
  border: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px;
  backdrop-filter: blur(16px);
}

.title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 6px;
}

.subtitle,
.muted {
  color: var(--gray-500);
  font-size: 14px;
}

.subtitle { margin-bottom: 16px; }

.message {
  display: none;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-top: 16px;
}

.message.error {
  background: var(--red-50);
  color: var(--red-700);
  border: 1px solid #efc7c0;
}

.message.success {
  background: var(--green-50);
  color: var(--green-700);
  border: 1px solid #d0e5d6;
}

.info-banner {
  display: none;
  margin-top: 18px;
  background: linear-gradient(135deg, rgba(47, 109, 225, 0.09), rgba(201, 164, 104, 0.15));
  border: 1px solid var(--blue-100);
  color: var(--blue-800);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 14px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.stat-k {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gray-500);
  font-weight: 700;
}

.stat-v {
  font-size: 30px;
  font-weight: 800;
  color: var(--blue-800);
  margin-top: 8px;
}

.layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  margin-top: 18px;
}

.main-stack {
  display: grid;
  gap: 16px;
}

.side-head,
.profile-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.request-list,
.results-list,
.runs-list,
.garage-list,
.association-list {
  display: grid;
  gap: 12px;
}

.request-card,
.result-card,
.run-card,
.garage-card,
.association-card,
.info-card,
.empty {
  border: 1px solid var(--gray-100);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(246, 242, 235, 0.88) 100%);
  padding: 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.request-card:hover,
.result-card:hover,
.run-card:hover,
.garage-card:hover,
.association-card:hover,
.info-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 26px rgba(92, 59, 38, 0.08);
}

.request-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.request-card.active {
  border-color: var(--blue-600);
  background: linear-gradient(180deg, rgba(47, 109, 225, 0.08) 0%, rgba(255, 255, 255, 0.95) 100%);
  box-shadow: 0 16px 30px rgba(18, 35, 63, 0.12);
}

.small {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 6px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}

.grid-two,
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.details-grid { gap: 12px; }

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

.field label {
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
  font: inherit;
  color: var(--gray-900);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field input[readonly] {
  background: var(--gray-50);
  color: var(--gray-500);
}

.field textarea {
  min-height: 108px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue-400);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(47, 109, 225, 0.12);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 64px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.94));
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.password-toggle:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(219, 234, 254, 0.96));
  color: var(--blue-600);
  transform: translateY(-50%) translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.password-toggle:focus-visible {
  outline: none;
  color: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(47, 109, 225, 0.16), 0 14px 28px rgba(15, 23, 42, 0.12);
}

.password-toggle-icon {
  width: 20px;
  height: 20px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.05 12.01S5.68 6.5 12 6.5s9.95 5.51 9.95 5.51-3.63 5.49-9.95 5.49-9.95-5.49-9.95-5.49Z'/%3E%3Cpath d='M15.2 12a3.2 3.2 0 1 1-6.4 0 3.2 3.2 0 0 1 6.4 0Z'/%3E%3Cpath d='m4 4 16 16'/%3E%3C/svg%3E");
}

.password-toggle.is-visible .password-toggle-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%232f6de1' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.05 12.01S5.68 6.5 12 6.5s9.95 5.51 9.95 5.51-3.63 5.49-9.95 5.49-9.95-5.49-9.95-5.49Z'/%3E%3Cpath d='M15.2 12a3.2 3.2 0 1 1-6.4 0 3.2 3.2 0 0 1 6.4 0Z'/%3E%3C/svg%3E");
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--gray-100);
  background: rgba(255, 251, 246, 0.92);
}

.pill.active {
  background: var(--blue-50);
  color: var(--blue-800);
  border-color: var(--blue-100);
}

.pill.completed {
  background: var(--green-50);
  color: var(--green-700);
  border-color: #d0e5d6;
}

.pill.paused {
  background: var(--amber-50);
  color: var(--amber-700);
  border-color: #f3d9ad;
}

.pill.failed {
  background: var(--red-50);
  color: var(--red-700);
  border-color: #efc7c0;
}

.row-pills,
.checkbox-row,
.row-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.checkbox-row { gap: 16px; }

.link-button {
  display: inline-flex;
  text-decoration: none;
}

.link {
  color: var(--blue-600);
  font-weight: 700;
  text-decoration: none;
}

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

.phone-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 12px;
}

.stack-form {
  display: grid;
  gap: 16px;
}

.narrow-form { max-width: 460px; }

.section-gap { height: 18px; }

.hidden { display: none !important; }

@media (max-width: 1080px) {
  .layout,
  .hero,
  .grid-two,
  .details-grid,
  .stats {
    grid-template-columns: 1fr;
  }
}

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