@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

:root {
  --ink: #17211d;
  --muted: #6e7772;
  --paper: #f3f0e8;
  --card: #fffdf8;
  --line: #d9d8cf;
  --green: #176b4d;
  --green-dark: #0f513a;
  --lime: #c9f27b;
  --red: #a83b32;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(201, 242, 123, .18), transparent 25rem),
    var(--paper);
  font-family: "Vazirmatn", Tahoma, sans-serif;
  min-height: 100vh;
}

button, textarea, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(100%, 430px); padding: 34px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: 10px 12px 0 rgba(23, 33, 29, .06); text-align: right; }
.auth-logo { display: block; width: 260px; max-width: 100%; height: auto; margin: 0 auto 24px; }
.auth-kicker { margin: 0 0 8px; color: var(--green); font-size: 12px; font-weight: 800; text-align: center; }
.auth-card h1 { margin: 0 0 8px; font-size: 28px; text-align: center; }
.auth-card > p:not(.auth-kicker) { margin: 0 0 24px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.auth-card form { display: grid; gap: 15px; }
.auth-card label { display: grid; gap: 7px; color: var(--ink); font-size: 13px; font-weight: 700; }
.auth-card input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 5px; background: white; direction: ltr; text-align: left; }
.auth-card button { border: 0; border-radius: 5px; padding: 12px; background: var(--green); color: white; font-weight: 800; }
.auth-card button:disabled { opacity: .6; cursor: wait; }
.auth-error { margin: 0; padding: 10px; border-right: 3px solid var(--red); background: #faece9; color: var(--red); font-size: 12px; line-height: 1.7; }

.page-shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(23, 33, 29, .12);
}

.brand {
  width: 230px;
  height: 82px;
  display: block;
  text-decoration: none;
}
.brand-logo {
  display: block;
  width: 230px;
  height: auto;
  max-width: 100%;
  mix-blend-mode: multiply;
}

.privacy-pill {
  display: flex; align-items: center; gap: 8px; color: var(--muted);
  font-size: 12px; border: 1px solid var(--line); border-radius: 99px; padding: 8px 13px;
  background: rgba(255,255,255,.45);
}
.privacy-pill span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(23,107,77,.1); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.logout-button { border: 1px solid var(--line); border-radius: 99px; padding: 8px 13px; background: transparent; color: var(--muted); font-size: 12px; }
.logout-button:hover:not(:disabled) { border-color: var(--green); color: var(--green); }
.logout-button:disabled { opacity: .55; cursor: wait; }

.hero { text-align: center; padding: 76px 16px 45px; }
.eyebrow {
  display: inline-block; color: var(--green); font-size: 12px; font-weight: 700;
  letter-spacing: .3px; padding: 7px 12px; background: rgba(201,242,123,.35); border-radius: 4px;
}
.hero h1 { margin: 20px 0 16px; font-size: clamp(38px, 6vw, 67px); line-height: 1.18; letter-spacing: -2px; }
.hero h1 em { color: var(--green); font-style: normal; position: relative; }
.hero h1 em::after { content: ""; position: absolute; height: 7px; background: var(--lime); right: 0; left: 0; bottom: 4px; z-index: -1; transform: rotate(-1deg); }
.hero p { color: var(--muted); font-size: 16px; line-height: 2; max-width: 670px; margin: 0 auto; }

.workspace-card {
  max-width: 820px; min-height: 470px; margin: 0 auto;
  padding: clamp(24px, 5vw, 48px);
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 24px 70px rgba(27, 41, 34, .09), 8px 8px 0 rgba(23,107,77,.06);
}
.step-label { color: var(--green); font-weight: 800; font-size: 11px; letter-spacing: .3px; }
.step-label.success::before { content: "✓"; margin-left: 5px; }
.workspace-card h2 { margin: 7px 0 4px; font-size: 25px; }
.section-note { color: var(--muted); margin: 0 0 26px; font-size: 13px; }

.drop-zone {
  width: 100%; min-height: 225px; border: 1.5px dashed #a6aaa5; border-radius: 5px;
  background: #f8f7f1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; color: var(--ink); transition: .2s ease;
}
.drop-zone:hover, .drop-zone.dragover { border-color: var(--green); background: rgba(201,242,123,.1); transform: translateY(-2px); }
.drop-zone strong { font-size: 16px; margin-top: 13px; }
.drop-zone > span:not(.upload-icon) { color: var(--muted); font-size: 13px; margin-top: 4px; }
.drop-zone small { color: #909690; font-size: 11px; margin-top: 14px; }
.upload-icon { width: 48px; height: 48px; background: var(--ink); display: grid; place-items: center; border-radius: 50%; }
.upload-icon svg { width: 25px; fill: none; stroke: var(--lime); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.selected-file { align-items: center; gap: 13px; margin-top: 14px; border: 1px solid var(--line); padding: 12px; border-radius: 5px; }
.selected-file:not([hidden]) { display: flex; }
.file-badge { background: var(--ink); color: var(--lime); padding: 10px 8px; border-radius: 4px; font-size: 10px; font-weight: 800; }
.selected-file > div:nth-child(2) { flex: 1; overflow: hidden; }
.selected-file strong, .selected-file span { display: block; text-align: right; }
.selected-file strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.selected-file span { color: var(--muted); font-size: 11px; }
.selected-file button { border: 0; background: transparent; font-size: 25px; color: var(--muted); }

.primary-button {
  width: 100%; border: 0; border-radius: 4px; background: var(--green); color: white;
  margin-top: 18px; padding: 14px 20px; display: flex; align-items: center; justify-content: center;
  gap: 9px; font-weight: 700; transition: .2s ease;
}
.primary-button:hover:not(:disabled) { background: var(--green-dark); transform: translateY(-1px); }
.primary-button:disabled { opacity: .38; cursor: not-allowed; }
.primary-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 2; transform: rotate(180deg); }

.loading-view, .error-view { min-height: 370px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.loading-view p, .error-view p { color: var(--muted); }
.loading-view small { color: #8d938f; margin-top: 14px; }
.loader { display: flex; align-items: flex-end; gap: 5px; height: 55px; margin-bottom: 18px; }
.loader span { width: 10px; height: 18px; background: var(--green); animation: bars 1s ease-in-out infinite; }
.loader span:nth-child(2) { height: 36px; animation-delay: .12s; }
.loader span:nth-child(3) { height: 26px; animation-delay: .24s; }
@keyframes bars { 0%,100% { transform: scaleY(.65); opacity: .55; } 50% { transform: scaleY(1.25); opacity: 1; } }
.progress { width: min(360px, 90%); height: 4px; background: #e5e4dd; overflow: hidden; margin-top: 13px; }
.progress span { display: block; width: 38%; height: 100%; background: var(--lime); animation: progress 1.4s ease-in-out infinite; }
@keyframes progress { from { transform: translateX(280%); } to { transform: translateX(-100%); } }

.result-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.text-button { border: 0; background: transparent; color: var(--green); font-weight: 700; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin: 26px 0 30px; }
.stats-grid div { background: #f3f2eb; padding: 16px; text-align: center; border-bottom: 2px solid var(--lime); }
.stats-grid strong { display: block; font-size: 24px; }
.stats-grid span { color: var(--muted); font-size: 11px; }
.share-model-button { width: 100%; margin: -12px 0 28px; border: 1px solid var(--ink); border-radius: 4px; background: transparent; color: var(--ink); padding: 12px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; }
.share-model-button:hover:not(:disabled) { background: var(--ink); color: white; }
.share-model-button:disabled { opacity: .55; cursor: wait; }
.share-model-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.data-dictionary-button { margin-top: -18px; border-color: var(--green); color: var(--green); }
.data-dictionary-button:hover:not(:disabled) { background: var(--green); }
.ai-data-dictionary-button { margin-top: -18px; border-color: #587862; color: #315e45; }
.ai-data-dictionary-button:hover:not(:disabled) { background: #315e45; color: white; }
.ai-data-dictionary-note { margin: -18px 0 28px; color: var(--muted); font-size: 11px; line-height: 1.8; text-align: center; }
.ai-data-dictionary-status { margin: -18px 0 28px; padding: 9px 12px; border-right: 3px solid var(--green); background: #f2f7ef; color: #315e45; font-size: 12px; line-height: 1.8; text-align: right; }
.fake-data-button { margin-top: -18px; border-color: #416b63; color: #28594f; }
.fake-data-button:hover:not(:disabled) { background: #28594f; color: white; }
.data-preview { margin: 4px 0 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.data-preview-heading h3 { margin: 0 0 4px; font-size: 16px; }
.data-preview-heading p { margin: 0 0 14px; color: var(--muted); font-size: 11px; }
.preview-card { margin-top: 8px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.preview-card summary { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; cursor: pointer; font-weight: 700; }
.preview-card summary span { color: var(--green); font-size: 10px; font-weight: 600; }
.preview-actions { display: flex; align-items: center; gap: 9px; }
.sample-excel-button { width: 29px; height: 29px; display: grid; place-items: center; padding: 0; border: 1px solid var(--green); border-radius: 4px; background: #fff; color: var(--green); }
.sample-excel-button:hover:not(:disabled) { background: var(--green); color: #fff; }
.sample-excel-button:disabled { opacity: .5; cursor: wait; }
.sample-excel-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.preview-scroll { direction: ltr; overflow-x: auto; border-top: 1px solid var(--line); }
.preview-scroll table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 10px; }
.preview-scroll th, .preview-scroll td { padding: 9px 11px; text-align: left; border-left: 1px solid #ecebe4; border-bottom: 1px solid #ecebe4; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.preview-scroll th { background: #f3f2eb; color: var(--ink); position: sticky; top: 0; }
.empty-preview { margin: 0; padding: 12px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.prompt-download-card { width: 100%; margin-top: 30px; padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: #f8f7f2; color: var(--ink); display: flex; align-items: center; gap: 14px; text-align: right; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.prompt-download-card:hover:not(:disabled) { border-color: var(--green); background: #f2f7ed; transform: translateY(-1px); }
.prompt-download-card:focus-visible { outline: 3px solid rgba(23,107,77,.18); outline-offset: 2px; }
.prompt-download-card:disabled { opacity: .55; cursor: wait; }
.prompt-download-icon { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 5px; background: #e7f1df; color: var(--green); display: grid; place-items: center; }
.prompt-download-icon svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.prompt-download-copy { display: grid; gap: 4px; }
.prompt-download-copy strong { font-size: 16px; }
.prompt-download-copy small { color: var(--muted); font-size: 11px; line-height: 1.7; }
.prompt-download-action { margin-inline-start: auto; flex: 0 0 auto; padding: 9px 12px; border: 1px solid var(--green); border-radius: 4px; color: var(--green); display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; }
.prompt-download-action svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.model-chat { margin-top: 38px; padding-top: 32px; border-top: 1px solid var(--line); }
.model-chat-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.model-chat-heading h3 { margin: 5px 0 4px; font-size: 20px; }
.model-chat-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.model-chat-kicker { color: var(--green); font-size: 10px; font-weight: 800; }
.model-chat-badge { background: var(--ink); color: var(--lime); border-radius: 5px; padding: 9px 11px; font-size: 12px; font-weight: 800; }
.chat-surface { margin-top: 18px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 6px; transition: border-color .2s ease, box-shadow .2s ease; }
.chat-surface:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(14, 111, 81, .08); }
.chat-messages { max-height: 420px; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; background: #f5f4ee; border-bottom: 1px solid var(--line); scrollbar-color: #9cac9f transparent; }
.chat-messages[hidden] { display: none; }
.chat-message { max-width: 88%; padding: 11px 13px; border-radius: 6px; line-height: 1.9; }
.chat-message-user { align-self: flex-start; background: var(--green); color: #fff; border-bottom-left-radius: 1px; }
.chat-message-assistant { align-self: flex-end; background: #fff; color: var(--ink); border: 1px solid #dcddd4; border-bottom-right-radius: 1px; }
.chat-message-header { min-height: 24px; margin-bottom: 5px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.chat-message-label { color: inherit; opacity: .72; font-size: 11px; font-weight: 800; }
.chat-copy-button { min-height: 24px; padding: 2px 8px; border: 1px solid currentColor; border-radius: 3px; background: transparent; color: inherit; opacity: .68; font-family: inherit; font-size: 10px; font-weight: 700; cursor: pointer; transition: opacity .15s ease, background .15s ease; }
.chat-copy-button:hover, .chat-copy-button:focus-visible { opacity: 1; }
.chat-copy-button:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.chat-copy-button.is-copied { opacity: 1; background: rgba(127, 224, 64, .14); }
.chat-message p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.chat-message p strong { font-weight: 850; }
.chat-message p code { padding: 1px 5px; border-radius: 3px; background: rgba(15, 31, 25, .08); direction: ltr; unicode-bidi: isolate; font-family: Consolas, "Courier New", monospace; font-size: .92em; }
.chat-message-user p code { background: rgba(255, 255, 255, .16); }
.clipboard-fallback { position: fixed; inset: -9999px auto auto -9999px; opacity: 0; pointer-events: none; }
.chat-typing { padding: 9px 16px; background: #f5f4ee; color: var(--muted); border-inline: 1px solid var(--line); align-items: center; gap: 5px; }
.chat-typing:not([hidden]) { display: flex; }
.chat-typing > span { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: chatPulse 1s ease-in-out infinite; }
.chat-typing > span:nth-child(2) { animation-delay: .14s; }
.chat-typing > span:nth-child(3) { animation-delay: .28s; }
.chat-typing small { margin-inline-start: 5px; }
@keyframes chatPulse { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.chat-error { padding: 10px 13px; color: var(--red); background: #f8e9e6; border-inline: 1px solid #edd2ce; font-size: 11px; line-height: 1.8; }
.chat-composer { padding: 12px; display: flex; align-items: flex-end; gap: 9px; background: #fff; }
.chat-composer textarea { min-width: 0; min-height: 78px; max-height: 150px; flex: 1; resize: vertical; padding: 12px 13px; border: 0; background: transparent; color: var(--ink); line-height: 1.8; font-family: inherit; font-size: 14px; transition: min-height .2s ease; }
.chat-surface.has-messages .chat-composer textarea { min-height: 46px; }
.chat-composer textarea:focus { outline: none; }
.chat-composer button { min-height: 46px; flex: 0 0 auto; padding: 0 18px; border: 0; border-radius: 4px; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 800; }
.chat-composer button:hover:not(:disabled) { background: var(--green); }
.chat-composer button:disabled { opacity: .55; cursor: wait; }
.chat-composer button svg { width: 18px; fill: none; stroke: var(--lime); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.chat-privacy-note { margin: 8px 0 0; color: var(--muted); font-size: 9px; line-height: 1.7; }
.error-icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: #f5dfdc; color: var(--red); font-size: 28px; font-weight: 800; }
.error-view .primary-button { max-width: 260px; }

.features { max-width: 820px; margin: 45px auto 80px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.features article { border-top: 1px solid var(--line); padding-top: 18px; }
.features article > span { color: var(--green); font-weight: 800; font-size: 11px; }
.features h3 { margin: 12px 0 5px; font-size: 15px; }
.features p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
footer { border-top: 1px solid rgba(23,33,29,.12); padding: 24px 0 35px; text-align: center; color: var(--muted); font-size: 11px; }

@media (max-width: 650px) {
  .page-shell { width: min(100% - 20px, 1120px); }
  .privacy-pill { display: none; }
  .header-actions { margin-inline-start: auto; }
  .site-header { height: 72px; }
  .brand { width: 180px; height: 72px; }
  .brand-logo { width: 180px; }
  .hero { padding: 50px 8px 34px; }
  .hero h1 { letter-spacing: -1px; }
  .workspace-card { padding: 24px 17px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .prompt-download-card { align-items: flex-start; flex-wrap: wrap; }
  .prompt-download-action { width: 100%; justify-content: center; margin-inline-start: 0; }
  .chat-messages { padding: 12px; }
  .chat-message { max-width: 94%; }
  .chat-composer button { padding: 0 14px; }
  .features { grid-template-columns: 1fr; gap: 18px; }
}

/* Modellenz visual system */
:root {
  --ink: #102044;
  --ink-soft: #26385f;
  --muted: #697594;
  --paper: #f5f7fc;
  --card: rgba(255, 255, 255, .92);
  --line: #dfe5f2;
  --line-strong: #cbd5e7;
  --green: #2563eb;
  --green-dark: #1749bb;
  --lime: #22d3ee;
  --cyan-soft: #e7faff;
  --purple: #7c3aed;
  --purple-soft: #f2ebff;
  --coral: #ff6b6b;
  --coral-soft: #fff0f0;
  --success: #059669;
  --success-soft: #e9fbf5;
  --red: #d83b55;
  --shadow-sm: 0 8px 24px rgba(20, 42, 91, .07);
  --shadow-lg: 0 28px 80px rgba(31, 56, 115, .12);
  --gradient-brand: linear-gradient(135deg, #0ea5e9 0%, #2563eb 38%, #7c3aed 68%, #f05f8d 100%);
}

html { color-scheme: light; scroll-behavior: smooth; }
body {
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 6%, rgba(34, 211, 238, .12), transparent 28rem),
    radial-gradient(circle at 93% 24%, rgba(124, 58, 237, .08), transparent 30rem),
    linear-gradient(180deg, #fbfcff 0%, var(--paper) 58%, #f8f9fd 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .22);
  outline-offset: 3px;
}

.page-shell { width: min(1180px, calc(100% - 40px)); }
.site-header {
  height: 96px;
  border-bottom-color: rgba(38, 56, 95, .1);
}
.brand { width: 220px; height: auto; display: flex; align-items: center; }
.brand-logo { width: 220px; mix-blend-mode: normal; }
.header-actions { gap: 12px; }
.privacy-pill {
  padding: 9px 14px;
  border-color: rgba(37, 99, 235, .14);
  background: rgba(255, 255, 255, .72);
  color: #53617f;
  box-shadow: 0 5px 16px rgba(33, 54, 105, .04);
  backdrop-filter: blur(12px);
}
.privacy-pill span { background: var(--success); box-shadow: 0 0 0 4px rgba(5, 150, 105, .12); }
.logout-button {
  min-height: 38px;
  padding: 8px 15px;
  border-color: var(--line-strong);
  border-radius: 11px;
  background: rgba(255,255,255,.62);
  color: var(--ink-soft);
  transition: .18s ease;
}
.logout-button:hover:not(:disabled) { border-color: #ff9aaa; background: var(--coral-soft); color: #bd2944; transform: translateY(-1px); }

.hero { padding: 84px 16px 52px; }
.hero::before {
  content: "POWER BI · AI MODEL ASSISTANT";
  display: inline-flex;
  padding: 7px 13px;
  border: 1px solid rgba(37, 99, 235, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .66);
  color: #53617f;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.7px;
  box-shadow: var(--shadow-sm);
}
.hero h1 {
  max-width: 850px;
  margin: 24px auto 18px;
  font-size: clamp(40px, 6.3vw, 72px);
  line-height: 1.22;
  letter-spacing: -2.4px;
  text-wrap: balance;
}
.hero h1 em {
  color: transparent;
  background: var(--gradient-brand);
  background-clip: text;
  -webkit-background-clip: text;
}
.hero h1 em::after { display: none; }
.hero p { max-width: 720px; color: var(--muted); font-size: 16px; line-height: 2.1; text-wrap: balance; }

.workspace-card {
  max-width: 900px;
  min-height: 490px;
  padding: clamp(25px, 5vw, 52px);
  border: 1px solid rgba(203, 213, 231, .82);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}
.workspace-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--gradient-brand);
}
.step-label { color: var(--green); font-size: 11px; letter-spacing: 0; }
.step-label.success { color: var(--success); }
.workspace-card h2 { margin-top: 9px; color: var(--ink); font-size: clamp(23px, 4vw, 30px); letter-spacing: -.5px; }
.section-note { margin-bottom: 28px; color: var(--muted); line-height: 1.9; }

.drop-zone {
  min-height: 240px;
  padding: 25px;
  border: 1.5px dashed #aebbd3;
  border-radius: 18px;
  background: linear-gradient(145deg, #fbfdff, #f4f7fc);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: #4f7de8;
  background: linear-gradient(145deg, #f8fbff, #eff4ff);
  box-shadow: 0 14px 34px rgba(37, 99, 235, .09);
  transform: translateY(-2px);
}
.upload-icon { width: 58px; height: 58px; border-radius: 18px; background: var(--gradient-brand); box-shadow: 0 12px 25px rgba(74, 73, 211, .22); }
.upload-icon svg { width: 27px; stroke: #fff; }
.drop-zone strong { margin-top: 17px; color: var(--ink); font-size: 18px; }
.drop-zone > span:not(.upload-icon) { margin-top: 6px; }
.drop-zone small { margin-top: 18px; color: #8793ad; }

.selected-file { margin-top: 16px; padding: 13px 14px; border-color: var(--line); border-radius: 14px; background: #f9fbff; }
.file-badge { padding: 11px 9px; border-radius: 10px; background: #e9efff; color: var(--green); }
.selected-file button { width: 34px; height: 34px; border-radius: 9px; transition: .18s ease; }
.selected-file button:hover { background: var(--coral-soft); color: var(--red); }

.primary-button {
  min-height: 52px;
  margin-top: 18px;
  border-radius: 14px;
  background: var(--gradient-brand);
  box-shadow: 0 12px 28px rgba(55, 86, 200, .2);
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.primary-button:hover:not(:disabled) { background: var(--gradient-brand); filter: saturate(1.08); transform: translateY(-2px); box-shadow: 0 16px 34px rgba(55, 86, 200, .25); }
.primary-button:disabled { background: #dce3f1; color: #8d99b1; box-shadow: none; opacity: 1; }

.loader span { border-radius: 99px; background: var(--gradient-brand); }
.progress { height: 6px; border-radius: 99px; background: #e8edf7; }
.progress span { border-radius: inherit; background: var(--gradient-brand); }

.result-heading { padding-bottom: 5px; }
.text-button { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--green); transition: .18s ease; }
.text-button:hover { border-color: #aabce7; background: #f2f6ff; }
.stats-grid { gap: 12px; margin: 28px 0 24px; }
.stats-grid div {
  padding: 18px 12px;
  border: 1px solid #e3e9f4;
  border-radius: 15px;
  background: linear-gradient(145deg, #fff, #f7f9fd);
  box-shadow: 0 7px 18px rgba(35, 55, 102, .04);
}
.stats-grid div:nth-child(1) { border-bottom-color: #2abde0; }
.stats-grid div:nth-child(2) { border-bottom-color: #3b82f6; }
.stats-grid div:nth-child(3) { border-bottom-color: #8b5cf6; }
.stats-grid div:nth-child(4) { border-bottom-color: #f06d91; }
.stats-grid strong { color: var(--ink); font-size: 27px; }
.stats-grid span { color: var(--muted); }

.result-actions { display: grid; grid-template-columns: 1fr; gap: 14px; }
.share-model-button {
  min-height: 56px;
  margin: 0;
  padding: 13px 15px;
  justify-content: flex-start;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink-soft);
  box-shadow: 0 7px 18px rgba(35, 55, 102, .04);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.share-model-button:hover:not(:disabled) { transform: translateY(-2px); background: #f7f9ff; color: var(--green); border-color: #b8c8ee; box-shadow: 0 12px 24px rgba(35, 55, 102, .08); }
.share-model-button svg { width: 21px; flex: 0 0 21px; }
.share-model-primary { border: 0; background: linear-gradient(135deg, #152b5d, #264c9f); color: #fff; }
.share-model-primary:hover:not(:disabled) { border: 0; background: linear-gradient(135deg, #1a356f, #315fbe); color: #fff; }
.data-dictionary-group {
  padding: 18px;
  border: 1px solid #dbe3f2;
  border-radius: 18px;
  background: linear-gradient(145deg, #fbfcff, #f6f8fd);
  box-shadow: 0 7px 20px rgba(35, 55, 102, .04);
}
.data-dictionary-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.data-dictionary-heading h3 { margin: 3px 0 0; color: var(--ink); font-size: 18px; }
.data-dictionary-heading > svg { width: 27px; fill: none; stroke: var(--green); stroke-width: 1.7; }
.data-dictionary-kicker { color: var(--green); font-size: 10px; font-weight: 800; }
.data-dictionary-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.data-dictionary-choices .share-model-button { min-height: 70px; display: grid; grid-template-columns: 25px 1fr; grid-template-rows: auto auto; align-content: center; justify-items: start; column-gap: 10px; row-gap: 2px; text-align: right; }
.data-dictionary-choices .share-model-button > svg { grid-row: 1 / 3; align-self: center; }
.data-dictionary-choices .share-model-button > span { font-size: 13px; }
.data-dictionary-choices .share-model-button > small { color: var(--muted); font-size: 9px; font-weight: 500; line-height: 1.6; }
.data-dictionary-button, .ai-data-dictionary-button, .fake-data-button { margin: 0; }
.data-dictionary-button { color: #146b9f; border-color: #c9e7f4; background: #f4fcff; }
.ai-data-dictionary-button { color: #6535b4; border-color: #ddd0f7; background: #faf7ff; }
.fake-data-button { color: #b83f64; border-color: #f6ced9; background: #fff8fa; }
.data-dictionary-button:hover:not(:disabled) { background: var(--cyan-soft); color: #075c8d; }
.ai-data-dictionary-button:hover:not(:disabled) { background: var(--purple-soft); color: #5b28aa; }
.fake-data-button:hover:not(:disabled) { background: var(--coral-soft); color: #a72c51; }
.ai-data-dictionary-note { margin: 12px 1px 0; padding: 9px 11px; border-radius: 10px; background: #eef2f9; color: #7b86a0; text-align: right; }
.ai-data-dictionary-status { margin: 12px 0 0; padding: 11px 13px; border: 1px solid #caeee1; border-right: 3px solid var(--success); border-radius: 10px; background: var(--success-soft); color: #087252; }

.data-preview { margin-top: 8px; padding-top: 28px; border-top-color: var(--line); }
.data-preview-heading h3 { font-size: 18px; }
.preview-card { margin-top: 10px; border-color: var(--line); border-radius: 13px; overflow: hidden; box-shadow: 0 5px 14px rgba(34, 54, 100, .035); }
.preview-card summary { padding: 14px 16px; background: #fff; }
.preview-card summary:hover { background: #f8faff; }
.preview-card summary span { color: var(--green); }
.sample-excel-button { width: 32px; height: 32px; border-color: #b9c9ef; border-radius: 9px; color: var(--green); }
.sample-excel-button:hover:not(:disabled) { background: var(--green); }
.preview-scroll { border-top-color: var(--line); }
.preview-scroll th, .preview-scroll td { border-color: #e9edf5; }
.preview-scroll th { background: #f4f7fc; }

.prompt-download-card {
  margin-top: 28px;
  padding: 19px;
  border-color: #dbe3f2;
  border-radius: 16px;
  background: linear-gradient(145deg, #fbfcff, #f5f8fd);
  box-shadow: 0 7px 20px rgba(35, 55, 102, .04);
}
.prompt-download-card:hover:not(:disabled) { border-color: #aabde9; background: #f6f9ff; transform: translateY(-2px); }
.prompt-download-icon { border-radius: 13px; background: #eaf2ff; color: var(--green); }
.prompt-download-action { border-color: #b7c8ed; border-radius: 10px; color: var(--green); background: #fff; }

.model-chat { margin-top: 42px; padding-top: 34px; border-top-color: var(--line); }
.model-chat-kicker { color: var(--purple); }
.model-chat-heading h3 { font-size: 23px; }
.model-chat-badge { padding: 10px 12px; border-radius: 12px; background: var(--gradient-brand); color: #fff; box-shadow: 0 8px 20px rgba(81, 70, 202, .19); }
.chat-surface { margin-top: 20px; border-color: #dce4f2; border-radius: 18px; box-shadow: 0 12px 30px rgba(34, 53, 99, .055); }
.chat-surface:focus-within { border-color: #90aaf0; box-shadow: 0 0 0 4px rgba(37, 99, 235, .09), 0 14px 32px rgba(34, 53, 99, .07); }
.chat-messages { padding: 18px; gap: 14px; background: #f5f7fb; border-bottom-color: var(--line); }
.chat-message { padding: 12px 14px; border-radius: 15px; }
.chat-message-user { background: linear-gradient(135deg, #2563eb, #4f46e5); border-bottom-left-radius: 4px; box-shadow: 0 7px 16px rgba(37, 99, 235, .14); }
.chat-message-assistant { border-color: #dde4f1; border-bottom-right-radius: 4px; box-shadow: 0 5px 14px rgba(34, 53, 99, .045); }
.chat-copy-button { border-radius: 7px; }
.chat-typing { background: #f5f7fb; border-color: var(--line); }
.chat-typing > span { background: var(--purple); }
.chat-error { color: var(--red); background: #fff1f3; border-color: #f7d4db; }
.chat-composer { padding: 13px; }
.chat-composer textarea { min-height: 74px; }
.chat-composer button { min-height: 48px; padding: 0 20px; border-radius: 12px; background: var(--gradient-brand); box-shadow: 0 8px 18px rgba(54, 73, 190, .16); }
.chat-composer button:hover:not(:disabled) { background: var(--gradient-brand); filter: saturate(1.1); transform: translateY(-1px); }
.chat-composer button svg { stroke: #fff; }

.error-icon { background: var(--coral-soft); color: var(--red); }
.features { max-width: 900px; margin: 34px auto 76px; gap: 14px; }
.features article { padding: 22px; border: 1px solid rgba(218, 225, 240, .78); border-radius: 17px; background: rgba(255,255,255,.55); }
.features article > span { color: var(--green); }
.features h3 { margin-top: 13px; font-size: 16px; }
footer { border-top-color: rgba(38, 56, 95, .1); color: #7d88a2; }

.auth-page {
  background:
    radial-gradient(circle at 15% 10%, rgba(34, 211, 238, .14), transparent 24rem),
    radial-gradient(circle at 85% 90%, rgba(124, 58, 237, .11), transparent 28rem),
    #f5f7fc;
}
.auth-card {
  width: min(100%, 450px);
  padding: 36px;
  border-color: rgba(203, 213, 231, .9);
  border-radius: 24px;
  background: rgba(255,255,255,.93);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.auth-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--gradient-brand); }
.auth-logo { width: 270px; margin-bottom: 28px; }
.auth-kicker { color: var(--green); }
.auth-card h1 { font-size: 29px; letter-spacing: -.4px; }
.auth-card > p:not(.auth-kicker) { text-align: center; color: var(--muted); }
.auth-card form { gap: 17px; }
.auth-card label { gap: 8px; color: var(--ink-soft); }
.auth-card input { min-height: 48px; padding: 12px 14px; border-color: var(--line-strong); border-radius: 12px; background: #f8faff; color: var(--ink); transition: .18s ease; }
.auth-card input:focus { border-color: #7c9bea; background: #fff; outline: 4px solid rgba(37, 99, 235, .08); }
.auth-card button { min-height: 50px; border-radius: 12px; background: var(--gradient-brand); box-shadow: 0 10px 24px rgba(53, 79, 190, .18); }
.auth-card button:hover:not(:disabled) { filter: saturate(1.08); transform: translateY(-1px); }
.auth-error { border: 1px solid #f5cbd4; border-right: 3px solid var(--red); border-radius: 10px; background: #fff1f3; }

@media (max-width: 650px) {
  .page-shell { width: min(100% - 22px, 1180px); }
  .site-header { height: 76px; }
  .brand, .brand-logo { width: 168px; }
  .logout-button { padding-inline: 11px; }
  .hero { padding: 54px 6px 36px; }
  .hero::before { font-size: 8px; letter-spacing: 1.3px; }
  .hero h1 { letter-spacing: -1.4px; }
  .hero p { font-size: 14px; }
  .workspace-card { padding: 28px 18px; border-radius: 20px; }
  .result-actions { grid-template-columns: 1fr; }
  .data-dictionary-group { padding: 15px; }
  .data-dictionary-choices { grid-template-columns: 1fr; }
  .stats-grid { gap: 8px; }
  .stats-grid div { padding: 14px 8px; }
  .prompt-download-card { padding: 15px; }
  .features article { padding: 18px; }
  .auth-page { padding: 14px; }
  .auth-card { padding: 30px 22px; border-radius: 20px; }
}
