.gyr-app,
.gyr-login-shell {
  --gyr-navy: #172033;
  --gyr-blue: #2563eb;
  --gyr-blue-dark: #1d4ed8;
  --gyr-line: #dfe5ee;
  --gyr-soft: #f5f7fb;
  --gyr-muted: #64748b;
  color: var(--gyr-navy);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.gyr-app *,
.gyr-login-shell * { box-sizing: border-box; }

.gyr-app button,
.gyr-app input,
.gyr-app textarea,
.gyr-login-shell button,
.gyr-login-shell input { font: inherit; }

.gyr-login-shell {
  display: grid;
  min-height: min(760px, 82vh);
  place-items: center;
  padding: 32px 18px;
  border-radius: 24px;
  background: radial-gradient(circle at 15% 10%, rgba(37, 99, 235, .17), transparent 32%), radial-gradient(circle at 92% 90%, rgba(8, 145, 178, .15), transparent 34%), #f6f8fc;
}

.gyr-login {
  width: min(100%, 470px);
  margin: 0;
  padding: clamp(26px, 6vw, 44px);
  border: 1px solid rgba(223, 229, 238, .9);
  border-radius: 24px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 24px 70px rgba(23, 32, 51, .14);
}

.gyr-login-mark {
  display: grid;
  width: 64px;
  height: 64px;
  margin-bottom: 24px;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--gyr-blue), #0e7490);
  box-shadow: 0 12px 28px rgba(37, 99, 235, .28);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.gyr-eyebrow {
  margin: 0;
  color: var(--gyr-muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.gyr-login h2 {
  margin: 7px 0 10px;
  color: var(--gyr-navy);
  font-size: clamp(28px, 6vw, 38px);
  font-weight: 850;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.gyr-login-copy { margin: 0 0 26px; color: var(--gyr-muted); }

.gyr-login label:not(.gyr-remember) {
  display: block;
  margin: 16px 0 7px;
  color: #334155;
  font-size: 14px;
  font-weight: 750;
}

.gyr-login input[type="text"],
.gyr-login input[type="password"] {
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 15px;
  border: 1px solid #cfd8e5;
  border-radius: 12px;
  outline: 0;
  background: #fff;
  color: var(--gyr-navy);
  box-shadow: none;
}

.gyr-password-field { position: relative; }
.gyr-password-field input[type="password"],
.gyr-password-field input[type="text"] { padding-right: 78px; }
.gyr-password-field button {
  position: absolute;
  top: 50%;
  right: 7px;
  min-width: 62px;
  min-height: 38px;
  padding: 0 9px;
  border: 0;
  border-radius: 9px;
  color: var(--gyr-blue-dark);
  background: #eef4ff;
  font-size: 13px;
  font-weight: 800;
  transform: translateY(-50%);
  cursor: pointer;
}

.gyr-login input:focus { border-color: var(--gyr-blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }

.gyr-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0;
  color: #475569;
  font-size: 14px;
}

.gyr-login button[type="submit"] {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--gyr-blue), var(--gyr-blue-dark));
  box-shadow: 0 12px 24px rgba(37, 99, 235, .22);
  font-weight: 800;
  cursor: pointer;
}

.gyr-forgot {
  display: block;
  margin-top: 18px;
  color: var(--gyr-blue-dark);
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.gyr-login-error {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 11px;
  color: #991b1b;
  background: #fef2f2;
  font-size: 14px;
  font-weight: 700;
}

.gyr-app { width: min(100%, 1180px); margin: 0 auto; }

.gyr-app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding: clamp(22px, 5vw, 34px);
  border: 1px solid var(--gyr-line);
  border-radius: 20px;
  background: linear-gradient(135deg, #fff 40%, #eef4ff);
  box-shadow: 0 14px 38px rgba(23, 32, 51, .07);
}

.gyr-app-header h2 {
  margin: 5px 0 7px;
  color: var(--gyr-navy);
  font-size: clamp(28px, 5vw, 43px);
  font-weight: 880;
  letter-spacing: -.04em;
  line-height: 1.05;
}

.gyr-app-header h2 span { color: var(--gyr-blue); }
.gyr-app-header p { margin: 0; color: var(--gyr-muted); }

.gyr-logout {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid var(--gyr-line);
  border-radius: 11px;
  color: var(--gyr-navy);
  background: #fff;
  text-decoration: none;
  font-weight: 750;
}

.gyr-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 9px 0 15px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}

.gyr-search input {
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 0 17px;
  border: 1px solid var(--gyr-line);
  border-radius: 13px;
  outline: 0;
  background: #fff;
  color: var(--gyr-navy);
  box-shadow: 0 6px 18px rgba(23, 32, 51, .04);
  font-size: 16px;
}

.gyr-search input:focus { border-color: var(--gyr-blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .1); }
.gyr-filters { display: flex; gap: 8px; overflow-x: auto; padding: 11px 0 3px; scrollbar-width: thin; }

.gyr-filters button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 7px 13px;
  border: 1px solid var(--gyr-line);
  border-radius: 999px;
  color: #475569;
  background: #fff;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.gyr-filters button.is-active { border-color: var(--gyr-navy); color: #fff; background: var(--gyr-navy); }
.gyr-feedback { min-height: 26px; color: #15803d; font-size: 14px; font-weight: 750; }
.gyr-feedback.is-error { color: #b91c1c; }
.gyr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 18px; }

.gyr-card {
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--gyr-line);
  border-top: 6px solid var(--gyr-status);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 13px 35px rgba(15, 23, 42, .08);
}

.gyr-card[hidden],
.gyr-detail[hidden] { display: none; }
.gyr-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gyr-number { color: var(--gyr-muted); font-size: 13px; font-weight: 850; letter-spacing: .04em; }

.gyr-status-badge {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--gyr-status);
  background: color-mix(in srgb, var(--gyr-status) 12%, white);
  font-size: 12px;
  font-weight: 850;
}

.gyr-card h3 { margin: 17px 0 5px; color: var(--gyr-navy); font-size: 24px; font-weight: 850; letter-spacing: -.025em; line-height: 1.15; }
.gyr-types { margin: 0 0 11px; color: var(--gyr-status); font-size: 13px; font-weight: 800; }
.gyr-description { min-height: 48px; overflow-wrap: anywhere; color: #475569; line-height: 1.55; }
.gyr-card-actions { display: flex; gap: 9px; margin-top: 17px; }

.gyr-card-actions a,
.gyr-card-actions button,
.gyr-save-status,
.gyr-notes > button {
  display: inline-flex;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 11px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.gyr-call { border: 1px solid var(--gyr-blue); color: #fff; background: var(--gyr-blue); }
.gyr-open { border: 1px solid var(--gyr-line); color: var(--gyr-navy); background: #fff; }

.gyr-detail {
  margin: 20px -20px -20px;
  padding: 20px;
  border-top: 1px solid var(--gyr-line);
  background: #fcfdff;
}

.gyr-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.gyr-meta div { padding: 11px; border: 1px solid #e8edf4; border-radius: 11px; background: var(--gyr-soft); }
.gyr-meta-wide { grid-column: 1 / -1; }
.gyr-meta dt { color: var(--gyr-muted); font-size: 10px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.gyr-meta dd { margin: 3px 0 0; overflow-wrap: anywhere; color: var(--gyr-navy); font-weight: 800; }
.gyr-full-description,
.gyr-status-editor,
.gyr-notes { margin-top: 21px; }
.gyr-detail h4,
.gyr-notes > label { display: block; margin: 0 0 9px; color: var(--gyr-navy); font-size: 14px; font-weight: 850; }
.gyr-full-description p { margin: 0; overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap; color: #334155; }

.gyr-budget {
  margin-top: 21px;
  overflow: hidden;
  border: 1px solid #dbe5f3;
  border-radius: 14px;
  background: #fff;
}

.gyr-budget > summary {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--gyr-navy);
  background: #f7faff;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}

.gyr-budget > summary::-webkit-details-marker { display: none; }
.gyr-budget > summary::before { color: var(--gyr-blue); content: "+"; font-size: 20px; line-height: 1; }
.gyr-budget[open] > summary::before { content: "−"; }
.gyr-budget > summary span { margin-right: auto; }
.gyr-budget > summary strong { color: var(--gyr-blue-dark); white-space: nowrap; }
.gyr-budget-body { padding: 15px; }
.gyr-budget-body > label:first-child { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 800; }

.gyr-budget-items-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.gyr-budget-items-heading strong { font-size: 14px; }
.gyr-budget-items-heading small { color: var(--gyr-muted); font-size: 11px; }
.gyr-budget-items { display: grid; gap: 10px; }
.gyr-budget-item { display: grid; gap: 9px; padding: 12px; border: 1px solid #dfe5ee; border-radius: 11px; background: #f8fafc; }
.gyr-budget-item label > span { display: block; margin-bottom: 5px; color: var(--gyr-muted); font-size: 11px; font-weight: 800; }
.gyr-budget-item input[type="text"] { width: 100%; min-height: 44px; margin: 0; padding: 0 11px; border: 1px solid #cfd8e5; border-radius: 10px; color: var(--gyr-navy); background: #fff; }
.gyr-remove-budget-item { justify-self: start; padding: 2px 0; border: 0; color: #b91c1c; background: transparent; font-size: 12px; font-weight: 800; cursor: pointer; }
.gyr-add-budget-item { width: 100%; min-height: 43px; margin-top: 9px; border: 1px dashed #93c5fd; border-radius: 10px; color: var(--gyr-blue-dark); background: #eff6ff; font-size: 13px; font-weight: 850; cursor: pointer; }

.gyr-money-input { position: relative; }
.gyr-money-input input {
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 0 48px 0 14px;
  border: 1px solid #cfd8e5;
  border-radius: 11px;
  outline: 0;
  color: var(--gyr-navy);
  background: #fff;
  font-size: 18px;
  font-weight: 800;
}
.gyr-money-input input:focus { border-color: var(--gyr-blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .1); }
.gyr-money-input span { position: absolute; top: 50%; right: 16px; color: var(--gyr-muted); font-weight: 800; transform: translateY(-50%); }

.gyr-budget-choice { margin: 13px 0; padding: 0; border: 0; }
.gyr-budget-choice legend { margin-bottom: 8px; color: #334155; font-size: 13px; font-weight: 800; }
.gyr-budget-choice > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gyr-budget-choice label { position: relative; cursor: pointer; }
.gyr-budget-choice input { position: absolute; opacity: 0; pointer-events: none; }
.gyr-budget-choice span { display: grid; min-height: 46px; place-items: center; border: 1px solid #cfd8e5; border-radius: 10px; color: #475569; background: #fff; font-size: 14px; font-weight: 850; }
.gyr-budget-choice input:checked + span { border-color: var(--gyr-blue); color: #fff; background: var(--gyr-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.gyr-budget-choice input:focus-visible + span { outline: 3px solid rgba(37, 99, 235, .25); outline-offset: 2px; }

.gyr-commission-info { margin: 12px 0; border: 1px solid #e2e8f0; border-radius: 10px; }
.gyr-commission-info summary { padding: 10px 12px; color: var(--gyr-blue-dark); font-size: 12px; font-weight: 800; cursor: pointer; }
.gyr-commission-info div { padding: 0 12px 9px; color: var(--gyr-muted); font-size: 12px; }
.gyr-commission-info p { margin: 4px 0; }

.gyr-budget-results { display: grid; grid-template-columns: 1fr; gap: 8px; }
.gyr-budget-results > div { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; padding: 11px 12px; border: 1px solid #e8edf4; border-radius: 10px; background: var(--gyr-soft); }
.gyr-budget-results span { color: #475569; font-size: 12px; font-weight: 750; }
.gyr-budget-results strong { color: var(--gyr-navy); font-size: 15px; }
.gyr-budget-results small { grid-column: 1 / -1; color: var(--gyr-muted); font-size: 10px; }
.gyr-budget-results .gyr-budget-grand-total { border-color: #93c5fd; background: #eff6ff; }
.gyr-budget-results .gyr-budget-grand-total strong { color: #1d4ed8; font-size: 17px; }

.gyr-payment-state { display: grid; gap: 6px; margin-top: 10px; padding: 11px 12px; border-radius: 10px; color: #475569; background: #f8fafc; font-size: 12px; }
.gyr-save-budget { width: 100%; min-height: 47px; margin-top: 12px; border: 0; border-radius: 11px; color: #fff; background: var(--gyr-blue); font-size: 14px; font-weight: 850; cursor: pointer; }
.gyr-save-budget:disabled { opacity: .6; cursor: wait; }
.gyr-budget-pdf { display: flex; min-height: 45px; align-items: center; justify-content: center; margin-top: 8px; border: 1px solid var(--gyr-blue); border-radius: 11px; color: var(--gyr-blue-dark); background: #fff; text-align: center; text-decoration: none; font-size: 13px; font-weight: 850; }
.gyr-budget-pdf[hidden] { display: none; }
.gyr-budget-pdf-help { margin: 8px 0 0; color: var(--gyr-muted); font-size: 11px; line-height: 1.4; }

.gyr-progress {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gyr-progress li {
  position: relative;
  display: grid;
  min-height: 47px;
  grid-template-columns: 34px 1fr;
  align-items: start;
  gap: 10px;
  color: #94a3b8;
}

.gyr-progress li:not(:last-child)::after {
  position: absolute;
  top: 28px;
  bottom: -2px;
  left: 14px;
  width: 3px;
  border-radius: 4px;
  background: #e2e8f0;
  content: "";
}

.gyr-progress li.is-complete:not(:last-child)::after { background: #22c55e; }

.gyr-progress-marker {
  position: relative;
  z-index: 1;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  color: #94a3b8;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.gyr-progress-label { padding-top: 4px; font-size: 14px; font-weight: 750; line-height: 1.35; }
.gyr-progress li.is-complete { color: #15803d; }
.gyr-progress li.is-complete .gyr-progress-marker { border-color: #22c55e; color: #fff; background: #22c55e; }
.gyr-progress li.is-current { color: #1e40af; }
.gyr-progress li.is-current .gyr-progress-marker { border-color: var(--gyr-blue); color: #fff; background: var(--gyr-blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.gyr-progress li.is-current .gyr-progress-label { font-weight: 850; }
.gyr-progress li.is-rejected { color: #b91c1c; }
.gyr-progress li.is-rejected .gyr-progress-marker { border-color: #dc2626; background: #dc2626; box-shadow: 0 0 0 4px rgba(220, 38, 38, .1); }
.gyr-progress li.is-no-answer { color: #c2410c; }
.gyr-progress li.is-no-answer .gyr-progress-marker { border-color: #ea580c; background: #ea580c; box-shadow: 0 0 0 4px rgba(234, 88, 12, .1); }

.gyr-next-step {
  margin-top: 13px;
  padding: 14px;
  border: 1px solid #dbe5f3;
  border-radius: 13px;
  background: #f7faff;
}

.gyr-next-step > p { margin: 0 0 9px; color: var(--gyr-muted); font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.gyr-next-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }

.gyr-next-actions button {
  min-height: 46px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
  cursor: pointer;
}

.gyr-next-actions button.is-primary { background: var(--gyr-blue); }
.gyr-next-actions button.is-success { background: #16a34a; }
.gyr-next-actions button.is-danger { background: #dc2626; }
.gyr-next-actions button.is-warning { background: #ea580c; }
.gyr-next-actions button:disabled { opacity: .6; cursor: wait; }

.gyr-terminal-status {
  margin: 10px 0 13px;
  padding: 11px 13px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 850;
}

.gyr-terminal-status.is-finished { color: #166534; background: #dcfce7; }
.gyr-terminal-status.is-rejected { color: #991b1b; background: #fee2e2; }
.gyr-terminal-status.is-cancelled { color: #334155; background: #e2e8f0; }

.gyr-correct-status { margin-top: 15px; border-top: 1px solid var(--gyr-line); padding-top: 12px; }
.gyr-correct-status summary { color: var(--gyr-muted); cursor: pointer; font-size: 12px; font-weight: 750; }
.gyr-correct-status[open] summary { margin-bottom: 10px; color: var(--gyr-navy); }

.gyr-status-options { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }

.gyr-status-options button {
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid var(--gyr-line);
  border-radius: 10px;
  color: #475569;
  background: #fff;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  cursor: pointer;
}

.gyr-status-options button.is-selected { border-color: var(--gyr-blue); color: #1e40af; background: #eef4ff; box-shadow: inset 0 0 0 1px var(--gyr-blue); }

.gyr-save-status,
.gyr-notes > button { width: 100%; margin-top: 9px; border: 0; color: #fff; background: var(--gyr-navy); }
.gyr-save-status:disabled,
.gyr-notes > button:disabled { opacity: .6; cursor: wait; }

.gyr-notes textarea {
  width: 100%;
  margin: 0 0 8px;
  padding: 11px;
  border: 1px solid var(--gyr-line);
  border-radius: 11px;
  background: #fff;
  color: var(--gyr-navy);
  resize: vertical;
}

.gyr-note { margin-bottom: 8px; padding: 12px; border: 1px solid #e8edf4; border-radius: 11px; background: #fff; }
.gyr-note p { margin: 0 0 5px; white-space: pre-line; }
.gyr-note small { color: var(--gyr-muted); }
.gyr-empty { padding: 36px; border-radius: 15px; color: var(--gyr-muted); background: var(--gyr-soft); text-align: center; }

@media (max-width: 600px) {
  .gyr-login-shell { min-height: 72vh; margin: 0 -10px; padding: 20px 12px; border-radius: 16px; }
  .gyr-login { padding: 27px 22px; border-radius: 19px; }
  .gyr-login-mark { width: 56px; height: 56px; margin-bottom: 20px; border-radius: 15px; }
  .gyr-app-header { align-items: flex-start; gap: 12px; margin-bottom: 16px; padding: 15px 14px; border-radius: 15px; }
  .gyr-app-header h2 { max-width: 215px; margin: 2px 0 4px; font-size: clamp(22px, 7vw, 28px); line-height: 1.08; }
  .gyr-app-header p { font-size: 13px; line-height: 1.3; }
  .gyr-app-header .gyr-eyebrow { font-size: 10px; }
  .gyr-logout { min-height: 38px; padding: 7px 9px; font-size: 11px; }
  .gyr-grid { grid-template-columns: 1fr; }
  .gyr-card { padding: 17px; }
  .gyr-detail { margin: 18px -17px -17px; padding: 17px; }
  .gyr-meta { grid-template-columns: 1fr; }
  .gyr-meta-wide { grid-column: auto; }
}
