/* Workflowplus – clean SaaS UI */
:root{
  --bg: #0a0a0b;
  --panel: rgba(255,255,255,.06);
  --panel-2: rgba(255,255,255,.10);
  --text: rgba(255,255,255,.93);
  --muted: rgba(255,255,255,.68);
  --line: rgba(255,255,255,.12);
  --primary: #ff8a00;
  --primary-2:#ffb200;
  --danger:#ff4d6d;
  --ok:#22c55e;
  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --radius: 16px;
  --radius-sm: 12px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 520px at 20% 10%, rgba(255,138,0,.18), transparent 60%),
    radial-gradient(760px 560px at 85% 0%, rgba(255,178,0,.12), transparent 55%),
    radial-gradient(900px 600px at 50% 105%, rgba(255,255,255,.06), transparent 65%),
    var(--bg);
}

a{ color:inherit; text-decoration:none; }
button,input,textarea,select{ font: inherit; }

.container{ width:min(1200px, calc(100% - 32px)); margin: 0 auto; }

.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(11,18,32,.65);
  border-bottom: 1px solid var(--line);
}
.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 14px 0;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight: 700;
  letter-spacing: .2px;
}
.logo{
  width:36px;height:36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 14px 40px rgba(255,138,0,.22);
}

.brand-logo{
  height: 40px;
  width: auto;
  max-width: 260px;
  display:block;
}
.brand-text{
  display:none;
}
.nav{
  display:flex;
  align-items:center;
  gap:10px;
}
.nav a{
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
}
.nav a.active, .nav a:hover{
  color: var(--text);
  background: rgba(255,255,255,.06);
}

.page{
  padding: 22px 0 46px;
}

.grid-2{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
}
@media (max-width: 900px){
  .grid-2{ grid-template-columns: 1fr; }
}

.card{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card .card-h{
  padding: 16px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
}
.card .card-b{ padding: 16px; }
.title{ font-size: 18px; font-weight: 700; margin: 0; }
.sub{ color: var(--muted); margin: 6px 0 0; font-size: 13px; line-height: 1.3; }

.row{ display:flex; gap: 12px; align-items:center; flex-wrap:wrap; }
.row.grow > *{ flex: 1 1 220px; }
.stack{ display:flex; flex-direction:column; gap: 10px; }

.input, textarea.input, select.input{
  width: 100%;
  padding: 12px 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
}
/* Ensure select dropdown options are readable on Windows */
select.input option{
  color: #0b1220;
  background: #ffffff;
}
.input::placeholder{ color: rgba(255,255,255,.45); }
.input:focus{
  border-color: rgba(255,138,0,.55);
  box-shadow: 0 0 0 4px rgba(255,138,0,.14);
}
textarea.input{ min-height: 130px; resize: vertical; line-height: 1.35; }
label{ font-size: 13px; color: var(--muted); }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
  user-select:none;
}
.btn:hover{ background: rgba(255,255,255,.10); }
.btn.primary{
  border-color: rgba(255,138,0,.30);
  background: linear-gradient(135deg, rgba(255,138,0,.22), rgba(255,178,0,.18));
}
.btn.danger{
  border-color: rgba(255,93,122,.30);
  background: rgba(255,93,122,.10);
}
.btn.ghost{
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.btn.ghost:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
  color: var(--text);
}
.btn:disabled{ opacity: .55; cursor:not-allowed; }

.spinner{
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.22);
  border-top-color: var(--primary);
  display:inline-block;
  animation: spin .8s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }

.ai-progress{
  margin-top: 14px;
  border: 1px solid rgba(255,138,0,.26);
  background: rgba(255,138,0,.10);
  border-radius: 14px;
  padding: 12px;
  color: var(--text);
  font-size: 13px;
}
.ai-progress[hidden]{ display:none; }
.ai-progress .row{ align-items:flex-start; }
.ai-progress strong{ display:block; margin-bottom: 3px; }
.ai-progress .muted{ font-size: 12px; line-height: 1.35; }
.progress-wrap{
  width: 100%;
  height: 8px;
  margin-top: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.10);
}
.progress-fill{
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transition: width .35s ease;
}
.progress-text{
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.pill{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  color: var(--muted);
  font-size: 12px;
}

.table{
  width: 100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 14px;
}
.table th, .table td{
  text-align:left;
  padding: 11px 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  vertical-align: top;
}
.table th{ color: var(--muted); font-weight: 600; font-size: 12px; }
.table tr:hover td{ background: rgba(255,255,255,.04); }

.muted{ color: var(--muted); }
.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

.toast-wrap{
  position: fixed;
  right: 14px;
  bottom: 14px;
  display:flex;
  flex-direction:column;
  gap: 10px;
  z-index: 999;
}
.toast{
  width:min(440px, calc(100vw - 28px));
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  padding: 10px 12px;
  backdrop-filter: blur(10px);
}
.toast strong{ display:block; font-size: 13px; }
.toast span{ display:block; color: var(--muted); font-size: 12px; margin-top: 2px; }

.auth-wrap{
  min-height: calc(100vh - 64px);
  display:grid;
  place-items:center;
  padding: 28px 0 46px;
}
.auth-card{ width: min(980px, calc(100% - 32px)); }
.auth-split{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
}
@media (max-width: 920px){
  .auth-split{ grid-template-columns: 1fr; }
}
.hero{
  padding: 24px;
  border-right: 1px solid rgba(255,255,255,.08);
}
@media (max-width: 920px){
  .hero{ border-right: none; border-bottom: 1px solid rgba(255,255,255,.08); }
}
.hero h1{ margin: 0; font-size: 28px; letter-spacing: .2px; }
.hero p{ margin: 10px 0 0; color: var(--muted); line-height: 1.45; }
.hero .hero-grid{
  margin-top: 16px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.hero .hero-tile{
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
}
.hero .hero-tile strong{ display:block; font-size: 13px; }
.hero .hero-tile span{ display:block; font-size: 12px; color: var(--muted); margin-top: 2px; }

.chat{
  display:flex;
  flex-direction:column;
  gap: 12px;
}
.chat-log{
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  min-height: 320px;
  max-height: 55vh;
  overflow:auto;
}

/* Scrollbars (subtle) */
.chat-log, .price-lines, textarea.input, .table, body{
  scrollbar-width: thin;
  scrollbar-color: rgba(255,138,0,.45) rgba(255,255,255,.08);
}
.chat-log::-webkit-scrollbar,
.price-lines::-webkit-scrollbar,
textarea.input::-webkit-scrollbar,
.table::-webkit-scrollbar,
body::-webkit-scrollbar{
  width: 10px;
  height: 10px;
}
.chat-log::-webkit-scrollbar-track,
.price-lines::-webkit-scrollbar-track,
textarea.input::-webkit-scrollbar-track,
.table::-webkit-scrollbar-track,
body::-webkit-scrollbar-track{
  background: rgba(255,255,255,.06);
  border-radius: 999px;
}
.chat-log::-webkit-scrollbar-thumb,
.price-lines::-webkit-scrollbar-thumb,
textarea.input::-webkit-scrollbar-thumb,
.table::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, rgba(255,138,0,.55), rgba(255,178,0,.40));
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,.25);
}
.chat-log::-webkit-scrollbar-thumb:hover,
.price-lines::-webkit-scrollbar-thumb:hover,
textarea.input::-webkit-scrollbar-thumb:hover,
.table::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover{
  background: linear-gradient(180deg, rgba(255,138,0,.75), rgba(255,178,0,.55));
}
.msg{
  display:flex;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 14px;
  margin-bottom: 10px;
}
.msg:last-child{ margin-bottom: 0; }
.msg .who{
  flex: 0 0 auto;
  width: 34px; height: 34px;
  border-radius: 12px;
  display:grid; place-items:center;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--muted);
  font-weight: 700;
}
.msg .body{ flex: 1 1 auto; }
.msg .body .meta{ color: var(--muted); font-size: 12px; }
.msg .body .text{ margin-top: 3px; white-space: pre-wrap; line-height: 1.35; }

/* Clear separation: user messages right, AI left */
.msg{
  max-width: 92%;
}
.msg.user{
  margin-left: auto;
  background: rgba(255,138,0,.12);
  border: 1px solid rgba(255,138,0,.22);
}
.msg.ai{
  margin-right: auto;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
}
.msg.user .who{
  background: rgba(255,138,0,.18);
  border-color: rgba(255,138,0,.26);
  color: rgba(255,255,255,.88);
}
.msg.ai .who{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
}
.msg.user .body .meta{
  color: rgba(255,255,255,.80);
}
.msg.ai .body .meta{
  color: rgba(255,255,255,.70);
}

/* Nice divider between messages when long blocks */
.chat-log{
  scroll-padding: 12px;
}
.chat-log .msg + .msg{
  margin-top: 10px;
}

.price{
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.price-lines{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  border-radius: 14px;
  overflow:hidden;
}
.price-lines .line{
  display:flex;
  justify-content:space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.price-lines .line:last-child{ border-bottom: none; }
.price-lines .line .l{ color: var(--muted); }
.price-lines .line.total{
  background: rgba(255,255,255,.06);
  font-weight: 800;
}

.hint{
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 14px;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
