@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&family=Space+Grotesk:wght@400;600;700&display=swap');

:root {
  --ink: #1b1f2a;
  --ink-muted: #5c6474;
  --surface: #ffffff;
  --surface-alt: #fff5f7;
  --accent: #d7263d;
  --accent-2: #a01224;
  --accent-3: #f6b7c2;
  --stroke: #f0d7dd;
  --shadow: 0 24px 48px rgba(215, 38, 61, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Nunito', 'Trebuchet MS', sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #fff5f7 0%, #ffffff 50%, #fff0f3 100%);
  min-height: 100vh;
}

body::before,
body::after {
  content: '';
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  z-index: -1;
  filter: blur(10px);
  opacity: 0.7;
}

body::before {
  top: -140px;
  right: -120px;
  background: radial-gradient(circle, rgba(215, 38, 61, 0.35) 0%, rgba(215, 38, 61, 0) 70%);
}

body::after {
  bottom: -160px;
  left: -120px;
  background: radial-gradient(circle, rgba(160, 18, 36, 0.28) 0%, rgba(160, 18, 36, 0) 70%);
}

h1,
h2,
h3 {
  font-family: 'Space Grotesk', 'Trebuchet MS', sans-serif;
  margin-top: 0;
}

.login-intro h1 {
  margin-bottom: 0;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.1;
  max-width: 22ch;
  overflow-wrap: break-word;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 32px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(215, 38, 61, 0.12);
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 16px rgba(215, 38, 61, 0.25);
}

.brand-title {
  font-weight: 700;
  font-size: 1.1rem;
}

.brand-sub {
  color: var(--ink-muted);
  font-size: 0.85rem;
}

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

.nav a {
  text-decoration: none;
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(215, 38, 61, 0.08);
  font-weight: 600;
}

.nav a:hover {
  background: rgba(215, 38, 61, 0.16);
}

.nav a.ghost {
  background: rgba(215, 38, 61, 0.12);
  color: var(--accent-2);
}

.content {
  width: 100%;
  margin: 0 auto;
  padding: 32px;
  flex: 1;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  animation: fadeUp 0.6s ease both;
}

.hero p {
  color: var(--ink-muted);
  margin: 0;
}

.hero-actions {
  display: flex;
  gap: 12px;
}

.card {
  background: var(--surface);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--stroke);
  animation: fadeUp 0.6s ease both;
}

.form-card {
  max-width: 900px;
}

.form-steps {
  display: grid;
  gap: 18px;
}

.step-block {
  border: 1px solid var(--stroke);
  border-radius: 20px;
  padding: 18px;
  background: #fff;
  display: grid;
  gap: 12px;
}

.step-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.step-title {
  margin: 0;
  font-size: 1.05rem;
}

.step-desc {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.modal-panel .step-number {
  width: 28px;
  height: 28px;
  font-size: 0.85rem;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px;
  align-items: stretch;
  margin-top: 16px;
}

.login-intro {
  position: relative;
  padding: 36px;
  border-radius: 32px;
  background: linear-gradient(180deg, #ffffff, #fff5f7);
  border: 1px solid rgba(215, 38, 61, 0.18);
  box-shadow: 0 18px 40px rgba(215, 38, 61, 0.12);
  display: grid;
  gap: 24px;
  animation: fadeUp 0.6s ease both;
  overflow: hidden;
}

.login-intro,
.login-point {
  width: 100%;
  max-width: 100%;
}

.login-intro::before {
  content: '';
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215, 38, 61, 0.25) 0%, rgba(215, 38, 61, 0) 70%);
  top: -120px;
  left: -80px;
}

.login-intro::after {
  content: '';
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(160, 18, 36, 0.22) 0%, rgba(160, 18, 36, 0) 70%);
  bottom: -120px;
  right: -90px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.login-logo {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  font-size: 1.6rem;
}

.login-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  color: var(--ink-muted);
  font-weight: 700;
}

.login-lead {
  font-size: 1.05rem;
  color: var(--ink);
  max-width: 520px;
  position: relative;
  z-index: 1;
}

.login-points {
  display: grid;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.login-point {
  padding: 14px 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(215, 38, 61, 0.12);
  display: grid;
  gap: 6px;
}

.login-points {
  padding: 0 6px;
}

.login-point span {
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.login-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.login-panel {
  padding: 32px;
  display: grid;
  gap: 20px;
  position: relative;
  border-radius: 26px;
  border: 1px solid rgba(215, 38, 61, 0.2);
  border-top: 4px solid var(--accent);
  box-shadow: 0 18px 40px rgba(215, 38, 61, 0.12);
  animation: fadeUp 0.6s ease both;
}

.login-panel::before {
  content: none;
}

.login-panel-header h2 {
  margin-bottom: 6px;
}

.login-panel-header {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(215, 38, 61, 0.12);
}

.login-panel .button {
  width: 100%;
}

.login-panel-note {
  font-size: 0.9rem;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: var(--ink);
}

input,
select,
textarea {
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--surface);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(215, 38, 61, 0.18);
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 20px rgba(215, 38, 61, 0.22);
}

.button.ghost {
  background: transparent;
  color: var(--accent-2);
  border: 1px solid rgba(215, 38, 61, 0.3);
  box-shadow: none;
}

.button.small {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.button.danger {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 20px rgba(215, 38, 61, 0.22);
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.table-wrap {
  border-radius: 24px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  animation: fadeUp 0.6s ease both;
}

.table-wrap.compact {
  box-shadow: none;
  border: none;
  background: transparent;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.table.responsive {
  min-width: 0;
}

.table.compact {
  min-width: 100%;
}

.table th,
.table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
}

.table th {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--surface-alt);
}

.table tbody tr {
  border-bottom: 1px solid var(--stroke);
}

.table tbody tr:hover {
  background: rgba(215, 38, 61, 0.05);
}

.table a {
  color: var(--accent-2);
  font-weight: 700;
  text-decoration: none;
}

.table a:hover {
  text-decoration: underline;
}

.filter-card {
  margin-bottom: 24px;
}

.filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  align-items: end;
}

.filter-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.inline-form {
  display: inline-flex;
  margin-left: 6px;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 200;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 31, 42, 0.45);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--stroke);
}

.modal-title {
  margin: 0;
}

.modal-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.65rem;
  color: var(--ink-muted);
  font-weight: 700;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.modal-open {
  overflow: hidden;
}

.issue {
  display: grid;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  background: rgba(215, 38, 61, 0.06);
  border: 1px solid rgba(215, 38, 61, 0.15);
}

.chip::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--chip-color, var(--accent-2));
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.photo-thumb {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  display: block;
}

.photo-preview {
  margin-top: 10px;
  max-width: 260px;
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.photo-meta {
  display: grid;
  gap: 8px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
}

.urgency-low {
  background: #fff0f3;
  color: #a01224;
}

.urgency-medium {
  background: #ffd6dd;
  color: #8e0f20;
}

.urgency-high {
  background: #ffb3bf;
  color: #7a0c1b;
}

.urgency-critical {
  background: #ff8fa3;
  color: #5f0814;
}

.flash {
  padding: 12px 16px;
  border-radius: 16px;
  margin-bottom: 20px;
  font-weight: 600;
}

.flash.success {
  background: #fff0f3;
  color: #a01224;
}

.flash.error {
  background: #ffccd5;
  color: #7a0c1b;
}

.empty-state {
  padding: 32px;
}

.muted {
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.mono {
  font-family: 'Space Grotesk', 'Trebuchet MS', sans-serif;
}

.footer {
  padding: 24px 32px 32px;
  display: flex;
  justify-content: space-between;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .content {
    padding: 24px;
  }

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

  .table {
    min-width: 760px;
  }

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

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

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

  .hero-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .hero-actions .button {
    flex: 1 1 auto;
  }

  .filter-form {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .table.responsive thead {
    display: none;
  }

  .table.responsive,
  .table.responsive tbody,
  .table.responsive tr,
  .table.responsive td {
    display: block;
    width: 100%;
  }

  .table.responsive tr {
    background: var(--surface);
    border: 1px solid var(--stroke);
    border-radius: 20px;
    padding: 12px 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
  }

  .table.responsive td {
    padding: 10px 0;
    border-bottom: 1px dashed var(--stroke);
  }

  .table.responsive td:last-child {
    border-bottom: none;
  }

  .table.responsive td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    font-weight: 700;
    margin-bottom: 6px;
  }

  .table.responsive .button.small {
    width: 100%;
    justify-content: center;
  }

  .inline-form {
    display: block;
    margin: 8px 0 0;
  }

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

@media (max-width: 600px) {
  .content {
    padding: 20px;
  }

  .actions {
    flex-direction: column;
  }

  .filter-actions {
    width: 100%;
  }

  .login-shell {
    gap: 24px;
  }

  .login-intro,
  .login-panel {
    padding: 24px;
  }

  .login-intro h1 {
    font-size: 1.6rem;
    max-width: 20ch;
  }

  .login-point {
    padding: 12px 14px;
  }

  .step-block {
    padding: 16px;
  }

  .modal {
    padding: 12px;
  }

  .modal-panel {
    max-height: 100vh;
    border-radius: 16px;
    padding: 20px;
  }

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

  .modal-close {
    align-self: flex-end;
  }
}
