/* AdminHowTo Tools Suite V7 – improved, colorful unified UI */

:root {
  --aht7-bg: #020617;
  --aht7-bg-soft: rgba(15, 23, 42, 0.9);
  --aht7-surface: rgba(15, 23, 42, 0.95);
  --aht7-border: rgba(148, 163, 184, 0.4);
  --aht7-accent: #2563eb;
  --aht7-accent-soft: rgba(37, 99, 235, 0.2);
  --aht7-accent-2: #7c3aed;
  --aht7-text: #e2e8f0;
  --aht7-text-soft: #94a3b8;
  --aht7-radius-lg: 18px;
  --aht7-shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.6);
}

[data-aht7-theme="light"] {
  --aht7-bg: #f8fafc;
  --aht7-bg-soft: rgba(255, 255, 255, 0.9);
  --aht7-surface: #ffffff;
  --aht7-border: rgba(148, 163, 184, 0.35);
  --aht7-text: #0f172a;
  --aht7-text-soft: #64748b;
}

/* Page layout */
.aht7-page,
.aht7-hub {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  color: var(--aht7-text);
  padding: 40px 16px 60px;
  background:
    radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.16), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(124, 58, 237, 0.18), transparent 60%),
    var(--aht7-bg);
}

.aht7-main,
.aht7-hub-grid,
.aht7-header {
  max-width: 1100px;
  margin: 0 auto;
}

/* Header */
.aht7-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.aht7-header--hub {
  align-items: flex-end;
}

.aht7-brand h1 {
  margin: 6px 0 4px;
  font-size: 1.9rem;
  letter-spacing: -0.03em;
}

.aht7-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--aht7-text-soft);
}

.aht7-chip-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--aht7-text-soft);
}

/* Theme toggle */
.aht7-theme-toggle {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.5));
  width: 54px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  cursor: pointer;
  color: var(--aht7-text-soft);
}

/* Card */
.aht7-card {
  border-radius: var(--aht7-radius-lg);
  border: 1px solid var(--aht7-border);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.78));
  box-shadow: var(--aht7-shadow-soft);
  padding: 22px 22px 24px;
  backdrop-filter: blur(20px);
}

[data-aht7-theme="light"] .aht7-card {
  background: #ffffff;
}

/* Forms & fields */
.aht7-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px 18px;
  margin-bottom: 18px;
}

.aht7-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aht7-field label,
.aht7-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--aht7-text-soft);
}

.aht7-input,
.aht7-field input[type="text"],
.aht7-field input[type="number"],
.aht7-field select,
.aht7-textarea {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.82);
  color: var(--aht7-text);
  padding: 8px 10px;
  font-size: 0.92rem;
  width: 100%;
}

.aht7-input:focus,
.aht7-field input:focus,
.aht7-field select:focus,
.aht7-textarea:focus {
  outline: none;
  border-color: var(--aht7-accent);
  box-shadow: 0 0 0 1px var(--aht7-accent-soft);
}

[data-aht7-theme="light"] .aht7-input,
[data-aht7-theme="light"] .aht7-field input,
[data-aht7-theme="light"] .aht7-field select,
[data-aht7-theme="light"] .aht7-textarea {
  background: #f8fafc;
}

.aht7-textarea {
  min-height: 130px;
  resize: vertical;
}

/* Buttons */
.aht7-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.aht7-btn {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 8px 16px;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  white-space: nowrap;
}

.aht7-btn-primary {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
  color: #f9fafb;
}

.aht7-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.45);
}

.aht7-btn-secondary {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.6);
  color: var(--aht7-text);
}

[data-aht7-theme="light"] .aht7-btn-secondary {
  background: #e2e8f0;
}

.aht7-btn-ghost {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.4);
  color: var(--aht7-text-soft);
}

/* Output */
.aht7-output {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.12), transparent 70%);
  padding: 14px 14px 12px;
  font-size: 0.88rem;
  max-height: 420px;
  overflow: auto;
  margin-top: 6px;
}

.aht7-output-pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  white-space: pre-wrap;
}

/* Hub */
.aht7-hub-search input[type="search"] {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.9);
  color: var(--aht7-text);
  min-width: 230px;
}

[data-aht7-theme="light"] .aht7-hub-search input[type="search"] {
  background: #ffffff;
}

.aht7-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.aht7-hub-tile {
  text-decoration: none;
  color: inherit;
}

.aht7-hub-tile-inner {
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.75));
  box-shadow: var(--aht7-shadow-soft);
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.aht7-hub-tile-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.3), transparent 55%);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.aht7-hub-tile-inner h2 {
  position: relative;
  margin: 0;
  font-size: 1rem;
}

.aht7-hub-tile-inner p {
  position: relative;
  margin: 0;
  font-size: 0.84rem;
  color: var(--aht7-text-soft);
}

.aht7-chip {
  position: relative;
  align-self: flex-start;
  margin-top: 4px;
  font-size: 0.75rem;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  color: var(--aht7-text-soft);
}

.aht7-hub-tile-inner:hover::before {
  opacity: 1;
}

/* Two-column layouts */
.aht7-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 18px;
}

.aht7-range-value {
  font-size: 0.8rem;
  color: var(--aht7-text-soft);
  margin-top: 2px;
}

.aht7-checkboxes label {
  font-size: 0.86rem;
  color: var(--aht7-text-soft);
}

/* Responsive */
@media (max-width: 768px) {
  .aht7-header,
  .aht7-header--hub {
    flex-direction: column;
    align-items: flex-start;
  }

  .aht7-two-col {
    grid-template-columns: minmax(0, 1fr);
  }

  .aht7-hub-search input[type="search"] {
    width: 100%;
  }
}
