@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700&family=DM+Sans:wght@300;400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0d0f12;
  --surface:   #151820;
  --border:    #252a35;
  --accent:    #4f7fff;
  --accent-dim:#1e2d55;
  --text:      #e8eaf0;
  --muted:     #6b7280;
  --danger:    #ff5a5a;
  --success:   #3ecf8e;
  --radius:    12px;
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Auth layout ── */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px;
  background: linear-gradient(145deg, #0d1525 0%, #0d0f12 60%);
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.auth-side::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,127,255,.12) 0%, transparent 70%);
  top: -100px; left: -100px;
  pointer-events: none;
}

.auth-side-logo {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 64px;
}

.auth-side-logo span { color: var(--accent); }

.auth-side-heading {
  font-family: var(--font-head);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.auth-side-sub {
  color: var(--muted);
  font-size: 15px;
  max-width: 340px;
  line-height: 1.7;
}

.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px;
  background: var(--surface);
}

.auth-form-box {
  width: 100%;
  max-width: 400px;
}

.auth-form-box h2 {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.auth-form-box p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 36px;
}

.auth-form-box p a {
  color: var(--accent);
  text-decoration: none;
}

/* ── Form elements ── */
.field { margin-bottom: 20px; }

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.3px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color .2s;
}

input:focus { border-color: var(--accent); }

.btn {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity .15s, transform .1s;
}

.btn:hover  { opacity: .88; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── Alerts ── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}

.alert.show { display: block; }
.alert-error   { background: rgba(255,90,90,.12); border: 1px solid rgba(255,90,90,.3); color: var(--danger); }
.alert-success { background: rgba(62,207,142,.12); border: 1px solid rgba(62,207,142,.3); color: var(--success); }

/* ── Dashboard layout ── */
.dash-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 60px 1fr;
}

.dash-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.dash-nav-logo {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
}

.dash-nav-logo span { color: var(--accent); }

.dash-nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  color: var(--muted);
}

.dash-nav-right a {
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}

.dash-nav-right a:hover { color: var(--text); }

.dash-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 56px;
  text-align: center;
  max-width: 480px;
}

.dash-card-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  font-size: 24px;
}

.dash-card h1 {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.dash-card p { color: var(--muted); font-size: 15px; line-height: 1.7; }

.badge-success {
  display: inline-block;
  margin-top: 24px;
  padding: 6px 16px;
  background: rgba(62,207,142,.12);
  border: 1px solid rgba(62,207,142,.25);
  border-radius: 20px;
  color: var(--success);
  font-size: 13px;
  font-weight: 500;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side  { display: none; }
  .auth-form-wrap { padding: 40px 24px; }
}

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700&family=DM+Sans:wght@300;400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0d0f12;
  --surface:   #151820;
  --border:    #252a35;
  --accent:    #4f7fff;
  --accent-dim:#1e2d55;
  --text:      #e8eaf0;
  --muted:     #6b7280;
  --danger:    #ff5a5a;
  --success:   #3ecf8e;
  --radius:    12px;
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Auth layout ── */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px;
  background: linear-gradient(145deg, #0d1525 0%, #0d0f12 60%);
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.auth-side::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,127,255,.12) 0%, transparent 70%);
  top: -100px; left: -100px;
  pointer-events: none;
}

.auth-side-logo {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 64px;
}

.auth-side-logo span { color: var(--accent); }

.auth-side-heading {
  font-family: var(--font-head);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.auth-side-sub {
  color: var(--muted);
  font-size: 15px;
  max-width: 340px;
  line-height: 1.7;
}

.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px;
  background: var(--surface);
}

.auth-form-box {
  width: 100%;
  max-width: 400px;
}

.auth-form-box h2 {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.auth-form-box p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 36px;
}

.auth-form-box p a {
  color: var(--accent);
  text-decoration: none;
}

/* ── Form elements ── */
.field { margin-bottom: 20px; }

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.3px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color .2s;
}

input:focus { border-color: var(--accent); }

.btn {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity .15s, transform .1s;
}

.btn:hover  { opacity: .88; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── Alerts ── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}

.alert.show { display: block; }
.alert-error   { background: rgba(255,90,90,.12); border: 1px solid rgba(255,90,90,.3); color: var(--danger); }
.alert-success { background: rgba(62,207,142,.12); border: 1px solid rgba(62,207,142,.3); color: var(--success); }

/* ── Dashboard layout ── */
.dash-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 60px 1fr;
}

.dash-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.dash-nav-logo {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
}

.dash-nav-logo span { color: var(--accent); }

.dash-nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  color: var(--muted);
}

.dash-nav-right a {
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}

.dash-nav-right a:hover { color: var(--text); }

.dash-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 56px;
  text-align: center;
  max-width: 480px;
}

.dash-card-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  font-size: 24px;
}

.dash-card h1 {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.dash-card p { color: var(--muted); font-size: 15px; line-height: 1.7; }

.badge-success {
  display: inline-block;
  margin-top: 24px;
  padding: 6px 16px;
  background: rgba(62,207,142,.12);
  border: 1px solid rgba(62,207,142,.25);
  border-radius: 20px;
  color: var(--success);
  font-size: 13px;
  font-weight: 500;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side  { display: none; }
  .auth-form-wrap { padding: 40px 24px; }
}

/* ── Dashboard main ── */
.dash-main {
  padding: 40px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* ── Upload section ── */
.upload-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}

.upload-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  transition: border-color .2s;
  justify-content: space-between;  /* равномерно распределяем элементы */
  min-height: 320px;               /* фиксируем минимальную высоту */
}

.upload-card.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.upload-card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: var(--accent);
  font-weight: 700;
}

.upload-card-title {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
}

.upload-card-sub {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 4px;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: auto;
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 600;
  transition: border-color .15s, color .15s;
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }

.file-name {
  font-size: 13px;
  color: var(--accent);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-height: 18px;
}

.url-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}

.url-input:focus { border-color: var(--accent); }

/* ── Docs section ── */
.docs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.docs-title {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
}

.docs-count {
  font-size: 13px;
  color: var(--muted);
}

.docs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.docs-empty {
  text-align: center;
  padding: 48px;
  color: var(--muted);
  font-size: 14px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color .15s;
}

.doc-item:hover { border-color: var(--accent); }

.doc-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  text-transform: uppercase;
}

.doc-info { flex: 1; min-width: 0; }

.doc-name {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 768px) {
  .upload-section { grid-template-columns: 1fr; }
  .dash-main { padding: 24px 16px; }
}

.upload-card .btn {
  margin-top: auto;
  width: 100%;
}


@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700&family=DM+Sans:wght@300;400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0d0f12;
  --surface:   #151820;
  --border:    #252a35;
  --accent:    #4f7fff;
  --accent-dim:#1e2d55;
  --text:      #e8eaf0;
  --muted:     #6b7280;
  --danger:    #ff5a5a;
  --success:   #3ecf8e;
  --radius:    12px;
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Auth layout ── */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px;
  background: linear-gradient(145deg, #0d1525 0%, #0d0f12 60%);
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.auth-side::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,127,255,.12) 0%, transparent 70%);
  top: -100px; left: -100px;
  pointer-events: none;
}

.auth-side-logo {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 64px;
}

.auth-side-logo span { color: var(--accent); }

.auth-side-heading {
  font-family: var(--font-head);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.auth-side-sub {
  color: var(--muted);
  font-size: 15px;
  max-width: 340px;
  line-height: 1.7;
}

.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px;
  background: var(--surface);
}

.auth-form-box {
  width: 100%;
  max-width: 400px;
}

.auth-form-box h2 {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.auth-form-box p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 36px;
}

.auth-form-box p a {
  color: var(--accent);
  text-decoration: none;
}

/* ── Form elements ── */
.field { margin-bottom: 20px; }

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.3px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color .2s;
}

input:focus { border-color: var(--accent); }

.btn {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity .15s, transform .1s;
}

.btn:hover  { opacity: .88; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── Alerts ── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}

.alert.show { display: block; }
.alert-error   { background: rgba(255,90,90,.12); border: 1px solid rgba(255,90,90,.3); color: var(--danger); }
.alert-success { background: rgba(62,207,142,.12); border: 1px solid rgba(62,207,142,.3); color: var(--success); }

/* ── Dashboard layout ── */
.dash-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 60px 1fr;
}

.dash-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.dash-nav-logo {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
}

.dash-nav-logo span { color: var(--accent); }

.dash-nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  color: var(--muted);
}

.dash-nav-right a {
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}

.dash-nav-right a:hover { color: var(--text); }

.dash-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 56px;
  text-align: center;
  max-width: 480px;
}

.dash-card-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  font-size: 24px;
}

.dash-card h1 {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.dash-card p { color: var(--muted); font-size: 15px; line-height: 1.7; }

.badge-success {
  display: inline-block;
  margin-top: 24px;
  padding: 6px 16px;
  background: rgba(62,207,142,.12);
  border: 1px solid rgba(62,207,142,.25);
  border-radius: 20px;
  color: var(--success);
  font-size: 13px;
  font-weight: 500;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side  { display: none; }
  .auth-form-wrap { padding: 40px 24px; }
}

/* ── Dashboard main ── */
.dash-main {
  padding: 40px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* ── Upload section ── */
.upload-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}

.upload-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  transition: border-color .2s;
}

.upload-card.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.upload-card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: var(--accent);
  font-weight: 700;
}

.upload-card-title {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
}

.upload-card-sub {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 4px;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: auto;
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 600;
  transition: border-color .15s, color .15s;
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }

.file-name {
  font-size: 13px;
  color: var(--accent);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-height: 18px;
}

.url-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}

.url-input:focus { border-color: var(--accent); }

/* ── Docs section ── */
.docs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.docs-title {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
}

.docs-count {
  font-size: 13px;
  color: var(--muted);
}

.docs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.docs-empty {
  text-align: center;
  padding: 48px;
  color: var(--muted);
  font-size: 14px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color .15s;
}

.doc-item:hover { border-color: var(--accent); }

.doc-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  text-transform: uppercase;
}

.doc-info { flex: 1; min-width: 0; }

.doc-name {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 768px) {
  .upload-section { grid-template-columns: 1fr; }
  .dash-main { padding: 24px 16px; }
}

/* ── Dashboard two-column layout ── */
.dash-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
  height: calc(100vh - 60px - 80px);
}

.dash-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  padding-right: 4px;
}

.dash-left .upload-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 0;
}

.dash-left .upload-card {
  min-height: unset;
  padding: 24px;
}

.dash-right {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ── Chat ── */
.chat-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.chat-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.chat-header-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
}

.chat-header-title span { color: var(--accent); }

.chat-doc-name {
  font-size: 13px;
  color: var(--muted);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-doc-name.active { color: var(--accent); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-placeholder {
  margin: auto;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  max-width: 260px;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 80%;
}

.chat-msg.user { align-self: flex-end; align-items: flex-end; }
.chat-msg.bot  { align-self: flex-start; align-items: flex-start; }

.chat-msg-bubble {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-msg.user .chat-msg-bubble {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg.bot .chat-msg-bubble {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.chat-msg-meta {
  font-size: 11px;
  color: var(--muted);
  padding: 0 4px;
}

.chat-msg.bot.loading .chat-msg-bubble {
  display: flex;
  gap: 4px;
  align-items: center;
}

.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: bounce .9s infinite;
}
.dot:nth-child(2) { animation-delay: .15s; }
.dot:nth-child(3) { animation-delay: .3s; }

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

.chat-input-wrap {
  display: flex;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}

.chat-input:focus { border-color: var(--accent); }
.chat-input:disabled { opacity: .4; cursor: not-allowed; }

.chat-send-btn {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 18px;
  cursor: pointer;
  transition: opacity .15s;
  flex-shrink: 0;
}

.chat-send-btn:hover   { opacity: .85; }
.chat-send-btn:disabled { opacity: .3; cursor: not-allowed; }

/* doc-item selected state */
.doc-item.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}

@media (max-width: 900px) {
  .dash-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .dash-right { height: 500px; }
}


/* ── Confirm email ── */
.email-hint {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.email-hint span {
  color: var(--accent);
  font-weight: 500;
}

.resend-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 14px;
}

.resend-text { color: var(--muted); }

.resend-link {
  color: var(--accent);
  text-decoration: none;
  transition: opacity .15s;
}

.resend-link:hover { opacity: .75; }