.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  background: #f3f5f5;
  color: #111827;
  font-family: 'Noto Sans', system-ui, -apple-system, BlinkMacSystemFont,
    'SF Pro Text', 'Segoe UI', sans-serif;
}

.sidebar {
  background: linear-gradient(180deg, #255cc3 0%, #1d4ba0 100%);
  border-right: 1px solid rgba(15, 23, 42, 0.06);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

.sidebar-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
}

.brand-mark {
  width: 40px;
  height: 40px;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08),
    0 10px 24px rgba(15, 23, 42, 0.25);
  padding: 1px;
  background: transparent;
  object-fit: contain;
  display: block;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f9fafb;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.35);
}

.brand-subtitle {
  font-size: 0.75rem;
  color: #e5e7eb;
  text-shadow: 0 1px 1px rgba(15, 23, 42, 0.4);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.75rem;
}

.nav-section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #e5e7eb;
  text-shadow: 0 1px 1px rgba(15, 23, 42, 0.45);
}

.nav-item {
  appearance: none;
  border: 0;
  border-radius: 0.75rem;
  padding: 0.85rem 1.1rem;
  text-align: left;
  background: transparent;
  color: #f9fafb;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, transform 80ms ease;
}

.nav-item:hover:not(:disabled) {
  background: rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

.nav-item:disabled {
  opacity: 0.6;
  color: #e5edff;
  cursor: default;
}

.nav-item-active {
  background: rgba(15, 23, 42, 0.25);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: 999px;
  background: rgba(243, 245, 245, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 0, #22c55e, #255cc3 45%, #4f46e5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
}

.user-meta {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.8rem;
  color: #111827;
}

.user-role {
  font-size: 0.7rem;
  color: #6b7280;
}

.logout-button {
  appearance: none;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  padding: 0.4rem 0.8rem;
  background: #ffffff;
  color: #4b5563;
  font-size: 0.75rem;
  cursor: pointer;
  align-self: flex-start;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.logout-button:hover {
  background: #f3f4f6;
  border-color: rgba(148, 163, 184, 1);
  color: #111827;
}

/* Test-taking page styles */
.test-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37, 92, 195, 0.16), transparent 55%),
    radial-gradient(circle at top right, rgba(29, 75, 160, 0.14), transparent 55%),
    #f3f5f5;
  font-family: 'Noto Sans', system-ui, -apple-system, BlinkMacSystemFont,
    'SF Pro Text', 'Segoe UI', sans-serif;
  width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.test-header {
  background: #ffffff;
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  padding: 1rem 2rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.test-header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.test-org-name {
  font-weight: 600;
  color: #111827;
}

.test-separator {
  color: #9ca3af;
}

.test-name {
  color: #6b7280;
}

.test-main {
  max-width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.test-step {
  animation: fadeIn 0.3s ease;
}

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

.test-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 2.5rem;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.5);
  max-width: 600px;
  margin: 0 auto;
}


.test-step-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.75rem;
}

.test-step-subtitle {
  font-size: 1.05rem;
  color: #6b7280;
  margin: 0 0 2.5rem;
}

.test-progress-container {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.test-progress-bar {
  flex: 1;
  height: 8px;
  background: rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  overflow: hidden;
}

.test-progress-fill {
  height: 100%;
  background: linear-gradient(to right, #255cc3, #1d4ba0);
  border-radius: 999px;
  transition: width 0.3s ease;
  width: 0%;
}

.test-progress-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #111827;
  min-width: 45px;
  text-align: right;
}

.test-question-number {
  font-size: 0.85rem;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.test-question-text {
  font-size: 1.25rem;
  font-weight: 500;
  color: #111827;
  line-height: 1.6;
  margin: 0 0 2rem;
}

.test-slider-container {
  margin: 2rem 0;
}

.test-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.test-slider {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.3);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.test-slider:focus {
  outline: none;
  box-shadow: none;
}

.test-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(to bottom, #255cc3, #1d4ba0);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 92, 195, 0.4);
  border: 2px solid #ffffff;
}

.test-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(to bottom, #255cc3, #1d4ba0);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 92, 195, 0.4);
  border: 2px solid #ffffff;
}

.test-slider-value {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: #255cc3;
  margin-top: 1rem;
}

/* Loading spinner */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(37, 92, 195, 0.2);
  border-top-color: #255cc3;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1.5rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Results display styles */
.results-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.results-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 100%;
}

@media (min-width: 1024px) {
  .results-content-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    width: 100%;
  }
  
  .test-main {
    max-width: 100%;
    padding: 2rem 3rem;
  }
}

.results-wrapper .test-card {
  width: 100%;
  max-width: none;
}

.show-all-button {
  appearance: none;
  border: none;
  background: linear-gradient(to bottom, rgba(37, 92, 195, 0.96), rgba(29, 75, 160, 0.9));
  color: #ffffff;
  padding: 1rem 2rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, transform 80ms ease, box-shadow 120ms ease;
  margin-top: 1rem;
  width: 100%;
}

.show-all-button:hover {
  background: linear-gradient(to bottom, rgba(37, 92, 195, 1), rgba(29, 75, 160, 0.95));
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 92, 195, 0.35);
}

.show-all-button:active {
  transform: translateY(0);
}

.results-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  margin-top: 0;
  padding-top: 0;
}

.results-actions .primary-button,
.results-actions .secondary-button {
  white-space: nowrap;
}

/* Results page styles */
.results-table {
  margin-top: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.result-row {
  background: #ffffff;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

.result-row:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.result-row-expanded-active {
  border-color: rgba(37, 92, 195, 0.5);
  box-shadow: 0 4px 16px rgba(37, 92, 195, 0.15);
}

.result-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  gap: 1.5rem;
}

.result-row-name-section {
  flex: 1;
  min-width: 0;
}

.result-row-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.25rem;
}

.result-row-email {
  font-size: 0.9rem;
  color: #6b7280;
}

.result-row-top-gifts {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.result-gift-tag {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid;
  background: transparent;
}

.result-row-expanded {
  padding: 0 1.5rem 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  margin-top: 0.5rem;
  padding-top: 1.25rem;
}

.result-row-all-gifts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.result-gift-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #f9fafb;
  border-radius: 0.5rem;
  border-left: 4px solid #6B7280;
  font-size: 0.9rem;
}

.result-gift-rank {
  font-weight: 700;
  color: #6b7280;
  min-width: 30px;
}

.result-gift-name {
  flex: 1;
  color: #111827;
  font-weight: 500;
}

.result-gift-stats {
  color: #6b7280;
  font-size: 0.85rem;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
}

.results-list.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(5, auto);
  gap: 1rem;
  margin-top: 2rem;
}

.result-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 0.75rem;
  border-left: 5px solid #255cc3;
  margin-bottom: 0;
}

.results-list:not(.results-grid) .result-item {
  flex-direction: row;
  align-items: center;
  margin-bottom: 0.75rem;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.result-rank {
  font-size: 1.1rem;
  font-weight: 700;
  color: #6b7280;
  min-width: 40px;
  text-align: center;
}

.result-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.result-name {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.result-score {
  font-size: 0.85rem;
  color: #6b7280;
}

.result-bar {
  width: 100px;
  height: 8px;
  background: rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  overflow: hidden;
}

.results-list:not(.results-grid) .result-bar {
  width: 180px;
}

.result-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}

@media (max-width: 768px) {
  /* Test-taking and results pages mobile styles */
  .test-shell {
    padding: 0;
    overflow-x: hidden;
    width: 100%;
  }
  
  .test-header {
    padding: 1rem;
    font-size: 0.85rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .test-header-content {
    flex-wrap: wrap;
    gap: 0.25rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .test-org-name,
  .test-name {
    font-size: 0.8rem;
  }
  
  .test-main {
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  
  .test-card {
    padding: 1.5rem;
    max-width: 100%;
    width: 100%;
    margin: 0;
    border-radius: 0.75rem;
    box-sizing: border-box;
  }
  
  .test-step-title {
    font-size: 1.5rem;
  }
  
  .test-step-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }
  
  .test-form {
    gap: 1rem;
  }
  
  .form-field {
    gap: 0.5rem;
  }
  
  .input,
  .select {
    padding: 0.75rem;
    font-size: 1rem;
  }
  
  .test-slider-container {
    padding: 1.5rem 1rem;
  }
  
  .test-slider {
    width: 100%;
  }
  
  .test-slider-value {
    font-size: 2rem;
  }
  
  .test-question-text {
    font-size: 1.1rem;
    line-height: 1.6;
  }
  
  .test-progress-container {
    margin-bottom: 1rem;
  }
  
  .test-progress-bar {
    height: 6px;
  }
  
  .test-progress-text {
    font-size: 0.85rem;
  }
  
  .primary-button,
  .secondary-button {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    width: 100%;
  }
  
  .test-nav-buttons {
    gap: 0.75rem;
    flex-direction: column;
  }
  
  .test-nav-buttons button {
    width: 100%;
  }
  
  /* Results page mobile */
  .results-wrapper {
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    max-width: 100%;
  }
  
  .results-content-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
  }
  
  .results-wrapper .test-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 1.25rem;
  }
  
  .results-actions {
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
    box-sizing: border-box;
    padding: 0;
  }
  
  .results-actions .primary-button,
  .results-actions .secondary-button {
    width: 100%;
    box-sizing: border-box;
  }
  
  .results-list.results-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 0.75rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    margin: 1rem 0 0 0;
  }
  
  .result-item {
    padding: 0.875rem;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
  }
  
  .result-rank {
    font-size: 1rem;
    min-width: 35px;
    flex-shrink: 0;
  }
  
  .result-name {
    font-size: 0.95rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex: 1;
    min-width: 0;
  }
  
  .result-score {
    font-size: 0.8rem;
    flex-shrink: 0;
  }
  
  .result-bar {
    width: 80px;
    flex-shrink: 0;
  }
  
  .results-list:not(.results-grid) .result-bar {
    width: 100px;
    flex-shrink: 0;
  }
  
  .results-list {
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    padding: 0;
    margin: 1rem 0 0 0;
  }
  
  .results-list:not(.results-grid) .result-item {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .show-all-button {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }
  
  .loading-container {
    padding: 2rem 1rem;
  }
  
  .loading-spinner {
    width: 50px;
    height: 50px;
    border-width: 4px;
  }
  
  .loading-text {
    font-size: 1rem;
  }
  
  /* Service Opportunities Section */
  .service-gift-section {
    margin-bottom: 2rem;
  }
  
  .service-gift-section:last-child {
    margin-bottom: 0;
  }
  
  .service-gift-header {
    border-left: 5px solid;
    padding-left: 1rem;
    margin-bottom: 1rem;
  }
  
  .service-gift-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: #111827;
  }
  
  .service-opportunities-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .service-opportunity-item {
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    border-left: 3px solid rgba(148, 163, 184, 0.3);
    font-size: 0.95rem;
    color: #111827;
    transition: background 120ms ease, border-color 120ms ease;
  }
  
  .service-opportunity-item:hover {
    background: #f3f4f6;
    border-left-color: rgba(148, 163, 184, 0.6);
  }
  
  .service-opportunity-hidden {
    display: none;
  }
  
  .show-more-opportunities-btn {
    -webkit-appearance: none;
    appearance: none;
    border: 0;
    border-radius: 999px;
    background: -webkit-linear-gradient(
      top,
      rgba(37, 92, 195, 0.96),
      rgba(29, 75, 160, 0.9)
    );
    background: linear-gradient(
      to bottom,
      rgba(37, 92, 195, 0.96),
      rgba(29, 75, 160, 0.9)
    );
    color: #ffffff;
    padding: 0.55rem 1.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.28);
    margin-top: 0.75rem;
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    gap: 0.5rem;
    -webkit-transition: -webkit-transform 80ms ease, box-shadow 120ms ease, filter 120ms ease;
    transition: transform 80ms ease, box-shadow 120ms ease, filter 120ms ease;
    position: relative;
  }
  
  .show-more-opportunities-btn::after {
    content: '↓';
    font-size: 0.75rem;
    -webkit-transition: -webkit-transform 150ms ease;
    transition: transform 150ms ease;
    line-height: 1;
    display: inline-block;
  }
  
  .show-more-opportunities-btn:hover {
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
    filter: brightness(1.04);
    -webkit-filter: brightness(1.04);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.32);
  }
  
  .show-more-opportunities-btn:active {
    -webkit-transform: translateY(0);
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.28);
  }
  
  .show-more-opportunities-btn:hover::after {
    -webkit-transform: translateY(2px);
    transform: translateY(2px);
  }
  
  /* When expanded, rotate arrow */
  .show-more-opportunities-btn.expanded::after {
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg);
  }
  
  .show-more-opportunities-btn.expanded:hover::after {
    -webkit-transform: rotate(180deg) translateY(-2px);
    transform: rotate(180deg) translateY(-2px);
  }
  
  /* Form fields mobile */
  .test-form {
    gap: 1.25rem;
  }
  
  .form-row {
    flex-direction: column;
    gap: 1rem;
  }
  
  /* Expandable content mobile */
  .result-expandable {
    padding: 1rem 0.5rem;
  }
  
  .result-expandable .result-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
  }
  
  .result-actions-container {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .result-actions-container button {
    width: 100%;
  }
  
  /* Slider labels mobile */
  .test-slider-labels {
    font-size: 0.75rem;
  }
  
  /* Test navigation buttons mobile */
  .test-nav-buttons {
    margin-top: 1.5rem;
  }
  
  /* Service Opportunities mobile */
  .service-gift-section {
    margin-bottom: 1.5rem;
  }
  
  .service-gift-title {
    font-size: 1.1rem;
  }
  
  .service-opportunity-item {
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
  }
  
  .show-more-opportunities-btn {
    padding: 0.55rem 1.2rem;
    font-size: 0.8rem;
    width: 100%;
    margin-top: 0.5rem;
  }
}

.main {
  padding: 1.75rem 2.25rem;
  background:
    radial-gradient(circle at top left, rgba(37, 92, 195, 0.16), transparent 55%),
    radial-gradient(circle at top right, rgba(29, 75, 160, 0.14), transparent 55%),
    #f3f5f5;
  overflow-y: auto;
}

.main-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1.5rem;
}

.results-search-container {
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.results-search-input {
  appearance: none;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: #ffffff;
  padding: 0.65rem 1rem;
  color: #111827;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
  width: 280px;
  font-family: 'Noto Sans', system-ui, -apple-system, BlinkMacSystemFont,
    'SF Pro Text', 'Segoe UI', sans-serif;
}

.results-search-input::placeholder {
  color: #9ca3af;
}

.results-search-input:focus {
  border-color: #255cc3;
  box-shadow: 0 0 0 3px rgba(37, 92, 195, 0.1);
}

.page-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #111827;
  margin: 0;
}

.page-subtitle {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: #4b5563;
  max-width: 34rem;
}

.card {
  background: radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.95), #ffffff);
  border-radius: 1.25rem;
  border: 1px solid rgba(203, 213, 225, 0.9);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  padding: 1.5rem 1.75rem 1.75rem;
  backdrop-filter: blur(16px);
}

.card + .card {
  margin-top: 1.5rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.card-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
}

.card-subtitle {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: #6b7280;
}

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.form-field.wide {
  grid-column: 1 / -1;
}

.test-form .form-field:last-of-type {
  margin-bottom: 2rem;
}

.label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.input {
  appearance: none;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: #ffffff;
  padding: 0.85rem 1rem;
  color: #111827;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.input::placeholder {
  color: #9ca3af;
}

.input:focus {
  border-color: #255cc3;
  box-shadow: 0 0 0 1px rgba(37, 92, 195, 0.7);
  background: #ffffff;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 0;
  padding-top: 0.5rem;
}

.primary-button {
  appearance: none;
  border-radius: 999px;
  border: 0;
  padding: 0.55rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: linear-gradient(
    to bottom,
    rgba(37, 92, 195, 0.96),
    rgba(29, 75, 160, 0.9)
  );
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 80ms ease, box-shadow 120ms ease, filter 120ms ease,
    opacity 80ms ease;
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.32);
}

.primary-button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.28);
}

.primary-button:disabled {
  opacity: 0.65;
  cursor: default;
  box-shadow: none;
}

.inline-message {
  margin-top: 0.9rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.7rem;
  background: #eff6ff;
  border: 1px solid rgba(37, 92, 195, 0.6);
  font-size: 0.8rem;
  color: #1f2937;
}

.pill-table {
  margin-top: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.pill-row {
  border-radius: 999px;
  padding: 0.85rem 1.2rem 0.85rem 1.8rem;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.pill-row-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.pill-row-meta {
  font-size: 0.9rem;
  color: #6b7280;
}

.pill-row-count {
  font-size: 0.8rem;
  font-weight: 500;
  color: #111827;
}

.pill-row-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pill-row-link-button {
  appearance: none;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  padding: 0.45rem 1rem;
  background: #f9fafb;
  color: #1f2937;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease,
    transform 80ms ease;
}

.pill-row-link-button:hover {
  background: #e5edff;
  border-color: rgba(37, 92, 195, 0.8);
  color: #111827;
  transform: translateY(-1px);
}

.pill-row-start-button {
  background: linear-gradient(to bottom, rgba(37, 92, 195, 0.96), rgba(29, 75, 160, 0.9));
  color: #ffffff;
  border-color: rgba(37, 92, 195, 0.9);
  font-weight: 600;
}

.pill-row-start-button:hover {
  background: linear-gradient(to bottom, rgba(37, 92, 195, 1), rgba(29, 75, 160, 0.95));
  border-color: rgba(37, 92, 195, 1);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 92, 195, 0.35);
}

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

  .sidebar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-inline: 1rem;
  }

  .main-header {
    flex-direction: column;
    align-items: stretch;
  }

  .results-search-container {
    margin-top: 1rem;
    width: 100%;
  }

  .results-search-input {
    width: 100%;
  }

  .nav {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }

  .nav-section-label {
    display: none;
  }

  .nav-item {
    padding-inline: 0.7rem;
    font-size: 0.8rem;
  }

  .sidebar-footer {
    display: none;
  }

  .main {
    padding: 1.25rem 1rem 1.5rem;
  }

  .card {
    padding-inline: 1.1rem;
  }

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

  .form-field.wide {
    grid-column: auto;
  }

  .form-actions {
    justify-content: flex-start;
  }
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top left, rgba(37, 92, 195, 0.18), transparent 55%),
    radial-gradient(circle at bottom right, rgba(29, 75, 160, 0.14), transparent 55%),
    #f3f5f5;
  color: #111827;
  font-family: 'Noto Sans', system-ui, -apple-system, BlinkMacSystemFont,
    'SF Pro Text', 'Segoe UI', sans-serif;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  border-radius: 1.25rem;
  border: 1px solid rgba(203, 213, 225, 0.9);
  background: radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.96), #ffffff);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
  padding: 1.8rem 1.6rem 1.75rem;
  backdrop-filter: blur(16px);
}

.auth-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.auth-logo {
  width: 48px;
  height: 48px;
}

.auth-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #111827;
}

.auth-subtitle {
  margin: 0.5rem 0 1.3rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.secondary-button {
  appearance: none;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  padding: 0.55rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: transparent;
  color: #1f2933;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease,
    transform 80ms ease, opacity 80ms ease;
}

.secondary-button:hover:not(:disabled) {
  background: #f3f4f6;
  border-color: rgba(148, 163, 184, 0.9);
}

.secondary-button:disabled {
  opacity: 0.5;
  cursor: default;
}

@media (max-width: 880px) {
  .main-header {
    flex-direction: column;
    align-items: stretch;
  }

  .results-search-container {
    margin-top: 1rem;
    width: 100%;
  }

  .results-search-input {
    width: 100%;
  }
}


