/* =========================================================
   SmartBiz Automation V3
   Premium company theme + responsive business operating system
   ========================================================= */

:root {
  --deep: #030712;
  --deep-2: #07111f;
  --panel: rgba(255, 255, 255, 0.075);
  --panel-2: rgba(255, 255, 255, 0.115);
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.25);
  --text: #f8fbff;
  --soft: #b8c7dc;
  --dim: #7890ad;
  --gold: #f8c66d;
  --cyan: #45d5ff;
  --mint: #1df2b2;
  --purple: #8e6dff;
  --red: #ff5a7d;
  --green: #35f59a;
  --shadow: 0 32px 120px rgba(0, 0, 0, 0.45);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at 17% 12%, rgba(69, 213, 255, 0.15), transparent 32%),
    radial-gradient(circle at 84% 14%, rgba(248, 198, 109, 0.13), transparent 28%),
    radial-gradient(circle at 52% 80%, rgba(29, 242, 178, 0.11), transparent 32%),
    linear-gradient(135deg, #020510 0%, #07111f 44%, #0d1026 100%);
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.background-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 74%);
  opacity: 0.55;
}

.light-beam {
  position: fixed;
  pointer-events: none;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.38;
  animation: beamMove 13s ease-in-out infinite alternate;
}

.beam-a {
  top: -180px;
  left: -160px;
  background: var(--cyan);
}

.beam-b {
  bottom: -220px;
  right: -160px;
  background: var(--purple);
  animation-delay: -5s;
}

@keyframes beamMove {
  from { transform: translate3d(0,0,0) scale(1); }
  to { transform: translate3d(70px, 42px, 0) scale(1.16); }
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 92px;
  display: grid;
  grid-template-columns: 150px 1fr 150px;
  align-items: center;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 58px);
  background: rgba(3, 7, 18, 0.68);
  backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--line);
}

.brand {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-orbit {
  width: 64px;
  height: 64px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(248,198,109,0.25), rgba(69,213,255,0.18));
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 40px rgba(69, 213, 255, 0.22);
}

.brand-orbit::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 30px;
  border: 1px solid rgba(248,198,109,0.35);
  animation: orbitSpin 4s linear infinite;
}

.brand-core {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: linear-gradient(135deg, var(--gold), var(--mint), var(--cyan));
  color: #06101f;
  font-weight: 1000;
  letter-spacing: -0.05em;
}

@keyframes orbitSpin {
  from { transform: rotate(0deg) scale(1); }
  to { transform: rotate(360deg) scale(1.02); }
}

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 0.92;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: -0.055em;
  font-size: clamp(1.3rem, 3vw, 2.18rem);
}

.brand-gradient {
  background: linear-gradient(90deg, var(--gold), var(--mint), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.header-action,
.primary,
.secondary,
.danger,
.back-btn,
.link-button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  color: var(--text);
  font-weight: 1000;
  transition: 0.22s ease;
}

.header-action:hover,
.primary:hover,
.secondary:hover,
.danger:hover,
.back-btn:hover,
.link-button:hover,
.card-button:hover,
.product-card:hover,
.tool-card:hover,
.plan-card:hover {
  transform: translateY(-2px);
}

.ghost-action,
.secondary,
.back-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--line);
}

.signup-action,
.primary {
  background: linear-gradient(135deg, var(--gold), var(--mint));
  color: #05101f;
  box-shadow: 0 22px 60px rgba(29, 242, 178, 0.15);
}

.signup-action {
  justify-self: end;
}

.left-btn {
  justify-self: start;
}

.wide {
  width: 100%;
}

.danger {
  background: linear-gradient(135deg, var(--red), #ffb199);
  color: #16040a;
}

.about-panel {
  position: fixed;
  z-index: 50;
  top: 100px;
  left: 24px;
  width: min(430px, calc(100vw - 48px));
  padding: 26px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: rgba(4, 9, 20, 0.94);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
  transform: translateY(-12px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: 0.24s ease;
}

.about-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.panel-topline {
  width: 82px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--mint), var(--cyan));
  margin-bottom: 20px;
}

.about-panel h2 {
  margin: 0 0 8px;
}

.about-panel p {
  color: var(--soft);
  line-height: 1.75;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.about-tags span {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.075);
  border: 1px solid var(--line);
  color: var(--mint);
  font-weight: 900;
  font-size: 0.83rem;
}

.app {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 90px;
}

.hero {
  min-height: calc(100vh - 156px);
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 30px;
  align-items: center;
}

.lux-panel,
.auth-panel,
.panel,
.tool-card,
.product-card,
.modal {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255,255,255,0.105), rgba(255,255,255,0.045));
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.lux-panel {
  padding: clamp(26px, 4vw, 44px);
  border-radius: 42px;
  overflow: hidden;
  position: relative;
}

.lux-panel::after {
  content: "";
  position: absolute;
  inset: auto -20% -35% -20%;
  height: 220px;
  background: linear-gradient(90deg, transparent, rgba(248,198,109,0.15), rgba(29,242,178,0.13), transparent);
  transform: rotate(-6deg);
}

.eyebrow {
  color: var(--mint);
  text-transform: uppercase;
  font-weight: 1000;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
}

.hero h1,
.page-title {
  font-size: clamp(2.3rem, 6vw, 6.2rem);
  line-height: 0.88;
  letter-spacing: -0.09em;
  margin: 16px 0 18px;
}

.title-gradient {
  background: linear-gradient(90deg, #fff, var(--gold), var(--mint), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy,
.page-subtitle {
  color: var(--soft);
  line-height: 1.85;
  font-size: 1.05rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 30px;
}

.metric-tile,
.kpi-tile {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.065);
}

.metric-tile strong,
.kpi-tile strong {
  display: block;
  font-size: 1.8rem;
}

.metric-tile span,
.kpi-tile span {
  display: block;
  color: var(--soft);
  font-size: 0.84rem;
  font-weight: 800;
  margin-top: 5px;
}

.auth-panel {
  padding: clamp(24px, 4vw, 38px);
  border-radius: 34px;
}

.auth-panel h2,
.panel h2 {
  margin-top: 0;
}

.input-row {
  margin: 18px 0;
}

.input-row label {
  display: block;
  font-weight: 1000;
  margin-bottom: 8px;
}

.input-row input,
.input-row textarea,
.input-row select {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  background: rgba(2, 7, 18, 0.58);
  color: var(--text);
  transition: 0.18s ease;
}

.input-row textarea {
  min-height: 130px;
  padding-top: 14px;
  resize: vertical;
}

.input-row input:focus,
.input-row textarea:focus,
.input-row select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 5px rgba(69,213,255,0.12);
}

.auth-switch {
  text-align: center;
  margin-top: 18px;
  color: var(--soft);
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--mint);
  font-weight: 1000;
  padding: 0;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 26px;
}

.page-title {
  margin-top: 0;
  margin-bottom: 10px;
}

.status-stack {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.status-pill {
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.075);
  color: var(--mint);
  font-weight: 1000;
  white-space: nowrap;
}

.warning-pill {
  color: var(--gold);
}

.grid-2,
.grid-3,
.grid-4,
.kpi-grid,
.tool-grid,
.product-grid {
  display: grid;
  gap: 18px;
}

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

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

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

.product-card {
  min-height: 330px;
  position: relative;
  overflow: hidden;
  border-radius: 36px;
  padding: 32px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: 0.24s ease;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(69,213,255,0.18), transparent 34%),
    radial-gradient(circle at bottom left, rgba(248,198,109,0.12), transparent 36%);
  opacity: 0.85;
}

.product-card > * {
  position: relative;
  z-index: 2;
}

.product-card:hover,
.product-card:focus {
  border-color: rgba(248,198,109,0.55);
  box-shadow: 0 36px 110px rgba(69,213,255,0.18);
  transform: translateY(-7px) scale(1.01);
  outline: none;
}

.product-icon,
.tool-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  font-size: 2rem;
  background: linear-gradient(135deg, rgba(248,198,109,0.22), rgba(29,242,178,0.13));
  border: 1px solid var(--line-strong);
}

.product-card h2 {
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  letter-spacing: -0.06em;
  margin: 24px 0 12px;
}

.product-card p,
.tool-card p,
.panel p,
.microcopy {
  color: var(--soft);
  line-height: 1.7;
}

.card-button {
  display: inline-flex;
  margin-top: 16px;
  min-height: 42px;
  padding: 0 16px;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.075);
  font-weight: 1000;
  color: var(--gold);
}

.panel {
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 20px;
}

.tool-card {
  min-height: 220px;
  border-radius: var(--radius-xl);
  padding: 24px;
  color: var(--text);
  text-align: left;
  transition: 0.22s ease;
}

.tool-card:hover,
.tool-card:focus {
  border-color: rgba(29,242,178,0.6);
  outline: none;
}

.back-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.upload-zone {
  padding: 28px;
  border-radius: var(--radius-xl);
  border: 2px dashed rgba(69,213,255,0.55);
  background: rgba(69,213,255,0.075);
  text-align: center;
  margin-bottom: 22px;
}

.upload-zone input {
  width: 100%;
  max-width: 780px;
  padding: 18px;
  margin: 12px auto 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: rgba(2,7,18,0.45);
}

.file-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin: 16px 0;
}

.file-badges span {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.07);
  color: var(--soft);
  font-size: 0.83rem;
  font-weight: 900;
}

.ai-box {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(29,242,178,0.32);
  background: linear-gradient(135deg, rgba(29,242,178,0.11), rgba(69,213,255,0.055));
  line-height: 1.78;
  color: #ecfff8;
  white-space: pre-wrap;
}

.gold-box {
  border-color: rgba(248,198,109,0.42);
  background: linear-gradient(135deg, rgba(248,198,109,0.12), rgba(255,255,255,0.035));
}

.kpi-grid {
  margin: 22px 0;
}

.kpi-tile {
  overflow: hidden;
}

.kpi-tile span {
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.kpi-tile strong {
  overflow-wrap: anywhere;
}

.chart-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.22);
  margin-top: 22px;
}

canvas {
  width: 100%;
  max-width: 100%;
  height: 330px;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.045);
  margin-top: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.085);
  vertical-align: top;
}

th {
  color: var(--mint);
  background: rgba(29,242,178,0.055);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

td {
  color: var(--soft);
}

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

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

.file-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.file-item {
  padding: 13px 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.055);
  color: var(--soft);
}

.invoice-paper {
  margin-top: 22px;
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  color: #101827;
}

.invoice-paper h2,
.invoice-paper h3,
.invoice-paper p {
  color: #101827;
}

.invoice-paper table th {
  background: #eef6ff;
  color: #101827;
}

.invoice-paper table td {
  color: #253248;
}

.voice-layout {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 18px;
  align-items: start;
}

.voice-card {
  min-height: 360px;
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top, rgba(248,198,109,0.18), transparent 30%),
    radial-gradient(circle at center, rgba(69,213,255,0.16), transparent 42%),
    rgba(255,255,255,0.05);
  text-align: center;
}

.voice-avatar {
  width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--mint), var(--cyan), var(--purple));
  color: #06101f;
  font-size: 3.6rem;
  font-weight: 1000;
  animation: voicePulse 2s ease-in-out infinite;
}

@keyframes voicePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(69,213,255,0.32); }
  50% { transform: scale(1.04); box-shadow: 0 0 0 25px rgba(69,213,255,0); }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,0.72);
}

.modal {
  position: relative;
  width: min(720px, 100%);
  border-radius: 34px;
  padding: 30px;
}

.close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 1.5rem;
}

.payment-hero {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.payment-badge {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--gold), var(--mint));
  color: #06101f;
  font-weight: 1000;
  font-size: 1.45rem;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
  margin: 18px 0;
}

.plan-card {
  padding: 20px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.065);
  color: var(--text);
  text-align: left;
  transition: 0.2s ease;
}

.plan-card.active {
  border-color: var(--mint);
  box-shadow: 0 0 0 4px rgba(29,242,178,0.12);
}

.featured-plan {
  background: linear-gradient(135deg, rgba(248,198,109,0.13), rgba(29,242,178,0.08));
}

.plan-card span,
.plan-card small {
  display: block;
  color: var(--soft);
}

.plan-card strong {
  display: block;
  font-size: 2rem;
  margin: 6px 0;
  color: var(--gold);
}

.payment-details {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(248,198,109,0.32);
  background: rgba(248,198,109,0.08);
  margin: 18px 0;
}

.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(28px);
  opacity: 0;
  pointer-events: none;
  width: fit-content;
  max-width: min(720px, calc(100vw - 32px));
  padding: 16px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(3,7,18,0.96);
  color: var(--text);
  box-shadow: var(--shadow);
  font-weight: 900;
  transition: 0.24s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.export-row,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.record-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.record {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.055);
}

@media (max-width: 980px) {
  .app-header {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .signup-action,
  .left-btn {
    justify-self: center;
  }

  .hero,
  .product-grid,
  .grid-2,
  .voice-layout {
    grid-template-columns: 1fr;
  }

  .tool-grid,
  .grid-3,
  .kpi-grid,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .page-head {
    flex-direction: column;
  }

  .status-stack {
    justify-items: start;
  }
}

@media (max-width: 640px) {
  .app {
    width: min(100% - 22px, 1240px);
    padding-top: 24px;
  }

  .brand {
    flex-direction: column;
    text-align: center;
  }

  .brand-name {
    align-items: center;
  }

  .lux-panel,
  .auth-panel,
  .panel,
  .product-card,
  .modal {
    padding: 22px;
  }

  .hero-metrics,
  .tool-grid,
  .grid-3,
  .kpi-grid,
  .grid-4,
  .plan-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .about-panel {
    left: 11px;
    width: calc(100vw - 22px);
  }

  .hero h1,
  .page-title {
    font-size: clamp(2.4rem, 15vw, 4.2rem);
  }
}
