html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
}

/* TTS jobs table: clamp text preview to 2 lines and keep it compact. */
.tts-job-text-preview {
  font-size: 0.875rem;
  line-height: 1.25rem;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;

  white-space: normal;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/*
  App UI theme layer
  - Keeps Bootstrap as the base.
  - Adds a consistent, modern look with minimal custom CSS.
  - Mobile-first: avoids fixed widths and prefers comfortable spacing.
*/

:root {
  --app-surface: #ffffff;
  --app-bg: #f6f8fb;
  --app-text: #0f172a;
  --app-muted: #64748b;
  --app-border: rgba(15, 23, 42, 0.10);
  --app-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  --app-shadow-sm: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.app-body {
  color: var(--app-text);
  background:
    radial-gradient(900px 340px at 18% -10%, rgba(13, 110, 253, 0.14), transparent 60%),
    radial-gradient(720px 300px at 90% 0%, rgba(32, 201, 151, 0.10), transparent 55%),
    var(--app-bg);
}

.app-shell {
  padding-top: 1.25rem;
  padding-bottom: 2rem;
}

.app-main {
  padding-bottom: 1.25rem;
}

.app-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--app-border);
}

.app-navbar .navbar-nav .nav-link {
  border-radius: .75rem;
  padding: .5rem .75rem;
}

.app-navbar .navbar-nav .nav-link:hover {
  background: rgba(13, 110, 253, 0.08);
}

.app-footer {
  border-top: 1px solid var(--app-border);
  padding: 1.25rem 0;
  background: rgba(255, 255, 255, 0.75);
}

.app-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 1rem;
  box-shadow: var(--app-shadow-sm);
}

.app-card .card-header {
  background: rgba(248, 250, 252, 0.8);
  border-bottom: 1px solid var(--app-border);
}

.app-page-header {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--app-border);
  border-radius: 1.25rem;
  box-shadow: var(--app-shadow);
  padding: 1rem;
}

@media (min-width: 768px) {
  .app-page-header {
    padding: 1.25rem 1.25rem;
  }
}

.app-page-title {
  letter-spacing: -0.02em;
}

.app-subtitle {
  color: var(--app-muted);
}

.app-kpi {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .6rem;
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.08);
  color: #084298;
  font-size: .875rem;
}

.app-list-item {
  border: 1px solid var(--app-border);
  border-radius: 1rem;
}

.app-list-item + .app-list-item {
  margin-top: .75rem;
}

.app-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.app-sticky-actions {
  position: sticky;
  bottom: .75rem;
  z-index: 1020;
}

.app-sticky-actions .app-card {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.92);
}

.app-clickable-row {
  cursor: pointer;
}