/* LoginHub — shared UI components */

.lh-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--lh-border);
  margin-bottom: 32px;
}

.lh-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}

.lh-logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--lh-border);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.05em;
  background: var(--lh-accent);
  color: var(--lh-accent-fg);
  flex-shrink: 0;
}

.lh-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lh-brand-name {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lh-brand-sub {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lh-muted);
}

.lh-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.lh-inline-form {
  margin: 0;
}

/* Buttons */
.lh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--lh-font);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 20px;
  border-radius: var(--lh-radius-sm);
  border: 2px solid var(--lh-border);
  background: var(--lh-bg);
  color: var(--lh-text);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, transform 0.1s, box-shadow 0.15s;
  white-space: nowrap;
}

.lh-btn:hover {
  background: var(--lh-accent);
  color: var(--lh-accent-fg);
}

.lh-btn-sm {
  padding: 10px 16px;
  font-size: 10px;
}

.lh-btn-primary {
  background: var(--lh-accent);
  color: var(--lh-accent-fg);
}

.lh-btn-primary:hover:not(:disabled) {
  background: var(--lh-bg);
  color: var(--lh-text);
  box-shadow: var(--lh-shadow);
}

.lh-btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.lh-btn-ghost {
  border-color: var(--lh-border-soft);
  color: var(--lh-muted);
}

.lh-btn-ghost:hover {
  border-color: var(--lh-border);
  color: var(--lh-text);
  background: var(--lh-surface);
}

.lh-btn-download {
  background: var(--lh-accent);
  color: var(--lh-accent-fg);
  padding: 14px 28px;
  font-size: 12px;
  gap: 10px;
}

.lh-btn-download svg {
  flex-shrink: 0;
}

.lh-btn-block {
  width: 100%;
}

.lh-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Cards */
.lh-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 860px) {
  .lh-grid {
    grid-template-columns: 1fr;
  }
}

.lh-card {
  background: var(--lh-bg);
  border: 2px solid var(--lh-border);
  border-radius: var(--lh-radius);
  overflow: hidden;
}

.lh-card-head {
  padding: 16px 22px;
  border-bottom: 2px solid var(--lh-border);
  background: var(--lh-surface);
}

.lh-card-head h2 {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lh-card-body {
  padding: 22px;
}

/* Hub tool cards */
.lh-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.lh-tool-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 2px solid var(--lh-border);
  border-radius: var(--lh-radius);
  background: var(--lh-surface);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}

.lh-tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--lh-shadow);
}

.lh-tool-card.lh-tool-soon {
  opacity: 0.45;
  pointer-events: none;
}

.lh-tool-icon {
  width: 44px;
  height: 44px;
  border: 2px solid var(--lh-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lh-bg);
}

.lh-tool-name {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lh-tool-desc {
  font-size: 11px;
  color: var(--lh-muted);
  line-height: 1.6;
  font-weight: 500;
  flex: 1;
}

.lh-tool-cta {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Drop zone */
.lh-drop {
  border: 2px dashed var(--lh-border-soft);
  border-radius: var(--lh-radius);
  padding: 44px 24px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  background: var(--lh-surface);
}

.lh-drop:hover,
.lh-drop.lh-drop-active {
  background: var(--lh-drop-hover);
  border-color: var(--lh-border);
  border-style: solid;
}

.lh-drop-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  stroke: var(--lh-text);
}

.lh-drop-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.lh-drop-hint {
  font-size: 11px;
  color: var(--lh-muted);
  margin: 0;
  font-weight: 500;
}

/* File list */
.lh-file-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lh-file-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--lh-border-soft);
  border-radius: var(--lh-radius-sm);
  font-size: 11px;
  font-weight: 600;
  background: var(--lh-bg);
}

.lh-file-list .lh-check {
  font-weight: 900;
  flex-shrink: 0;
}

.lh-file-list .lh-fname {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lh-file-list .lh-fsize {
  color: var(--lh-muted);
  font-weight: 500;
  flex-shrink: 0;
}

/* Export list */
.lh-export-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--lh-border-soft);
  border-radius: var(--lh-radius-sm);
  margin-bottom: 8px;
  background: var(--lh-bg);
}

.lh-export-item:last-child {
  margin-bottom: 0;
}

.lh-export-name {
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lh-export-meta {
  font-size: 10px;
  color: var(--lh-muted);
  margin-top: 3px;
  font-weight: 500;
}

.lh-export-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.lh-export-dl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lh-accent-fg);
  background: var(--lh-accent);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--lh-radius-sm);
  border: 2px solid var(--lh-border);
  transition: opacity 0.15s, transform 0.1s;
}

.lh-export-dl:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.lh-empty {
  text-align: center;
  padding: 40px 16px;
  font-size: 11px;
  color: var(--lh-muted);
  font-weight: 600;
}

/* Download success bar */
.lh-download-bar {
  margin-top: 20px;
  padding: 20px 22px;
  border: 2px solid var(--lh-border);
  border-radius: var(--lh-radius);
  background: var(--lh-success-bg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lh-download-bar-text {
  flex: 1;
  min-width: 200px;
}

.lh-download-bar-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 4px;
}

.lh-download-bar-meta {
  font-size: 11px;
  color: var(--lh-muted);
  margin: 0;
  font-weight: 500;
}

/* Preview */
.lh-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.lh-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lh-preview-box {
  padding: 20px;
  background: var(--lh-surface);
  border: 1px solid var(--lh-border-soft);
  border-radius: var(--lh-radius-sm);
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 11px;
  line-height: 1.65;
  color: var(--lh-code);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 420px;
  overflow-y: auto;
}

/* Status */
.lh-status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--lh-radius-sm);
  font-size: 11px;
  font-weight: 700;
  border: 2px solid var(--lh-border);
}

.lh-status-ok {
  background: var(--lh-success-bg);
}

.lh-status-err {
  background: var(--lh-error-bg);
}

/* Info / Detect */
.lh-info {
  margin-top: 20px;
  padding: 20px 22px;
  border: 1px solid var(--lh-border-soft);
  border-radius: var(--lh-radius);
  background: var(--lh-surface);
}

.lh-info h3 {
  margin: 0 0 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lh-info ul {
  margin: 0;
  padding-left: 18px;
  font-size: 11px;
  color: var(--lh-muted);
  line-height: 1.8;
  font-weight: 500;
}

.lh-detect {
  margin-top: 16px;
  border: 2px solid var(--lh-border);
  border-radius: var(--lh-radius);
  overflow: hidden;
}

.lh-detect-head {
  padding: 14px 20px;
  background: var(--lh-accent);
  color: var(--lh-accent-fg);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lh-detect-body {
  padding: 16px 20px;
  background: var(--lh-bg);
}

.lh-detect-file {
  padding: 12px 0;
  border-bottom: 1px solid var(--lh-border-soft);
}

.lh-detect-file:last-child {
  border-bottom: none;
}

.lh-detect-file-name {
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 6px;
}

.lh-detect-map {
  font-size: 10px;
  color: var(--lh-muted);
  font-weight: 600;
  padding-left: 12px;
  border-left: 3px solid var(--lh-border);
  margin-top: 4px;
}

.lh-footer {
  margin-top: 32px;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--lh-muted);
  text-transform: uppercase;
}

/* Login */
.lh-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--lh-bg);
}

.lh-login-card {
  width: 100%;
  max-width: 400px;
  border: 2px solid var(--lh-border);
  border-radius: 20px;
  padding: 40px 36px;
  text-align: center;
  background: var(--lh-surface);
}

.lh-login-card .lh-logo-mark {
  margin: 0 auto 24px;
  width: 56px;
  height: 56px;
  font-size: 16px;
}

.lh-login-card h1 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.lh-login-card p {
  font-size: 11px;
  color: var(--lh-muted);
  margin: 0 0 28px;
  font-weight: 500;
}

.lh-input {
  width: 100%;
  font-family: var(--lh-font);
  font-size: 13px;
  font-weight: 600;
  padding: 14px 16px;
  border: 2px solid var(--lh-border);
  border-radius: var(--lh-radius-sm);
  background: var(--lh-bg);
  color: var(--lh-text);
  margin-bottom: 16px;
  outline: none;
  transition: box-shadow 0.15s;
}

.lh-input:focus {
  box-shadow: var(--lh-shadow);
}

.lh-error {
  background: var(--lh-error-bg);
  border: 2px solid var(--lh-border);
  padding: 12px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 16px;
  border-radius: var(--lh-radius-sm);
}

.lh-scroll-list {
  max-height: 300px;
  overflow-y: auto;
}

.lh-scroll-list::-webkit-scrollbar {
  width: 5px;
}

.lh-scroll-list::-webkit-scrollbar-thumb {
  background: var(--lh-border-soft);
  border-radius: 4px;
}

.lh-hub-intro {
  margin-bottom: 28px;
}

.lh-hub-intro h1 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lh-hub-intro p {
  margin: 0;
  font-size: 12px;
  color: var(--lh-muted);
  font-weight: 500;
  line-height: 1.7;
  max-width: 560px;
}
