/* This file is for your main application CSS */
@import "./phoenix.css";

/* Alerts and form errors used by phx.new */
html {
  font-size: 15px;
}

.alert {
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  border-radius: 4px;
}
.alert-info {
  color: #31708f;
  background-color: #d9edf7;
  border-color: #bce8f1;
}
.alert-warning {
  color: #8a6d3b;
  background-color: #fcf8e3;
  border-color: #faebcc;
}
.alert-danger {
  color: #a94442;
  background-color: #f2dede;
  border-color: #ebccd1;
}
.alert p {
  margin-bottom: 0;
}
.alert:empty {
  display: none;
}
.invalid-feedback {
  color: #a94442;
  display: block;
  margin: -1rem 0 2rem;
}

.app-page,
.auth-page {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-page {
  background: #f8fafc;
  color: #243142;
  font-size: 1rem;
  line-height: 1.5;
}

.app-shell {
  min-height: 100vh;
  background: #f8fafc;
}

.app-sidebar {
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
}

.app-sidebar-inner {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.25rem 1rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  color: #0f172a;
  text-decoration: none;
}

.app-brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 0.9rem;
  border: 1px solid #dbeafe;
  background: #eff6ff;
}

.app-brand-logo {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
}

.app-brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.app-brand-wordmark {
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #0f172a;
}

.app-brand-subtitle {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.app-sidebar-compact-btn,
.app-sidebar-mobile-btn {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  line-height: 1;
  cursor: pointer;
}

.app-sidebar-compact-btn:hover,
.app-sidebar-mobile-btn:hover {
  border-color: #94a3b8;
  color: #0f172a;
  background: #f8fafc;
}

.app-sidebar-compact-btn svg,
.app-sidebar-mobile-btn svg {
  width: 1rem;
  height: 1rem;
}

.app-sidebar-compact-btn .icon-expand,
.app-sidebar-mobile-btn .icon-close {
  display: none;
}

.app-nav {
  padding: 1rem 0.75rem;
  display: grid;
  gap: 0.35rem;
}

.app-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.9rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 0.9rem;
  color: #334155;
  text-decoration: none;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.app-nav-item:hover {
  background: #f8fbff;
  border-color: #bfdbfe;
  color: #0f172a;
}

.app-nav-item-active {
  background: #e0f2fe;
  border-color: #93c5fd;
  color: #0f3d66;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  color: inherit;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
}

.nav-copy {
  min-width: 0;
  display: inline-flex;
  align-items: center;
}

.nav-label {
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.app-sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 0.75rem;
  padding: 1rem 0.75rem 1rem;
  border-top: 1px solid #e2e8f0;
}

.app-account {
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.9rem;
  background: #f8fafc;
}

.app-account-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.app-account-email {
  font-size: 0.98rem;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.app-signout-form {
  margin: 0;
  width: 100%;
  display: block;
}

.app-signout-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  border-radius: 0.85rem;
  padding: 0.8rem 0.95rem;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
}

.app-signout-btn:hover {
  border-color: #94a3b8;
  color: #0f172a;
  background: #f8fafc;
}

.app-signout-icon {
  width: 1rem;
  height: 1rem;
  display: inline-flex;
}

.app-signout-icon svg {
  width: 100%;
  height: 100%;
}

.app-main {
  min-width: 0;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(12px);
}

.app-header-copy {
  min-width: 0;
}

.app-header-kicker {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.app-header-title {
  margin: 0.2rem 0 0;
  font-size: 1.32rem;
  font-weight: 650;
  color: #1f2937;
}

.app-main-content {
  padding: 1.5rem 0;
}

.app-main-content .container {
  width: min(1100px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 0 0 3rem;
}

.ui-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid #dbeafe;
  border-radius: 0.9rem;
  padding: 0.78rem 1.08rem;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ui-button:hover {
  text-decoration: none;
}

.ui-button:disabled,
.ui-button.phx-click-loading,
.ui-button.phx-submit-loading {
  opacity: 0.72;
  cursor: wait;
}

.ui-button-primary {
  background: #ffffff;
  border-color: #bfdbfe;
  color: #234565;
}

.ui-button-primary:hover {
  background: #f8fbff;
  border-color: #93c5fd;
  color: #1f3957;
}

.ui-button-secondary {
  background: #ffffff;
  border-color: #dbeafe;
  color: #475569;
}

.ui-button-secondary:hover {
  background: #f8fbff;
  border-color: #bfdbfe;
  color: #1f2937;
}

.ui-button-success {
  background: #f4fbf6;
  border-color: #d7f0db;
  color: #3f6944;
}

.ui-button-success:hover {
  background: #e4f2e7;
  border-color: #b3d1b6;
  color: #345739;
}

.ui-button-danger {
  background: #fff6f5;
  border-color: #f1d8d3;
  color: #8c4d45;
}

.ui-button-danger:hover {
  background: #f8e8e5;
  border-color: #dfb2aa;
  color: #77413a;
}

.app-toast-stack {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 60;
  width: min(92vw, 30rem);
  display: grid;
  gap: 0.75rem;
}

.app-toast {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 1rem;
  background: #ffffff;
  padding: 0.95rem 1rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.app-toast-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.app-toast-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.app-toast-copy {
  min-width: 0;
  display: grid;
  gap: 0.25rem;
  font-size: 0.94rem;
  line-height: 1.45;
}

.app-toast-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-toast-dismiss {
  border: 0;
  background: transparent;
  color: currentColor;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem;
}

.app-toast-dismiss:hover {
  opacity: 0.7;
}

#app-sidebar-overlay {
  display: none;
}

.app-main-content .space-y-2 > * + * {
  margin-top: 0.5rem;
}

.app-main-content .space-y-4 > * + * {
  margin-top: 1rem;
}

.app-main-content .space-y-5 > * + * {
  margin-top: 1.25rem;
}

.app-main-content .space-y-6 > * + * {
  margin-top: 1.5rem;
}

.sourcing-step-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.sourcing-callout-card,
.sourcing-decision-card {
  background: #ffffff;
  border-color: #d7dee8;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.sourcing-callout-head,
.sourcing-decision-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.sourcing-section-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #475569;
}

.sourcing-section-copy {
  margin-top: 0.45rem;
  max-width: 58rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #64748b;
}

.sourcing-summary-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.sourcing-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.1rem;
  border: 1px solid #d7dee8;
  border-radius: 999px;
  background: #f8fafc;
  padding: 0.35rem 0.8rem;
  white-space: nowrap;
}

.sourcing-summary-pill-label {
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.sourcing-summary-pill-value {
  font-size: 0.86rem;
  font-weight: 600;
  color: #0f172a;
}

.sourcing-panel-card {
  border: 1px solid #d7dee8;
  border-radius: 1rem;
  background: #f8fafc;
  padding: 0.9rem;
}

.sourcing-panel-kicker {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #475569;
}

.sourcing-summary-grid {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sourcing-summary-tile {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.9rem;
  border: 1px solid #d7dee8;
  border-radius: 0.9rem;
  background: #ffffff;
  padding: 0.8rem 0.9rem;
}

.sourcing-summary-tile-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.sourcing-summary-tile-value {
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.3;
  color: #0f172a;
  margin-left: auto;
  text-align: right;
}

.sourcing-step-dot {
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.sourcing-step-dot.is-done {
  background: #dcfce7;
  color: #166534;
}

.sourcing-step-dot.is-pending {
  background: #e2e8f0;
  color: #475569;
}

@media (max-width: 1279px) {
  .sourcing-decision-head,
  .sourcing-callout-head {
    flex-direction: column;
  }

  .sourcing-summary-pills {
    justify-content: flex-start;
  }
}

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

.portfolio-product-card {
  overflow: hidden;
  border: 2px solid #2f6fb6;
  border-radius: 1.75rem;
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 100%);
  box-shadow: 0 18px 42px rgba(15, 79, 143, 0.12);
}

.portfolio-product-card.is-active {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.24), 0 18px 42px rgba(15, 79, 143, 0.16);
}

.portfolio-product-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.portfolio-svg-card {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}

.portfolio-svg-card-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 7 / 10;
  overflow: hidden;
}

.portfolio-svg-card-frame > .portfolio-svg-card {
  position: absolute;
  inset: 0;
}

.portfolio-template-card-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 7 / 9.95;
}

.portfolio-template-card-bg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.portfolio-template-card-layer {
  position: absolute;
  inset: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #08264a;
}

.portfolio-template-top-score,
.portfolio-template-top-decision,
.portfolio-template-top-category {
  position: absolute;
  top: 8.5%;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.05;
  text-align: center;
}

.portfolio-template-top-score {
  left: 9.5%;
  width: 18%;
  font-size: clamp(1rem, 2vw, 1.6rem);
}

.portfolio-template-top-decision {
  left: 35.5%;
  width: 24%;
  font-size: clamp(0.75rem, 1.4vw, 1.02rem);
}

.portfolio-template-top-category {
  left: 72.2%;
  width: 19%;
  font-size: clamp(0.72rem, 1.35vw, 0.96rem);
}

.portfolio-template-title {
  position: absolute;
  left: 35%;
  top: 17.2%;
  width: 52%;
  font-size: clamp(1.2rem, 2.8vw, 2.35rem);
  font-weight: 800;
  line-height: 1.02;
}

.portfolio-template-subtitle {
  position: absolute;
  left: 35%;
  top: 23.5%;
  width: 50%;
  font-size: clamp(0.74rem, 1.5vw, 1.1rem);
  font-style: italic;
  color: #3d5875;
  line-height: 1.2;
}

.portfolio-template-id,
.portfolio-template-date {
  position: absolute;
  left: 45.3%;
  width: 38%;
  border-bottom: 1px solid #7b92aa;
  padding-bottom: 0.12rem;
  font-size: clamp(0.66rem, 1.2vw, 0.92rem);
  font-weight: 600;
  color: #08264a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portfolio-template-id {
  top: 29.9%;
}

.portfolio-template-date {
  top: 33.2%;
}

.portfolio-template-financial-value,
.portfolio-template-other-value {
  position: absolute;
  font-size: clamp(0.7rem, 1.25vw, 0.96rem);
  font-weight: 600;
  color: #08264a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portfolio-template-financial-value {
  left: 63.6%;
  width: 17%;
  text-align: left;
}

.portfolio-template-financial-value.unit-cost { top: 37.05%; }
.portfolio-template-financial-value.sale-price { top: 41.2%; }
.portfolio-template-financial-value.profit { top: 45.3%; }
.portfolio-template-financial-value.margin { top: 49.45%; }
.portfolio-template-financial-value.investment { top: 53.6%; }
.portfolio-template-financial-value.capital-fit { top: 57.75%; }

.portfolio-template-score-stars {
  position: absolute;
  left: 31.2%;
  width: 17%;
  font-size: clamp(0.8rem, 1.45vw, 1.08rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #1f6fb2;
  white-space: nowrap;
}

.portfolio-template-score-stars.score-demand { top: 66.05%; }
.portfolio-template-score-stars.score-competition { top: 69.55%; }
.portfolio-template-score-stars.score-expandability { top: 73%; }
.portfolio-template-score-stars.score-risk { top: 76.5%; }
.portfolio-template-score-stars.score-capital-efficiency { top: 80%; }

.portfolio-template-score-total {
  position: absolute;
  left: 39.6%;
  top: 84.2%;
  width: 12%;
  font-size: clamp(0.76rem, 1.3vw, 1rem);
  font-weight: 700;
  color: #08264a;
  white-space: nowrap;
}

.portfolio-template-other-value {
  left: 80%;
  width: 14%;
}

.portfolio-template-other-value.other-supplier { top: 66.05%; }
.portfolio-template-other-value.other-moq { top: 69.55%; }
.portfolio-template-other-value.other-lead-time { top: 73%; }
.portfolio-template-other-value.other-weight-size { top: 76.5%; }
.portfolio-template-other-value.other-return-risk { top: 80%; }
.portfolio-template-other-value.other-compliance { top: 83.45%; }

.portfolio-template-notes-text {
  position: absolute;
  left: 8%;
  top: 90.8%;
  width: 83%;
  min-height: 4.2%;
  font-size: clamp(0.68rem, 1.18vw, 0.9rem);
  line-height: 1.28;
  color: #08264a;
  overflow: hidden;
}

.portfolio-product-card-top {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  background: linear-gradient(135deg, #1f6fb2 0%, #0f4f8f 100%);
  color: #ffffff;
}

.portfolio-product-card-top-cell {
  padding: 1.15rem 1rem;
  border-left: 1px solid rgba(205, 228, 248, 0.48);
}

.portfolio-product-card-top-cell:first-child {
  border-left: 0;
}

.portfolio-product-card-top-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}

.portfolio-product-card-top-value {
  margin-top: 0.5rem;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.portfolio-product-card-top-value.is-small {
  font-size: 1rem;
  line-height: 1.25;
}

.portfolio-product-card-identity {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.25rem;
  align-items: start;
}

.portfolio-product-card-image-box {
  min-height: 9rem;
  border: 2px dashed #2f6fb6;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  gap: 0.4rem;
  color: #2f6fb6;
  text-align: center;
  background: rgba(255, 255, 255, 0.66);
  padding: 0.85rem;
}

.portfolio-product-card-image-mark {
  font-size: 2.4rem;
  line-height: 1;
}

.portfolio-product-card-image-copy {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.portfolio-product-card-identity-copy {
  min-width: 0;
}

.portfolio-product-card-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.05;
  color: #08264a;
}

.portfolio-product-card-subtitle {
  margin-top: 0.35rem;
  font-size: 1rem;
  font-style: italic;
  color: #3d5875;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.portfolio-product-card-meta-row {
  display: grid;
  grid-template-columns: 4rem 0.75rem minmax(0, 1fr);
  gap: 0.35rem;
  margin-top: 0.75rem;
  align-items: center;
}

.portfolio-product-card-meta-label,
.portfolio-product-card-row-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1e5f9e;
}

.portfolio-product-card-meta-sep,
.portfolio-product-card-row-sep {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e5f9e;
  text-align: center;
}

.portfolio-product-card-meta-value,
.portfolio-product-card-row-value {
  min-width: 0;
  border-bottom: 1px solid #9bbddd;
  padding-bottom: 0.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #08264a;
  overflow-wrap: anywhere;
}

.portfolio-product-card-section {
  margin: 0 0.9rem;
  border: 2px solid #2f6fb6;
  border-radius: 1.15rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.86);
}

.portfolio-product-card-section-head,
.portfolio-product-card-panel-head {
  background: linear-gradient(135deg, #1f6fb2 0%, #0f4f8f 100%);
  color: #ffffff;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.75rem 1rem;
}

.portfolio-product-card-financial-grid {
  display: grid;
}

.portfolio-product-card-financial-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 1rem minmax(0, 1fr);
  gap: 0.6rem;
  align-items: center;
  padding: 0.78rem 1rem;
  border-top: 1px solid #c6d8ec;
}

.portfolio-product-card-financial-row:first-child {
  border-top: 0;
}

.portfolio-product-card-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  padding: 0.9rem;
}

.portfolio-product-card-panel {
  border: 2px solid #2f6fb6;
  border-radius: 1.15rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.86);
}

.portfolio-product-card-score-row,
.portfolio-product-card-other-row,
.portfolio-product-card-total-row {
  display: grid;
  align-items: center;
  gap: 0.6rem;
  padding: 0.72rem 1rem;
  border-top: 1px solid #c6d8ec;
}

.portfolio-product-card-score-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.portfolio-product-card-other-row {
  grid-template-columns: minmax(0, 1fr) 1rem minmax(0, 1fr);
}

.portfolio-product-card-total-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.portfolio-product-card-score-row:first-child,
.portfolio-product-card-other-row:first-child,
.portfolio-product-card-total-row:first-child {
  border-top: 0;
}

.portfolio-product-card-stars,
.portfolio-product-card-total-value {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #1f6fb2;
  white-space: nowrap;
}

.portfolio-product-card-notes {
  margin: 0 0.9rem 0.9rem;
  border: 2px dashed #86b9e6;
  border-radius: 1.3rem;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.95rem 1rem 1.1rem;
}

.portfolio-product-card-notes-head {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1e5f9e;
}

.portfolio-product-card-notes-body {
  margin-top: 0.6rem;
  min-height: 2.6rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #08264a;
}

.portfolio-product-card-footer {
  padding: 0 0.9rem 0.9rem;
}

.portfolio-product-card-status-strip,
.portfolio-product-card-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.portfolio-product-card-reasons {
  margin-top: 0.55rem;
}

.portfolio-product-card-chip,
.portfolio-product-card-reason {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid #c6d8ec;
  background: rgba(255, 255, 255, 0.88);
  padding: 0.35rem 0.7rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

.portfolio-product-card-chip.is-active {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(14, 165, 233, 0.14);
  color: #075985;
}

.portfolio-product-card-chip.is-neutral,
.portfolio-product-card-reason {
  color: #3d5875;
}

.portfolio-product-card-timeline {
  margin-top: 0.7rem;
  width: 100%;
  border: 1px solid #c6d8ec;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.86);
  display: grid;
  gap: 0.45rem;
  padding: 0.8rem 0.9rem;
  text-align: left;
  color: #08264a;
  cursor: pointer;
}

.portfolio-product-card-timeline-summary {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
}

.portfolio-product-card-timeline-time {
  font-size: 0.75rem;
  color: #5a718b;
}

.review-image-card {
  min-height: 100%;
}

.review-image-link {
  display: block;
  text-decoration: none;
}

.review-image-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 0.85rem;
  border: 1px solid #dbe2ea;
  background: #f8fafc;
}

.review-image-empty {
  min-height: 12rem;
  display: grid;
  place-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 0.85rem;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.94rem;
  text-align: center;
  padding: 1rem;
}

.app-main-content .grid {
  display: grid;
}

.app-main-content .grid-cols-1 {
  grid-template-columns: minmax(0, 1fr);
}

.app-main-content .grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-main-content .grid-cols-\[1fr\,1fr\,1fr\] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.app-main-content .gap-2 {
  gap: 0.5rem;
}

.app-main-content .gap-3 {
  gap: 0.75rem;
}

.app-main-content .gap-4 {
  gap: 1rem;
}

.app-main-content .flex {
  display: flex;
}

.app-main-content .inline-flex {
  display: inline-flex;
}

.app-main-content .items-center {
  align-items: center;
}

.app-main-content .items-start {
  align-items: flex-start;
}

.app-main-content .justify-between {
  justify-content: space-between;
}

.app-main-content .justify-end {
  justify-content: flex-end;
}

.app-main-content .flex-wrap {
  flex-wrap: wrap;
}

.app-main-content .w-full {
  width: 100%;
}

.app-main-content .min-w-0 {
  min-width: 0;
}

.app-main-content .max-w-7xl {
  max-width: 80rem;
}

.app-main-content .mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.app-main-content .px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.app-main-content .px-3,
.app-main-content .px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.app-main-content .py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.app-main-content .py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.app-main-content .py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.app-main-content .py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.app-main-content .p-2 {
  padding: 0.75rem;
}

.app-main-content .p-3 {
  padding: 1rem;
}

.app-main-content .p-4 {
  padding: 1.25rem;
}

.app-main-content .p-8 {
  padding: 2rem;
}

.app-main-content .mt-1 {
  margin-top: 0.25rem;
}

.app-main-content .mt-2 {
  margin-top: 0.5rem;
}

.app-main-content .mt-3 {
  margin-top: 0.75rem;
}

.app-main-content .mt-4 {
  margin-top: 1rem;
}

.app-main-content .mb-1 {
  margin-bottom: 0.25rem;
}

.app-main-content .mb-2 {
  margin-bottom: 0.5rem;
}

.app-main-content .mb-3 {
  margin-bottom: 0.75rem;
}

.app-main-content .mb-4 {
  margin-bottom: 1rem;
}

.app-main-content .ml-2 {
  margin-left: 0.5rem;
}

.app-main-content .block {
  display: block;
}

.app-main-content .text-left {
  text-align: left;
}

.app-main-content .text-center {
  text-align: center;
}

.app-main-content .text-xs {
  font-size: 0.94rem;
  line-height: 1.45;
}

.app-main-content .text-sm {
  font-size: 1.08rem;
  line-height: 1.55;
}

.app-main-content .text-lg {
  font-size: 1.28rem;
  line-height: 1.4;
}

.app-main-content .text-xl {
  font-size: clamp(2.1rem, 3vw, 2.8rem);
  line-height: 1.1;
}

.app-main-content .text-2xl {
  font-size: clamp(2.45rem, 3.2vw, 3.4rem);
  line-height: 1.08;
}

.app-main-content .font-medium {
  font-weight: 600;
}

.app-main-content .font-semibold {
  font-weight: 700;
}

.app-main-content .font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.app-main-content .uppercase {
  text-transform: uppercase;
}

.app-main-content .tracking-wide {
  letter-spacing: 0.08em;
}

.app-main-content .underline {
  text-decoration: underline;
}

.app-main-content .break-all {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.app-main-content .rounded {
  border-radius: 0.45rem;
}

.app-main-content .rounded-lg {
  border-radius: 0.85rem;
}

.app-main-content .rounded-xl {
  border-radius: 1rem;
}

.app-main-content .rounded-full {
  border-radius: 999px;
}

.app-main-content .rounded-t-xl {
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

.app-main-content .border {
  border: 1px solid #e2e8f0;
}

.app-main-content .border-dashed {
  border-style: dashed;
}

.app-main-content .border-slate-600,
.app-main-content .border-slate-700,
.app-main-content .border-slate-800 {
  border-color: #dbe2ea;
}

.app-main-content .border-blue-500 {
  border-color: #60a5fa;
}

.app-main-content .border-amber-700 {
  border-color: #fbbf24;
}

.app-main-content .border-red-700,
.app-main-content .border-red-800 {
  border-color: #fca5a5;
}

.app-main-content .border-green-700 {
  border-color: #86efac;
}

.app-main-content .bg-slate-700,
.app-main-content .bg-slate-800,
.app-main-content .bg-slate-900 {
  background: #ffffff;
}

.app-main-content .bg-slate-950 {
  background: #f8fafc;
}

.app-main-content .bg-blue-600 {
  background: #2563eb;
}

.app-main-content .bg-green-600 {
  background: #15803d;
}

.app-main-content .bg-red-600 {
  background: #dc2626;
}

.app-main-content .bg-amber-700 {
  background: #b45309;
}

.app-main-content .bg-green-700 {
  background: #15803d;
}

.app-main-content .bg-red-700 {
  background: #b91c1c;
}

.app-main-content .bg-green-950 {
  background: #f0fdf4;
}

.app-main-content .bg-red-950 {
  background: #fef2f2;
}

.app-main-content .bg-amber-950 {
  background: #fffbeb;
}

.app-main-content .text-white,
.app-main-content .text-slate-50,
.app-main-content .text-slate-100,
.app-main-content .text-slate-200 {
  color: #0f172a;
}

.app-main-content .text-slate-300 {
  color: #475569;
}

.app-main-content .text-slate-400 {
  color: #64748b;
}

.app-main-content .text-blue-300 {
  color: #2563eb;
}

.app-main-content .text-red-200,
.app-main-content .text-red-300 {
  color: #b91c1c;
}

.app-main-content .text-green-200,
.app-main-content .text-green-300 {
  color: #166534;
}

.app-main-content .text-amber-200,
.app-main-content .text-amber-300 {
  color: #92400e;
}

.app-main-content .shadow-sm {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.app-main-content .shadow-lg {
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.app-main-content .hover\:border-slate-500:hover {
  border-color: #94a3b8;
}

.app-main-content .hover\:bg-blue-500:hover {
  background: #1d4ed8;
}

.app-main-content .hover\:bg-green-500:hover {
  background: #166534;
}

.app-main-content .hover\:bg-red-500:hover {
  background: #b91c1c;
}

.app-main-content .hover\:bg-slate-600:hover {
  background: #f8fafc;
}

.app-main-content .hover\:text-red-100:hover {
  color: #7f1d1d;
}

.app-main-content .hover\:text-green-100:hover {
  color: #14532d;
}

.app-main-content .min-h-11 {
  min-height: 2.75rem;
}

.app-main-content input,
.app-main-content select,
.app-main-content textarea {
  font: inherit;
}

.app-main-content input[type="file"] {
  color: #334155;
}

.app-main-content input[type="file"]::file-selector-button {
  margin-right: 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  background: #ffffff;
  color: #0f172a;
  padding: 0.65rem 0.95rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.app-main-content input[type="file"]::file-selector-button:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.app-main-content input[class],
.app-main-content textarea[class],
.app-main-content select[class] {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
}

.app-main-content input[class]:focus,
.app-main-content textarea[class]:focus,
.app-main-content select[class]:focus {
  outline: 2px solid rgba(37, 99, 235, 0.2);
  border-color: #93c5fd;
}

.app-main-content button[class*="bg-"],
.app-main-content button[class*="app-"],
.app-main-content a[class*="bg-"] {
  color: #ffffff;
}

.app-main-content button.bg-slate-700 {
  background: #334155;
}

.app-main-content .fixed {
  position: fixed;
}

.app-main-content .sticky {
  position: sticky;
}

.app-main-content .bottom-0 {
  bottom: 0;
}

.app-main-content .bottom-4 {
  bottom: 1rem;
}

.app-main-content .top-4 {
  top: 1rem;
}

.app-main-content .right-4 {
  right: 1rem;
}

.app-main-content .left-1\/2 {
  left: 50%;
}

.app-main-content .-translate-x-1\/2 {
  transform: translateX(-50%);
}

.app-main-content .z-50 {
  z-index: 50;
}

.app-main-content .max-h-\[60vh\] {
  max-height: 60vh;
}

.app-main-content .overflow-y-auto {
  overflow-y: auto;
}

.app-main-content .pr-1 {
  padding-right: 0.25rem;
}

@media (min-width: 1024px) {
  .app-shell {
    display: grid;
    grid-template-columns: clamp(15rem, 15vw, 17.5rem) minmax(0, 1fr);
  }

  .app-shell.sidebar-compact {
    grid-template-columns: 5.75rem minmax(0, 1fr);
  }

  .app-sidebar-mobile-btn {
    display: none;
  }

  .app-shell.sidebar-compact .app-brand-copy,
  .app-shell.sidebar-compact .nav-copy,
  .app-shell.sidebar-compact .app-account,
  .app-shell.sidebar-compact .app-signout-label {
    display: none;
  }

  .app-shell.sidebar-compact .app-sidebar-compact-btn .icon-collapse {
    display: none;
  }

  .app-shell.sidebar-compact .app-sidebar-compact-btn .icon-expand {
    display: inline;
  }

  .app-shell.sidebar-compact .app-nav-item,
  .app-shell.sidebar-compact .app-signout-btn {
    justify-content: center;
  }
}

@media (min-width: 768px) {
  .app-main-content .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-main-content .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .app-main-content .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .app-main-content .md\:inline {
    display: inline;
  }

  .app-main-content .md\:px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .app-main-content .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .app-main-content .lg\:grid-cols-\[18rem\,minmax\(0\,1fr\)\] {
    grid-template-columns: 18rem minmax(0, 1fr);
  }

  .app-main-content .lg\:col-span-2 {
    grid-column: span 2 / span 2;
  }

  .app-main-content .lg\:col-span-4 {
    grid-column: span 4 / span 4;
  }
}

@media (max-width: 1023px) {
  .app-shell {
    display: block;
  }

  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(84vw, 18rem);
    z-index: 80;
    transform: translateX(-110%);
    transition: transform 0.2s ease;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
  }

  .app-sidebar-compact-btn {
    display: none;
  }

  .app-header {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .app-main-content .container {
    width: min(100%, calc(100% - 1.5rem));
    padding-bottom: 2rem;
  }

  body.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .app-sidebar-mobile-btn .icon-menu {
    display: none;
  }

  body.sidebar-open .app-sidebar-mobile-btn .icon-close {
    display: inline;
  }

  body.sidebar-open #app-sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 70;
  }

  body.sidebar-open {
    overflow: hidden;
  }
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(circle at top, rgba(30, 41, 59, 0.65), transparent 42%),
    #020617;
}

.auth-shell {
  width: 100%;
  display: flex;
  justify-content: center;
}

.auth-card {
  width: min(28rem, 100%);
  border: 1px solid #334155;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.95);
  padding: 1.5rem;
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.35);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.75rem;
}

.auth-brand-mark {
  width: 3.25rem;
  height: 3.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1.1rem;
  border: 1px solid rgba(147, 197, 253, 0.32);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.16), rgba(191, 219, 254, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-brand-logo {
  width: 2.35rem;
  height: 2.35rem;
  object-fit: contain;
}

.auth-brand-copy {
  min-width: 0;
}

.auth-kicker {
  margin: 0;
  color: #93c5fd;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-card h1 {
  margin: 0;
  font-size: 2rem;
  color: #f8fafc;
}

.auth-copy {
  margin: 0.75rem 0 1.25rem;
  color: #94a3b8;
}

.auth-alert {
  border: 1px solid #7f1d1d;
  background: #450a0a;
  color: #fecaca;
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.auth-form {
  display: grid;
  gap: 0.75rem;
}

.auth-form label {
  font-size: 0.88rem;
  color: #cbd5e1;
}

.auth-form input {
  width: 100%;
  border: 1px solid #475569;
  border-radius: 0.75rem;
  background: #020617;
  color: #f8fafc;
  padding: 0.8rem 0.9rem;
}

.auth-form input:focus {
  outline: 2px solid #60a5fa;
  outline-offset: 1px;
}

.auth-submit {
  margin-top: 0.35rem;
  border: 1px solid #3b82f6;
  background: #2563eb;
  color: #eff6ff;
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  font-weight: 700;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0.95rem 1.25rem;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #dbeafe;
  backdrop-filter: blur(14px);
}

.app-topbar-line {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
}

.app-brand {
  flex: 0 0 auto;
}

.app-topbar-context {
  display: grid;
  gap: 0.1rem;
  flex: 0 1 12rem;
  max-width: 12rem;
  min-width: 0;
}

.app-topbar-user {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  margin-left: auto;
}

.app-topbar-actions {
  margin-top: 0.85rem;
}

.app-topbar-context .app-header-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}

.app-topbar-context .app-header-title {
  font-size: 1.08rem;
  line-height: 1.2;
}

.googly-eyes {
  display: inline-flex;
  align-items: center;
  gap: 0.16rem;
  letter-spacing: normal;
}

.googly-eye {
  position: relative;
  width: 0.92rem;
  height: 0.92rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.18);
}

.googly-eye-pupil {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 999px;
  background: #0f172a;
  transform: translate(-50%, -50%);
  transition: transform 0.08s ease-out;
}

.app-nav-top {
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  justify-content: flex-start;
  min-width: 0;
  margin-left: 0;
}

.app-nav-top .app-nav-item {
  flex: 0 0 auto;
  width: auto;
  min-height: auto;
  min-width: 0;
  padding: 0.52rem 0.82rem;
  border-radius: 0.9rem;
  background: #ffffff;
  border-color: #dbeafe;
  gap: 0.35rem;
  font-size: 0.9rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.app-nav-top .nav-icon {
  width: 0.9rem;
  height: 0.9rem;
}

.app-nav-top .nav-label {
  font-size: 0.88rem;
  font-weight: 600;
}

.app-nav-menu {
  position: relative;
  flex: 0 0 auto;
}

.app-nav-menu summary {
  list-style: none;
}

.app-nav-menu summary::-webkit-details-marker {
  display: none;
}

.app-nav-menu summary.app-nav-item {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.app-nav-menu-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
  text-decoration: none;
}

.app-nav-menu-caret {
  width: 0.9rem;
  height: 0.9rem;
  color: #64748b;
}

.app-nav-menu-caret svg {
  width: 100%;
  height: 100%;
}

.app-nav-menu[open] .app-nav-menu-caret {
  transform: rotate(180deg);
}

.app-nav-menu-panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  min-width: 15rem;
  padding: 0.6rem;
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  z-index: 30;
}

.app-nav-menu-option {
  display: grid;
  gap: 0.1rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.7rem;
  color: #334155;
  text-decoration: none;
}

.app-nav-menu-option-command {
  display: inline-flex;
  align-items: center;
  padding: 0.48rem 0.65rem;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
}

.app-nav-menu-option:hover {
  background: #f8fafc;
  color: #0f172a;
}

.app-nav-menu-option-primary {
  margin-bottom: 0.25rem;
}

.app-nav-menu-option-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: inherit;
}

.app-nav-menu-option-meta,
.app-nav-menu-empty {
  font-size: 0.76rem;
  color: #64748b;
}

.app-nav-menu-empty {
  padding: 0.55rem 0.65rem;
}

.app-user-menu {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
}

.app-user-summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.42rem 0.68rem;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.app-user-summary::-webkit-details-marker {
  display: none;
}

.app-user-avatar {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  border: 1px solid #dbe3ee;
  background: #f8fafc;
  flex: 0 0 auto;
}

.app-user-avatar-large {
  width: 2.1rem;
  height: 2.1rem;
}

.app-user-summary-copy {
  display: none;
}

.app-user-summary-email {
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-user-summary-caret {
  width: 0.9rem;
  height: 0.9rem;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.app-user-summary-caret svg {
  width: 100%;
  height: 100%;
}

.app-user-menu[open] .app-user-summary {
  border-color: #bfdbfe;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.08);
}

.app-user-menu[open] .app-user-summary-caret {
  transform: rotate(180deg);
}

.app-user-menu-panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  width: min(14rem, calc(100vw - 1.5rem));
  min-width: 0;
  max-width: calc(100vw - 1.5rem);
  box-sizing: border-box;
  overflow: hidden;
  padding: 0.65rem;
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.app-user-menu-identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}

.app-user-menu-email {
  font-size: 0.9rem;
  color: #475569;
  word-break: break-word;
}

.app-user-menu-link {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 2.7rem;
  margin-bottom: 0.45rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  background: #f8fafc;
  color: #334155;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.app-user-menu-link:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
  text-decoration: none;
}

.app-signout-btn {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  justify-content: flex-start;
  padding: 0.65rem 0.8rem;
  font-size: 0.92rem;
}

.app-main-content {
  padding: 1.5rem;
}

.competitor-detail-form-grid {
  display: grid;
  gap: 1rem;
}

.competitor-detail-input,
.competitor-detail-textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.85rem;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.98rem;
  line-height: 1.4;
}

.competitor-detail-input {
  min-height: 2.8rem;
  padding: 0.7rem 0.9rem;
}

.competitor-detail-textarea {
  padding: 0.8rem 0.9rem;
}

.competitor-image-stage {
  min-height: 11rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #f8fafc;
  padding: 0.75rem;
}

.competitor-image-frame {
  width: 160px;
  height: 160px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 0.9rem;
  background: #ffffff;
  padding: 0.5rem;
}

.competitor-image-preview {
  max-width: 144px;
  max-height: 144px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.competitor-thumb-button {
  width: 4rem;
  height: 4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 0.85rem;
  background: #ffffff;
  padding: 0.25rem;
}

.competitor-thumb-button-active {
  border-color: #60a5fa;
  box-shadow: 0 0 0 1px #60a5fa inset;
}

.competitor-thumb-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.competitor-field-grid {
  display: grid;
  gap: 0.75rem;
}

.competitor-field-tile {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #ffffff;
  padding: 0.9rem 0.95rem;
}

.competitor-field-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.competitor-field-value {
  margin-top: 0.35rem;
  font-size: 0.98rem;
  font-weight: 500;
  color: #0f172a;
  overflow-wrap: anywhere;
}

@media (min-width: 768px) {
  .competitor-detail-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .competitor-detail-span-2 {
    grid-column: span 2;
  }

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

@media (min-width: 1040px) {
  .app-topbar-context {
    max-width: 12rem;
  }
}

@media (min-width: 1280px) {
  .competitor-field-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1380px) {
  .app-topbar {
    padding: 0.9rem 1rem;
  }

  .app-topbar-line {
    align-items: flex-start;
  }

  .app-topbar-spacer {
    display: none;
  }

  .app-topbar-context {
    max-width: none;
  }

  .app-nav-top {
    width: 100%;
  }

  .app-nav-top .app-nav-item {
    justify-content: center;
  }

  .app-nav-menu-panel {
    left: auto;
    right: 0;
  }

  .app-main-content {
    padding: 1rem;
  }
}

@media (max-width: 900px) {
  .app-topbar {
    padding: 0.85rem 0.85rem;
  }

  .app-topbar-line {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .app-brand-copy,
  .app-topbar-context {
    width: 100%;
  }

  .app-topbar-user {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .app-nav-top {
    width: 100%;
    gap: 0.35rem;
  }

  .app-user-menu {
    margin-left: 0;
  }
}
