/* HomeoDrop — Design System CEHL */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --hb-brand: #0061ff;
  --hb-brand-dark: #004ecc;
  --hb-accent: #10b981;
  --hb-accent-dark: #059669;
  --hb-surface: #ffffff;
  --hb-bg: #f4f7fb;
  --hb-bg-alt: #eef4ff;
  --hb-text: #0f172a;
  --hb-text-muted: #64748b;
  --hb-border: #e2e8f0;
  --hb-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(0, 97, 255, 0.08);
  --hb-shadow-lg: 0 4px 6px rgba(15, 23, 42, 0.04), 0 20px 48px rgba(0, 97, 255, 0.12);
  --hb-radius: 16px;
  --hb-radius-sm: 10px;
  --hb-font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body.hb-body {
  font-family: var(--hb-font);
  color: var(--hb-text);
  background: var(--hb-bg);
  -webkit-font-smoothing: antialiased;
}

/* ── Brand / Logo ─────────────────────────────────────────── */

.hb-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.hb-brand__icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 97, 255, 0.2));
}

.hb-brand__icon--lg { width: 56px; height: 56px; }
.hb-brand__icon--xl { width: 72px; height: 72px; }

.hb-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.hb-brand__name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--hb-accent) 0%, var(--hb-brand) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hb-brand__name--lg { font-size: 1.75rem; }

.hb-brand__tagline {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--hb-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Layout shells ────────────────────────────────────────── */

.hb-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hb-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hb-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.hb-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hb-hero-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 24px;
  gap: 32px;
}

@media (min-width: 1024px) {
  .hb-hero-layout {
    grid-template-columns: 1fr 1.1fr;
    padding: 48px 24px;
    align-items: start;
    gap: 48px;
  }
}

.hb-hero-panel {
  display: none;
}

@media (min-width: 1024px) {
  .hb-hero-panel {
    display: flex;
    flex-direction: column;
    padding: 40px 32px;
    position: sticky;
    top: 88px;
  }
}

.hb-hero-panel__visual {
  background: linear-gradient(145deg, #ecfdf5 0%, #eff6ff 50%, #f0f9ff 100%);
  border-radius: 24px;
  padding: 48px 32px;
  text-align: center;
  border: 1px solid rgba(0, 97, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.hb-hero-panel__visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(16, 185, 129, 0.12), transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(0, 97, 255, 0.1), transparent 50%);
}

.hb-hero-panel__visual > * { position: relative; z-index: 1; }

.hb-hero-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.2;
  margin-top: 24px;
  color: var(--hb-text);
}

.hb-hero-desc {
  color: var(--hb-text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-top: 12px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Cards ────────────────────────────────────────────────── */

.hb-card {
  background: var(--hb-surface);
  border-radius: var(--hb-radius);
  border: 1px solid var(--hb-border);
  box-shadow: var(--hb-shadow);
  overflow: hidden;
}

.hb-card__header {
  padding: 24px 28px 0;
}

.hb-card__body { padding: 24px 28px 28px; }

.hb-card__title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hb-card__subtitle {
  font-size: 0.875rem;
  color: var(--hb-text-muted);
  margin-top: 4px;
}

/* ── Form elements ────────────────────────────────────────── */

.hb-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--hb-text);
  margin-bottom: 6px;
}

.hb-label span.req { color: #ef4444; }

.hb-label-optional {
  font-weight: 500;
  color: #94a3b8;
  font-size: 0.6875rem;
  margin-left: 4px;
}

.hb-field-hint {
  font-size: 0.75rem;
  color: var(--hb-text-muted);
  margin-top: 6px;
  line-height: 1.5;
}

.hb-field-hint svg {
  display: inline;
  vertical-align: -2px;
  margin-right: 3px;
  opacity: 0.65;
}

.hb-form-note {
  font-size: 0.75rem;
  color: var(--hb-text-muted);
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid var(--hb-border);
}

.hb-input {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--hb-font);
  font-size: 0.9375rem;
  border: 1.5px solid var(--hb-border);
  border-radius: var(--hb-radius-sm);
  background: #fafbfc;
  color: var(--hb-text);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  outline: none;
}

.hb-input:focus {
  border-color: var(--hb-brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 97, 255, 0.12);
}

.hb-input-wrap {
  position: relative;
}

.hb-input-wrap__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.15s;
}

.hb-input-wrap__icon svg {
  width: 18px;
  height: 18px;
}

.hb-input--icon {
  padding-left: 42px;
}

.hb-input-wrap:focus-within .hb-input-wrap__icon {
  color: var(--hb-brand);
}

.hb-input--valid {
  border-color: #34d399 !important;
  background: #f0fdf4 !important;
}

.hb-input--valid:focus {
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15) !important;
}

.hb-input--invalid {
  border-color: #f87171 !important;
  background: #fef2f2 !important;
}

.hb-input--invalid:focus {
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15) !important;
}

.hb-input-group { margin-bottom: 18px; }

.hb-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 640px) {
  .hb-form-grid--2 { grid-template-columns: 1fr 1fr; gap: 16px; }
}

/* ── Limit badge (Dropbox-style info) ─────────────────────── */

.hb-limit-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(0, 97, 255, 0.08));
  border: 1px solid rgba(0, 97, 255, 0.12);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--hb-text);
  margin-top: 20px;
}

.hb-limit-badge svg {
  width: 18px;
  height: 18px;
  color: var(--hb-brand);
  flex-shrink: 0;
}

.hb-limit-badge strong {
  color: var(--hb-brand);
  font-weight: 700;
}

.hb-limit-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.hb-limit-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f8fafc;
  border: 1px solid var(--hb-border);
  border-radius: 8px;
  font-size: 0.75rem;
  color: var(--hb-text-muted);
  font-weight: 500;
}

.hb-limit-chip svg { width: 14px; height: 14px; opacity: 0.6; }

/* ── Dropzone ─────────────────────────────────────────────── */

.hb-dropzone {
  position: relative;
  border: 2px dashed #cbd5e1;
  border-radius: var(--hb-radius);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  background: linear-gradient(180deg, #fafbfc 0%, #f8fafc 100%);
}

.hb-dropzone:hover {
  border-color: var(--hb-brand);
  background: linear-gradient(180deg, #f0f7ff 0%, #f8fafc 100%);
}

.hb-dropzone.is-dragover {
  border-color: var(--hb-accent);
  border-style: solid;
  background: linear-gradient(180deg, #ecfdf5 0%, #eff6ff 100%);
  transform: scale(1.01);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.hb-dropzone.has-file {
  border-color: var(--hb-brand);
  border-style: solid;
  background: #f0f7ff;
  padding: 28px 24px;
}

.hb-dropzone.has-file .hb-dropzone__input {
  display: none;
  pointer-events: none;
}

#filePreview {
  position: relative;
  z-index: 2;
}

.hb-dropzone__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.hb-dropzone__icon-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(0, 97, 255, 0.12));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hb-dropzone__icon-wrap svg {
  width: 36px;
  height: 36px;
  color: var(--hb-brand);
}

.hb-dropzone__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--hb-text);
}

.hb-dropzone__hint {
  font-size: 0.8125rem;
  color: var(--hb-text-muted);
  margin-top: 6px;
}

.hb-dropzone__btn {
  display: inline-block;
  margin-top: 16px;
  padding: 8px 20px;
  background: var(--hb-brand);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 8px;
  pointer-events: none;
}

.hb-file-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  max-width: 400px;
  margin: 0 auto;
}

.hb-file-preview__icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--hb-accent), var(--hb-brand));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hb-file-preview__icon svg { width: 26px; height: 26px; color: #fff; }

.hb-file-preview__info { flex: 1; min-width: 0; }

.hb-file-preview__name {
  font-weight: 700;
  font-size: 0.9375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hb-file-preview__size {
  font-size: 0.8125rem;
  color: var(--hb-text-muted);
  margin-top: 2px;
}

.hb-file-preview__remove {
  font-size: 0.75rem;
  font-weight: 600;
  color: #ef4444;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: var(--hb-font);
  position: relative;
  z-index: 3;
  flex-shrink: 0;
}

.hb-file-preview__remove:hover { background: #fef2f2; }

/* ── Progress ─────────────────────────────────────────────── */

.hb-progress-wrap {
  background: #f8fafc;
  border: 1px solid var(--hb-border);
  border-radius: var(--hb-radius-sm);
  padding: 16px 18px;
}

.hb-progress-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.hb-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hb-accent);
  animation: hb-pulse 1.2s ease-in-out infinite;
}

@keyframes hb-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hb-progress-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--hb-accent-dark);
}

.hb-progress-pct {
  margin-left: auto;
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--hb-brand);
  font-variant-numeric: tabular-nums;
}

.hb-progress-track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.hb-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--hb-accent), var(--hb-brand));
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.hb-progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: hb-shimmer 1.5s infinite;
}

@keyframes hb-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.hb-progress-detail {
  font-size: 0.75rem;
  color: var(--hb-text-muted);
  margin-top: 8px;
  text-align: center;
}

/* ── Buttons ──────────────────────────────────────────────── */

.hb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  font-family: var(--hb-font);
  font-size: 0.9375rem;
  font-weight: 700;
  border: none;
  border-radius: var(--hb-radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.hb-btn--primary {
  width: 100%;
  background: linear-gradient(135deg, var(--hb-accent) 0%, var(--hb-brand) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 97, 255, 0.3);
}

.hb-btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 97, 255, 0.35);
}

.hb-btn--primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.hb-btn--ghost {
  background: transparent;
  color: var(--hb-text-muted);
  padding: 8px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
}

.hb-btn--ghost:hover { background: #f1f5f9; color: var(--hb-text); }

.hb-btn--sm {
  padding: 7px 14px;
  font-size: 0.75rem;
  border-radius: 8px;
}

.hb-btn--download {
  background: var(--hb-brand);
  color: #fff;
}

.hb-btn--download:hover { background: var(--hb-brand-dark); }

/* ── Alerts ───────────────────────────────────────────────── */

.hb-alert {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--hb-radius-sm);
  font-size: 0.875rem;
}

.hb-alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.hb-alert--success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.hb-alert__title { font-weight: 700; }
.hb-alert__text { font-size: 0.8125rem; margin-top: 2px; opacity: 0.9; }

.hb-alert svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 1px; }

/* ── Step divider ─────────────────────────────────────────── */

.hb-step {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  margin-top: 8px;
}

.hb-step__num {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--hb-accent), var(--hb-brand));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hb-step__label {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hb-text-muted);
}

/* ── Footer ───────────────────────────────────────────────── */

.hb-footer {
  text-align: center;
  padding: 24px;
  font-size: 0.75rem;
  color: var(--hb-text-muted);
}

/* ── Admin layout ─────────────────────────────────────────── */

.hb-admin {
  display: flex;
  min-height: 100vh;
}

.hb-sidebar {
  width: 260px;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.hb-sidebar.is-open { transform: translateX(0); }

@media (min-width: 1024px) {
  .hb-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    transform: none;
  }
}

.hb-sidebar__head {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.hb-sidebar .hb-brand__name {
  -webkit-text-fill-color: #fff;
  background: none;
  color: #fff;
}

.hb-sidebar .hb-brand__tagline { color: rgba(255,255,255,0.45); }

.hb-sidebar__nav {
  flex: 1;
  padding: 16px 12px;
}

.hb-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.15s;
  margin-bottom: 4px;
}

.hb-nav-item svg { width: 20px; height: 20px; opacity: 0.7; }

.hb-nav-item:hover,
.hb-nav-item.is-active {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.hb-nav-item.is-active {
  background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(0,97,255,0.2));
  border: 1px solid rgba(255,255,255,0.1);
}

.hb-nav-item.is-active svg { opacity: 1; color: var(--hb-accent); }

.hb-sidebar__foot {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.hb-admin-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .hb-admin-main { margin-left: 0; }
}

.hb-admin-topbar {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hb-border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.hb-admin-content {
  padding: 24px;
  flex: 1;
}

.hb-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--hb-border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

@media (min-width: 1024px) { .hb-menu-toggle { display: none; } }

.hb-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.8125rem;
}

.hb-breadcrumb a {
  color: var(--hb-brand);
  text-decoration: none;
  font-weight: 600;
}

.hb-breadcrumb a:hover { text-decoration: underline; }

.hb-breadcrumb span.sep { color: #cbd5e1; }

.hb-breadcrumb span.current {
  color: var(--hb-text-muted);
  font-weight: 500;
}

/* ── Admin stats ──────────────────────────────────────────── */

.hb-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .hb-stats { grid-template-columns: repeat(4, 1fr); }
}

.hb-stat {
  background: #fff;
  border: 1px solid var(--hb-border);
  border-radius: var(--hb-radius-sm);
  padding: 18px 20px;
  box-shadow: var(--hb-shadow);
}

.hb-stat__label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hb-text-muted);
}

.hb-stat__value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 4px;
  color: var(--hb-text);
}

.hb-stat__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.hb-stat__icon--blue { background: #eff6ff; color: var(--hb-brand); }
.hb-stat__icon--green { background: #ecfdf5; color: var(--hb-accent); }
.hb-stat__icon--purple { background: #f5f3ff; color: #7c3aed; }
.hb-stat__icon--amber { background: #fffbeb; color: #d97706; }

.hb-stat__icon svg { width: 18px; height: 18px; }

/* ── File table / grid ────────────────────────────────────── */

.hb-file-panel {
  background: #fff;
  border: 1px solid var(--hb-border);
  border-radius: var(--hb-radius);
  box-shadow: var(--hb-shadow);
  overflow: hidden;
}

.hb-file-panel__toolbar {
  padding: 14px 20px;
  border-bottom: 1px solid var(--hb-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafbfc;
}

.hb-file-panel__toolbar-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--hb-text);
}

.hb-file-panel__count {
  font-size: 0.75rem;
  color: var(--hb-text-muted);
  font-weight: 500;
}

.hb-back-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--hb-text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background 0.15s;
}

.hb-back-row:hover { background: #f8fafc; color: var(--hb-brand); }
.hb-back-row svg { width: 18px; height: 18px; }

.hb-file-table { width: 100%; border-collapse: collapse; }

.hb-file-table thead {
  background: #f8fafc;
  border-bottom: 1px solid var(--hb-border);
}

.hb-file-table th {
  text-align: left;
  padding: 10px 20px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hb-text-muted);
}

.hb-file-table td {
  padding: 12px 20px;
  font-size: 0.8125rem;
  border-bottom: 1px solid #f8fafc;
}

.hb-file-table tbody tr {
  transition: background 0.12s;
}

.hb-file-table tbody tr:hover { background: #f8fafc; }

.hb-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.hb-file-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hb-file-icon--folder { background: #fef3c7; color: #d97706; }
.hb-file-icon--doc { background: #eff6ff; color: var(--hb-brand); }
.hb-file-icon--txt { background: #ecfdf5; color: var(--hb-accent); }
.hb-file-icon--pdf { background: #fef2f2; color: #dc2626; }
.hb-file-icon--img { background: #f5f3ff; color: #7c3aed; }

.hb-file-icon svg { width: 18px; height: 18px; }

.hb-file-name {
  font-weight: 600;
  color: var(--hb-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

a.hb-file-name { color: var(--hb-brand); text-decoration: none; }
a.hb-file-name:hover { text-decoration: underline; }

.hb-file-meta { font-size: 0.75rem; color: var(--hb-text-muted); }

.hb-empty {
  padding: 64px 24px;
  text-align: center;
  color: var(--hb-text-muted);
}

.hb-empty svg { width: 56px; height: 56px; margin: 0 auto 16px; opacity: 0.35; }
.hb-empty p { font-size: 0.9375rem; font-weight: 500; }

/* ── Login page ───────────────────────────────────────────── */

.hb-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #ecfdf5 0%, #eff6ff 40%, #f4f7fb 100%);
}

.hb-login-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--hb-border);
  box-shadow: var(--hb-shadow-lg);
  padding: 40px 36px;
}

.hb-login-card__head { text-align: center; margin-bottom: 32px; }

.hb-login-card__head .hb-brand { justify-content: center; flex-direction: column; }

.hb-login-card__title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-top: 20px;
  letter-spacing: -0.02em;
}

.hb-login-card__sub {
  font-size: 0.8125rem;
  color: var(--hb-text-muted);
  margin-top: 4px;
}

.hb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 35;
}

.hb-overlay.is-visible { display: block; }

@media (min-width: 1024px) { .hb-overlay { display: none !important; } }

.hb-hidden { display: none !important; }

/* ── Success state (substitui o formulário) ───────────────── */

.hb-success-state {
  padding: 48px 28px 56px;
  text-align: center;
}

.hb-success-state__circle {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 3px solid #34d399;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: hb-success-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hb-success-state__circle svg {
  width: 40px;
  height: 40px;
  color: #059669;
}

@keyframes hb-success-pop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.hb-success-state__label {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--hb-text);
}

.hb-success-state__file {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--hb-brand);
  margin-top: 8px;
  word-break: break-all;
  padding: 0 12px;
}

.hb-success-files {
  list-style: none;
  margin: 12px auto 0;
  padding: 0 12px;
  max-width: 360px;
  text-align: left;
}

.hb-success-files li {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--hb-brand);
  padding: 6px 0;
  border-bottom: 1px solid #e2e8f0;
  word-break: break-all;
}

.hb-success-files li:last-child { border-bottom: none; }

.hb-file-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 4px;
}

.hb-file-list-count {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--hb-text);
}

.hb-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
  text-align: left;
}

.hb-file-list__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--hb-border);
  border-radius: 10px;
  margin-bottom: 8px;
}

.hb-file-list__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(0,97,255,0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--hb-brand);
}

.hb-file-list__icon svg { width: 18px; height: 18px; }

.hb-file-list__info { flex: 1; min-width: 0; }

.hb-file-list__name {
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hb-file-list__size {
  font-size: 0.75rem;
  color: var(--hb-text-muted);
}

.hb-btn-add-more {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  background: transparent;
  border: 1.5px dashed var(--hb-border);
  border-radius: 10px;
  color: var(--hb-brand);
  font-family: var(--hb-font);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.hb-btn-add-more:hover {
  border-color: var(--hb-brand);
  background: #f0f7ff;
}

.hb-mobile-limit {
  display: block;
  margin-bottom: 20px;
}

@media (min-width: 1024px) { .hb-mobile-limit { display: none; } }

/* ── Modal & ações admin ──────────────────────────────────── */

.hb-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.hb-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.hb-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.2s;
}

.hb-modal-overlay.is-open .hb-modal {
  transform: scale(1);
}

.hb-modal--danger .hb-modal__head {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border-bottom: 1px solid #fecaca;
}

.hb-modal__head {
  padding: 24px 24px 16px;
  text-align: center;
}

.hb-modal__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hb-modal--danger .hb-modal__icon {
  background: #fee2e2;
  color: #dc2626;
}

.hb-modal__icon svg { width: 26px; height: 26px; }

.hb-modal__title {
  font-size: 1.125rem;
  font-weight: 800;
  color: #0f172a;
}

.hb-modal--danger .hb-modal__title { color: #b91c1c; }

.hb-modal__body {
  padding: 0 24px 20px;
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.6;
}

.hb-modal__body strong { color: #0f172a; }

.hb-modal__warn {
  margin-top: 12px;
  padding: 12px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  color: #b91c1c;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
}

.hb-modal__foot {
  padding: 16px 24px 24px;
  display: flex;
  gap: 10px;
}

.hb-modal__foot .hb-btn { flex: 1; }

.hb-btn--danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.hb-btn--danger:hover { background: linear-gradient(135deg, #dc2626, #b91c1c); }

.hb-btn--outline {
  background: #fff;
  color: #64748b;
  border: 1.5px solid #e2e8f0;
}

.hb-btn--outline:hover { background: #f8fafc; color: #0f172a; }

.hb-btn--delete {
  background: #fff;
  color: #dc2626;
  border: 1.5px solid #fecaca;
  padding: 6px 12px;
  font-size: 0.75rem;
}

.hb-btn--delete:hover { background: #fef2f2; border-color: #f87171; }

.hb-nav-badge {
  margin-left: auto;
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.hb-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hb-trash-banner {
  background: linear-gradient(135deg, #fef2f2, #fff7ed);
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: #991b1b;
}

.hb-trash-banner svg { width: 22px; height: 22px; flex-shrink: 0; color: #dc2626; }

.hb-flash {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hb-flash--success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.hb-flash--error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }

.hb-file-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
