/**
 * RevNext SaaS app UI — tokens from hotel-revenue (revnext.in marketing)
 * @see docs/design-system-revnext.md
 * @see /Users/manishkumar/RevNext/hotel-revenue/components/header.tsx
 */
:root {
  --rn-primary: #2563eb;
  --rn-primary-hover: #155dfc;
  --rn-primary-soft: #eff6ff;
  --rn-primary-muted: #bfdbfe;
  --rn-ink: #171717;
  --rn-ink-muted: #64748b;
  --rn-ink-subtle: #94a3b8;
  --rn-bg: #fafafa;
  --rn-surface: #ffffff;
  --rn-sidebar: #ffffff;
  --rn-sidebar-hover: #f4f4f5;
  --rn-sidebar-active: #eff6ff;
  --rn-border: #e1e1e1;
  --rn-radius: 0.75rem;
  --rn-radius-sm: 0.5rem;
  --rn-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --rn-shadow-lg: 0 12px 28px rgba(37, 99, 235, 0.12);
  --rn-accent-green: #22c55e;
  --rn-accent-yellow: #eab308;
  --rn-accent-blue: #60a5fa;
  --rn-success: #059669;
  --rn-success-bg: #ecfdf5;
  --rn-warning: #d97706;
  --rn-warning-bg: #fffbeb;
  --rn-danger: #dc2626;
  --rn-danger-bg: #fef2f2;
  --rn-font: "Inter", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.rn-app {
  margin: 0;
  font-family: var(--rn-font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--rn-ink);
  background: var(--rn-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--rn-primary);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  color: var(--rn-primary-hover);
  text-decoration: underline;
}

/* —— Auth shell (login / signup) —— */
.rn-auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 900px) {
  .rn-auth {
    grid-template-columns: 1fr;
  }
  .rn-auth__brand {
    display: none;
  }
}

.rn-auth__brand {
  background: linear-gradient(
      145deg,
      rgba(15, 23, 42, 0.95) 0%,
      rgba(30, 58, 138, 0.88) 45%,
      rgba(37, 99, 235, 0.75) 100%
    ),
    linear-gradient(to bottom right, #0f172a, #1e3a8a);
  color: #fff;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.rn-auth__brand::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0);
  background-size: 40px 40px;
  pointer-events: none;
}

.rn-auth__brand > * {
  position: relative;
  z-index: 1;
}

.rn-auth__brand img {
  max-width: 10rem;
  height: auto;
  margin-bottom: 2rem;
  filter: brightness(0) invert(1);
}

.rn-auth__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
  width: fit-content;
}

.rn-auth__eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
}

.rn-auth__brand h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem;
}

.rn-auth__brand p {
  opacity: 0.9;
  max-width: 28rem;
  margin: 0;
}

.rn-auth__stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.rn-auth__stat strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
}

.rn-auth__stat span {
  font-size: 0.8rem;
  opacity: 0.8;
}

.rn-auth__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* —— App shell —— */
.rn-shell {
  display: flex;
  min-height: 100vh;
}

.rn-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--rn-sidebar);
  color: var(--rn-ink);
  border-right: 1px solid var(--rn-border);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0;
}

.rn-sidebar__logo {
  padding: 0 1.25rem 1.5rem;
  border-bottom: 1px solid var(--rn-border);
  margin-bottom: 1rem;
}

.rn-sidebar__logo img {
  max-width: 7.75rem;
  height: auto;
  display: block;
}

.rn-sidebar__logo span {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--rn-ink-muted);
  margin-top: 0.35rem;
  letter-spacing: -0.02em;
}

.rn-nav {
  list-style: none;
  margin: 0;
  padding: 0 0.75rem;
  flex: 1;
}

.rn-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--rn-radius-sm);
  color: var(--rn-ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: -0.02em;
  transition: background 0.15s, color 0.15s;
}

.rn-nav a:hover {
  background: var(--rn-sidebar-hover);
  color: var(--rn-primary-hover);
  text-decoration: none;
}

.rn-nav a.is-active {
  background: var(--rn-sidebar-active);
  color: var(--rn-primary);
  font-weight: 600;
}

.rn-sidebar__foot {
  padding: 1rem 1.25rem 0;
  border-top: 1px solid var(--rn-border);
  font-size: 0.8rem;
  color: var(--rn-ink-muted);
}

.rn-sidebar__foot a {
  color: var(--rn-primary);
  font-weight: 500;
  display: block;
  margin-top: 0.25rem;
}

.rn-sidebar__foot a:hover {
  color: var(--rn-primary-hover);
}

.rn-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rn-topbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rn-border);
  padding: 0.85rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 40;
}

.rn-topbar__user {
  font-size: 0.875rem;
  color: var(--rn-ink-muted);
}

.rn-content {
  padding: 1.75rem;
  flex: 1;
}

/* —— Typography —— */
.rn-page-title {
  font-size: 1.65rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--rn-ink);
  letter-spacing: -0.02em;
}

.rn-page-lead {
  margin: 0 0 1.5rem;
  color: var(--rn-ink-muted);
  font-size: 0.95rem;
}

.rn-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rn-primary);
  margin-bottom: 0.35rem;
}

/* —— Cards & grid —— */
.rn-card {
  background: var(--rn-surface);
  border: 1px solid var(--rn-border);
  border-radius: var(--rn-radius);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--rn-shadow);
  margin-bottom: 1.25rem;
}

.rn-card h2,
.rn-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.rn-grid {
  display: grid;
  gap: 1rem;
}

.rn-grid--3 {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.rn-grid--2 {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.rn-stat {
  background: var(--rn-surface);
  border: 1px solid var(--rn-border);
  border-radius: var(--rn-radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--rn-shadow);
}

.rn-stat__value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--rn-primary);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.rn-stat--green .rn-stat__value {
  color: #16a34a;
}

.rn-stat--amber .rn-stat__value {
  color: #ca8a04;
}

.rn-stat__label {
  font-size: 0.8rem;
  color: var(--rn-ink-muted);
  margin-top: 0.25rem;
}

/* —— Property cards —— */
.rn-property {
  border: 1px solid var(--rn-border);
  border-radius: var(--rn-radius);
  padding: 1.25rem;
  background: var(--rn-surface);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.rn-property:hover {
  border-color: var(--rn-primary-muted);
  box-shadow: var(--rn-shadow-lg);
}

.rn-property h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.rn-property__domain {
  font-size: 0.85rem;
  color: var(--rn-ink-muted);
  margin-bottom: 0.85rem;
}

.rn-property__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* —— Badges —— */
.rn-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rn-badge--success {
  background: var(--rn-success-bg);
  color: var(--rn-success);
}

.rn-badge--warning {
  background: var(--rn-warning-bg);
  color: var(--rn-warning);
}

.rn-badge--muted {
  background: #f1f5f9;
  color: var(--rn-ink-muted);
}

.rn-badge--primary {
  background: var(--rn-primary-soft);
  color: var(--rn-primary);
}

.rn-badge--pill {
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: -0.02em;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #dbeafe;
}

/* —— Banner —— */
.rn-banner {
  border-radius: var(--rn-radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.rn-banner--trial {
  background: linear-gradient(90deg, var(--rn-primary-soft), #fff);
  border: 1px solid var(--rn-primary-muted);
}

/* —— Buttons —— */
.rn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--rn-radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}

.rn-btn:hover {
  text-decoration: none;
}

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

.rn-btn--primary:hover {
  background: var(--rn-primary-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--rn-shadow-lg);
}

/* Marketing-site pill CTA (header.tsx, pricing/page.tsx) */
.rn-btn--pill {
  border-radius: 9999px;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  min-height: 48px;
}

.rn-btn--pill.rn-btn--primary:hover {
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.25);
}

.rn-btn--secondary {
  background: var(--rn-surface);
  color: var(--rn-primary);
  border: 1px solid var(--rn-primary);
}

.rn-btn--secondary:hover {
  background: var(--rn-primary-soft);
  color: var(--rn-primary-hover);
}

.rn-btn--ghost {
  background: transparent;
  color: var(--rn-ink-muted);
  border: 1px solid var(--rn-border);
}

.rn-btn--ghost:hover {
  background: #f8fafc;
  color: var(--rn-ink);
}

.rn-btn--sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

/* Legacy shop.css button aliases */
.btn.btn-primary,
a.btn.btn-primary,
button.btn.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--rn-radius-sm);
  background: var(--rn-primary);
  color: #fff;
  border: none;
  text-decoration: none;
  cursor: pointer;
}

.btn.btn-secondary,
a.btn.btn-secondary {
  display: inline-flex;
  padding: 0.55rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--rn-radius-sm);
  background: var(--rn-surface);
  color: var(--rn-primary);
  border: 1px solid var(--rn-primary);
  text-decoration: none;
}

/* —— Forms —— */
.rn-form p {
  margin-bottom: 1.1rem;
}

.rn-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rn-ink);
  margin-bottom: 0.35rem;
}

.rn-form input[type="text"],
.rn-form input[type="email"],
.rn-form input[type="password"],
.rn-form input[type="url"],
.rn-form input[type="number"],
.rn-form select,
.rn-form textarea {
  width: 100%;
  max-width: 32rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  font-family: inherit;
  border: 1px solid var(--rn-border);
  border-radius: var(--rn-radius-sm);
  background: #fff;
  color: var(--rn-ink);
}

.rn-form input:focus,
.rn-form select:focus,
.rn-form textarea:focus {
  outline: none;
  border-color: var(--rn-primary);
  box-shadow: 0 0 0 3px var(--rn-primary-soft);
}

.rn-form .helptext {
  display: block;
  font-size: 0.75rem;
  color: var(--rn-ink-muted);
  margin-top: 0.3rem;
}

.rn-form ul.errorlist {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  color: var(--rn-danger);
}

/* —— Feature list —— */
.rn-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.rn-features li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--rn-border);
}

.rn-features li:last-child {
  border-bottom: none;
}

/* —— Plan pricing —— */
.rn-plan {
  border: 1px solid var(--rn-border);
  border-radius: var(--rn-radius);
  padding: 1.35rem;
  background: var(--rn-surface);
}

.rn-plan--current {
  border-color: var(--rn-primary);
  box-shadow: 0 0 0 2px var(--rn-primary-soft), var(--rn-shadow-lg);
}

.rn-plan__price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rn-primary);
}

.rn-plan__price span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--rn-ink-muted);
}

.rn-plan__name {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.rn-plan__desc {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: var(--rn-ink-muted);
}

.rn-plan__tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--rn-primary-soft);
  color: var(--rn-primary);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.rn-plan__features {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  font-size: 0.875rem;
}

.rn-plan__features li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--rn-border);
}

.rn-plan__features li:last-child {
  border-bottom: none;
}

.rn-plan__cta {
  margin-top: auto;
}

.rn-pricing {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.rn-pricing .rn-plan {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.saas-card {
  background: var(--rn-surface);
  border: 1px solid var(--rn-border);
  border-radius: var(--rn-radius);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--rn-shadow);
  margin-bottom: 1.25rem;
}

/* —— Code / pre —— */
.rn-pre {
  background: #f8fafc;
  border: 1px solid var(--rn-border);
  border-radius: var(--rn-radius-sm);
  padding: 1rem;
  font-size: 0.8rem;
  overflow-x: auto;
}

/* —— Messages —— */
.rn-messages {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.rn-messages li {
  padding: 0.75rem 1rem;
  border-radius: var(--rn-radius-sm);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.rn-messages .success {
  background: var(--rn-success-bg);
  color: #047857;
}

.rn-messages .error {
  background: var(--rn-danger-bg);
  color: var(--rn-danger);
}

.rn-messages .warning {
  background: var(--rn-warning-bg);
  color: #b45309;
}

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

.rn-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--rn-ink-muted);
}

.rn-empty h3 {
  color: var(--rn-ink);
  margin-bottom: 0.5rem;
}

/* —— Pricing grid —— */
.rn-pricing {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.rn-plan {
  position: relative;
  display: flex;
  flex-direction: column;
}

.rn-plan__tag {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--rn-primary-soft);
  color: var(--rn-primary);
}

.rn-plan__name {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--rn-ink);
}

.rn-plan__desc {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--rn-ink-muted);
  line-height: 1.5;
  min-height: 2.75rem;
}

.rn-plan__price span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--rn-ink-muted);
}

.rn-plan__features {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  flex: 1;
  display: grid;
  gap: 0.45rem;
}

.rn-plan__features li {
  font-size: 0.875rem;
  color: var(--rn-ink);
  padding-left: 1.25rem;
  position: relative;
}

.rn-plan__features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--rn-success);
  font-weight: 700;
}

.rn-plan__cta {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rn-auth__panel-header {
  display: none;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--rn-border);
  background: var(--rn-surface);
}

.rn-auth__panel-header img {
  height: 2rem;
  width: auto;
}

@media (max-width: 900px) {
  .rn-auth__panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .rn-auth {
    grid-template-rows: auto 1fr;
  }

  .rn-auth__panel {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
  }

  .rn-auth__panel .rn-card {
    margin: 1.5rem;
    max-width: none !important;
    width: auto !important;
  }
}

.rn-auth__footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rn-border);
  font-size: 0.8rem;
  color: var(--rn-ink-muted);
  text-align: center;
}

/* —— Mobile app shell —— */
@media (max-width: 900px) {
  .rn-shell {
    flex-direction: column;
  }

  .rn-sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .rn-sidebar__logo {
    padding: 0;
    border-bottom: none;
    margin-bottom: 0;
    flex: 1 1 auto;
  }

  .rn-sidebar__logo span {
    display: none;
  }

  .rn-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0;
    flex: 1 1 100%;
    order: 3;
  }

  .rn-nav li {
    flex: 1 1 auto;
  }

  .rn-nav a {
    justify-content: center;
    font-size: 0.8rem;
    padding: 0.5rem 0.65rem;
  }

  .rn-sidebar__foot {
    border-top: none;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    order: 2;
  }

  .rn-topbar {
    padding: 0.75rem 1rem;
  }

  .rn-content {
    padding: 1.25rem;
  }

  .rn-pricing {
    grid-template-columns: 1fr;
  }
}

/* Back-compat */
.saas-muted {
  color: var(--rn-ink-muted);
  font-size: 0.875rem;
}

.saas-card {
  background: var(--rn-surface);
  border: 1px solid var(--rn-border);
  border-radius: var(--rn-radius);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--rn-shadow);
  margin-bottom: 1.25rem;
}
