:root {
  --bg: #f4ede3;
  --bg-accent: #fde4c7;
  --surface: rgba(255, 252, 247, 0.78);
  --surface-strong: #fffaf2;
  --surface-dark: #1f2937;
  --border: rgba(107, 70, 35, 0.16);
  --shadow: 0 24px 80px rgba(114, 73, 29, 0.16);
  --text: #1f2933;
  --muted: #6b7280;
  --primary: #d97706;
  --primary-dark: #9a5807;
  --secondary: #154c79;
  --success: #176b45;
  --danger: #9f1239;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font-sans: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
}

html,
body {
  min-height: 100%;
}

body {
  position: relative;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(217, 119, 6, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(21, 76, 121, 0.18), transparent 26%),
    linear-gradient(180deg, #fff7ec 0%, var(--bg) 46%, #efe4d5 100%);
  color: var(--text);
  font-family: var(--font-sans);
}

.page-backdrop {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 32%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0 2px, transparent 2px 18px);
  pointer-events: none;
}

.app-shell {
  position: relative;
  z-index: 1;
  padding: 32px 20px 28px;
}

.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.auth-panel {
  width: min(100%, 980px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 24px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-copy h1 {
  margin: 8px 0 14px;
  max-width: 10ch;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.4vw, 4.1rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.auth-copy p {
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
  line-height: 1.7;
}

.hero-panel,
.content-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
  gap: 24px;
  padding: 32px;
  overflow: hidden;
}

.hero-copy h1 {
  margin: 0;
  max-width: 10ch;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.3rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
}

.hero-copy p,
.section-heading p {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.eyebrow,
.section-kicker,
.metric-label {
  display: inline-block;
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-metrics {
  display: grid;
  gap: 14px;
}

.hero-config {
  align-content: start;
}

.metric-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid rgba(21, 76, 121, 0.1);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(250, 244, 234, 0.9));
}

.metric-card strong {
  font-size: 1rem;
  font-weight: 600;
}

.account-card {
  align-items: flex-start;
}

.metric-help {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.arl-card {
  gap: 14px;
}

.arl-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-pill,
.quality-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
}

.status-pill {
  color: var(--secondary);
  background: rgba(21, 76, 121, 0.1);
}

.quality-pill {
  color: var(--primary-dark);
  background: rgba(217, 119, 6, 0.12);
}

.arl-input {
  min-height: 118px;
  resize: vertical;
  border: 1px solid rgba(21, 76, 121, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
}

.arl-footnote {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.player-card audio {
  width: 100%;
  height: 42px;
}

.content-panel {
  margin-top: 24px;
  padding: 18px;
}

.nav-wrap {
  margin-bottom: 22px;
}

.app-nav {
  gap: 10px;
  border-bottom: none;
}

.app-nav .nav-link {
  border: none;
  border-radius: 999px;
  padding: 11px 18px;
  color: var(--muted);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.55);
  transition: all 0.2s ease;
}

.app-nav .nav-link:hover,
.app-nav .nav-link:focus {
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
}

.app-nav .nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #f59e0b);
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.25);
}

.app-tabs {
  min-height: 620px;
}

.tab-pane {
  padding: 8px 8px 2px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-heading h2,
.form-card h3 {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.2vw, 2.5rem);
  line-height: 1;
}

.search-bar-wrap {
  margin-bottom: 18px;
}

.search-container {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 10px 12px 10px 18px;
  border: 1px solid rgba(21, 76, 121, 0.12);
  border-radius: 999px;
  background: var(--surface-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.search-icon {
  color: var(--primary);
  font-size: 1rem;
}

input.search,
.app-input,
textarea.form-control {
  color: var(--text);
  font-family: var(--font-sans);
}

input.search {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1.06rem;
}

input.search::placeholder,
.app-input::placeholder,
textarea.form-control::placeholder {
  color: #9ca3af;
}

button.search {
  border: none;
  background: transparent;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--muted);
}

.primary-search-button {
  min-width: 132px;
  padding: 0 18px;
  height: 48px;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--secondary), #1d6fa5);
  box-shadow: 0 12px 24px rgba(21, 76, 121, 0.2);
}

.tabs-category {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.btn-category {
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-category.active {
  border-color: rgba(217, 119, 6, 0.2);
  color: var(--primary-dark);
  background: rgba(253, 228, 199, 0.78);
}

.results-panel,
.form-card,
.console-card,
.notice-card {
  border: 1px solid rgba(107, 70, 35, 0.1);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.68);
}

.results-panel {
  overflow: hidden;
}

.form-card,
.console-card {
  padding: 22px;
}

.config-card {
  max-width: 760px;
}

.auth-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2vw, 2.4rem);
}

.notice-card {
  margin-bottom: 18px;
  padding: 16px 18px;
  color: var(--danger);
  background: rgba(255, 241, 242, 0.82);
}

.notice-card a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

.split-inputs,
.stack-grid {
  display: grid;
  gap: 18px;
}

.split-inputs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-input {
  height: 58px;
  border: 1px solid rgba(21, 76, 121, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
}

.app-input:focus,
textarea.form-control:focus {
  border-color: rgba(217, 119, 6, 0.38);
  box-shadow: 0 0 0 0.2rem rgba(217, 119, 6, 0.12);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.compact-row {
  gap: 10px;
}

.app-btn {
  min-width: 144px;
  padding: 11px 18px;
  border: none;
  border-radius: 999px;
  font-weight: 700;
}

.app-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #f59e0b);
}

.app-btn-secondary {
  color: #fff;
  background: linear-gradient(135deg, var(--secondary), #1d6fa5);
}

.app-btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.74);
}

.app-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.results-table,
.queue-table {
  margin: 0;
}

.results-table thead th,
.queue-table thead th {
  border-top: none;
  border-bottom: 1px solid rgba(107, 70, 35, 0.12);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.results-table tbody td,
.queue-table tbody td {
  vertical-align: middle;
  border-top: 1px solid rgba(107, 70, 35, 0.08);
}

.results-table img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.16);
}

.actions-col {
  text-align: right;
}

.results-table .btn,
.queue-table .btn {
  margin-left: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
}

.action-btn {
  width: 42px;
  height: 42px;
  padding: 0;
}

.action-dropdown .dropdown-toggle::after {
  margin-left: 8px;
}

.action-dropdown .dropdown-menu {
  min-width: 210px;
  border: 1px solid rgba(107, 70, 35, 0.12);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.action-dropdown .dropdown-item {
  padding: 10px 14px;
  font-weight: 600;
}

.action-dropdown .dropdown-item:active {
  background: rgba(217, 119, 6, 0.14);
  color: var(--text);
}

.empty-row td {
  padding: 28px 18px;
  color: var(--muted);
  text-align: center;
 }

.console-card textarea.form-control {
  min-height: 420px;
  border: none;
  border-radius: 16px;
  background: var(--surface-dark);
  color: #e5eef8;
  font-family: "SFMono-Regular", "Menlo", monospace;
}

#werbung:link,
#werbung:visited,
#werbung:hover,
#werbung:active {
  color: #dc2626;
}

.app-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 10px 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.app-footer a {
  text-decoration: none;
}

.jGrowl.top-right {
  right: 18px;
  top: 18px;
}

div.jGrowl div.jGrowl-notification,
div.jGrowl div.jGrowl-closer {
  border-radius: 16px;
  background: rgba(31, 41, 51, 0.92);
}

@media (max-width: 991px) {
  .auth-panel,
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .split-inputs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .auth-shell,
  .app-shell {
    padding: 18px 12px 22px;
  }

  .auth-panel,
  .hero-panel,
  .content-panel,
  .form-card,
  .console-card {
    padding: 18px;
  }

  .hero-copy h1 {
    max-width: none;
  }

  .search-container {
    min-height: auto;
    border-radius: 28px;
    flex-wrap: wrap;
  }

  input.search,
  .primary-search-button {
    width: 100%;
  }

  .primary-search-button {
    height: 44px;
  }

  .results-panel {
    overflow-x: auto;
  }

  .app-tabs {
    min-height: 0;
  }

  .console-card textarea.form-control {
    min-height: 300px;
  }
}
