:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #65717f;
  --line: #dde3ea;
  --paper: #fffdf9;
  --surface: #ffffff;
  --rose: #b75d69;
  --green: #4f7d6a;
  --gold: #b58b42;
  --charcoal: #2e343b;
  --focus: #2563eb;
  --shadow: 0 18px 50px rgba(31, 41, 51, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(183, 93, 105, 0.16), transparent 28rem),
    linear-gradient(135deg, #f8fbf9 0%, #fff9f4 48%, #f5f7fb 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.hidden {
  display: none !important;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-panel {
  width: min(1120px, 100%);
  min-height: 680px;
  padding: 28px;
  border: 1px solid rgba(221, 227, 234, 0.9);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.92);
  box-shadow: var(--shadow);
}

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

.brand-row.compact {
  padding: 10px 8px 24px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--green));
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
  overflow-wrap: anywhere;
}

h1 {
  margin-bottom: 0;
  font-size: 34px;
}

.auth-grid {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 430px);
  gap: 28px;
  align-items: center;
}

.auth-copy {
  max-width: 620px;
}

.auth-copy h2 {
  margin-bottom: 18px;
  font-size: 44px;
  line-height: 1.08;
}

.auth-copy p {
  max-width: 560px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.feature-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.feature-strip span,
.count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--charcoal);
  font-weight: 700;
}

.auth-card,
.filter-panel,
.sidebar-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.auth-card {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 8px;
  background: #eef2f6;
}

.tab {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 750;
}

.tab.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(31, 41, 51, 0.08);
}

label {
  display: grid;
  gap: 8px;
  color: var(--charcoal);
  font-size: 14px;
  font-weight: 750;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
}

input:focus,
select:focus,
button:focus-visible {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
  outline: none;
}

.role-field {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.role-field legend {
  padding: 0 6px;
  font-weight: 800;
}

.role-field label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
}

.role-field input {
  width: 16px;
  min-height: 16px;
}

.primary-btn,
.ghost-btn,
.icon-btn,
.nav-item {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
}

.primary-btn {
  color: #fff;
  background: var(--charcoal);
}

.primary-btn:hover {
  background: #111820;
}

.ghost-btn,
.icon-btn {
  color: var(--charcoal);
  background: var(--surface);
  border-color: var(--line);
}

.api-status {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--charcoal);
  font-weight: 800;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #94a3b8;
}

.status-dot.ok {
  background: #22c55e;
}

.status-dot.error {
  background: #ef4444;
}

.status-dot.pending {
  background: #f59e0b;
}

.security-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.form-message.ok {
  color: var(--green);
}

.form-message.error {
  color: #b42318;
}

.app-shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  padding: 0 12px;
  text-align: left;
  color: var(--muted);
  background: transparent;
}

.nav-item.active,
.nav-item:hover {
  color: var(--ink);
  background: #eef2f6;
}

.sidebar-card {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding: 14px;
}

.sidebar-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.card-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  font-weight: 900;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.88);
  backdrop-filter: blur(18px);
}

.icon-btn {
  width: 46px;
  padding: 0;
  font-size: 22px;
}

.search-wrap input {
  min-height: 48px;
}

.workspace {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 26px 24px 50px;
}

.planner-visual {
  position: relative;
  height: 156px;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(221, 227, 234, 0.9);
  background:
    linear-gradient(120deg, rgba(79, 125, 106, 0.18), rgba(183, 93, 105, 0.12)),
    #fffdf9;
}

.visual-card {
  position: absolute;
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(31, 41, 51, 0.12);
}

.camera {
  width: 210px;
  height: 108px;
  left: 7%;
  top: 24px;
  background:
    radial-gradient(circle at 66% 48%, #1f2933 0 19px, #d8dee6 20px 31px, #1f2933 32px 40px, transparent 41px),
    linear-gradient(180deg, #454e58, #1f2933);
}

.bouquet {
  width: 190px;
  height: 118px;
  right: 13%;
  top: 18px;
  background:
    radial-gradient(circle at 30% 42%, #f2b7bd 0 17px, transparent 18px),
    radial-gradient(circle at 48% 35%, #ffffff 0 20px, transparent 21px),
    radial-gradient(circle at 63% 48%, #b75d69 0 19px, transparent 20px),
    radial-gradient(circle at 44% 62%, #4f7d6a 0 27px, transparent 28px),
    linear-gradient(135deg, rgba(255,255,255,0.86), rgba(255,255,255,0.28));
}

.fabric {
  width: 240px;
  height: 86px;
  right: 32%;
  bottom: -18px;
  background:
    repeating-linear-gradient(90deg, #f5f0e8 0 28px, #cbded2 28px 56px, #ead5d6 56px 84px, #d4d9df 84px 112px);
  transform: rotate(-5deg);
}

.filter-panel {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: end;
  padding: 18px;
}

.filter-panel h2,
.results-head h2 {
  margin-bottom: 0;
  font-size: 24px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) 128px;
  gap: 12px;
  align-items: end;
}

.results-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 14px;
}

.provider-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.provider-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(31, 41, 51, 0.08);
}

.provider-image {
  height: 150px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 28% 32%, rgba(255,255,255,0.76) 0 20px, transparent 21px),
    linear-gradient(135deg, var(--tile-a), var(--tile-b));
}

.provider-body {
  padding: 14px;
}

.provider-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.provider-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.provider-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f2f5f7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.provider-body p {
  min-height: 54px;
  color: var(--muted);
  line-height: 1.5;
}

.provider-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.price {
  font-weight: 900;
  color: var(--green);
}

.small-btn {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--charcoal);
  font-weight: 800;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 960px) {
  .auth-grid,
  .filter-panel,
  .app-shell {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    min-height: auto;
  }

  .auth-copy h2 {
    font-size: 34px;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 10;
    width: 270px;
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

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

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

@media (max-width: 680px) {
  body {
    overflow-x: hidden;
  }

  .auth-shell,
  .workspace {
    padding: 16px;
  }

  .auth-panel {
    padding: 18px;
  }

  .auth-copy h2 {
    font-size: 28px;
  }

  .role-field,
  .filters,
  .provider-grid,
  .topbar {
    grid-template-columns: 1fr;
  }

  .filter-panel h2,
  .results-head h2 {
    font-size: 22px;
    line-height: 1.22;
  }

  .topbar {
    padding: 12px;
  }

  .ghost-btn {
    width: 100%;
  }

  .planner-visual {
    height: 124px;
  }

  .camera {
    left: -24px;
    transform: scale(0.78);
  }

  .bouquet {
    right: -14px;
    transform: scale(0.82);
  }
}
