:root {
  font-family: "Segoe UI", sans-serif;
  color: #182338;
  background: #f5f7fb;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top left, rgba(30, 98, 219, 0.08), transparent 26%),
    #f5f7fb;
}

a {
  color: #0c55ce;
  text-decoration: none;
}

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

button {
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  padding: 0.82rem 1.2rem;
  background: #0f4abd;
  color: #fff;
  font-weight: 600;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  border: 1px solid #ccd7e7;
  background: #fff;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

label {
  display: grid;
  gap: 0.45rem;
  color: #364a69;
}

.layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 2rem 1.4rem;
  border-right: 1px solid #dbe3f0;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

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

.sidebar-nav {
  display: grid;
  gap: 0.6rem;
}

.sidebar-nav a,
.sidebar-nav button {
  text-align: left;
  background: transparent;
  color: #324966;
  padding: 0.72rem 0.82rem;
}

.sidebar-nav a.active {
  border-radius: 12px;
  background: #e9f1ff;
  color: #0f4abd;
}

.content {
  padding: 2rem;
}

.auth-toolbar,
.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.sidebar-footer {
  margin-top: auto;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.24rem;
  border-radius: 999px;
  background: #edf3ff;
}

.language-button {
  background: transparent;
  color: #3d5375;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.9rem;
}

.language-button.active {
  background: #0f4abd;
  color: #fff;
}

.page,
.auth-wrap {
  display: grid;
  gap: 1.4rem;
}

.auth-wrap {
  min-height: 100vh;
  place-items: center;
  padding: 2rem;
}

.card,
.auth-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(205, 216, 232, 0.9);
  border-radius: 24px;
  box-shadow: 0 20px 58px rgba(20, 53, 115, 0.08);
}

.auth-card {
  width: min(440px, 100%);
  padding: 2rem;
  display: grid;
  gap: 1rem;
}

.card {
  padding: 1.5rem;
}

.page-header,
.section-header,
.page-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

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

.line-items {
  display: grid;
  gap: 0.75rem;
}

.line-item-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr) 140px auto;
  gap: 0.7rem;
  align-items: center;
}

.secondary-button {
  background: #eaf0fb;
  color: #0f4abd;
}

.ghost-button {
  background: transparent;
  color: #0f4abd;
  padding-inline: 0.4rem;
}

.muted,
.eyebrow {
  color: #60728e;
}

.eyebrow {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.status {
  padding: 0.95rem 1rem;
  border-radius: 14px;
}

.status.error {
  background: #fff1f1;
  color: #8f3535;
}

.status.info {
  background: #edf5ff;
  color: #1f59af;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
}

.results-table th,
.results-table td {
  text-align: left;
  padding: 0.9rem 0.72rem;
  border-bottom: 1px solid #e7eef8;
  vertical-align: top;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.summary-item {
  border-radius: 18px;
  padding: 1rem;
  background: #f4f8ff;
  display: grid;
  gap: 0.38rem;
}

h1,
h2,
p {
  margin: 0;
}

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

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid #dbe3f0;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .content,
  .auth-wrap {
    padding: 1rem;
  }

  .form-grid,
  .line-item-row,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .results-table {
    display: block;
    overflow-x: auto;
  }
}
