:root {
  --page-bg: #edf3fb;
  --panel-bg: #f4f8ff;
  --app-ink: #17324d;
  --app-muted: #5f728a;
  --app-border: rgba(23, 50, 77, 0.14);
  --app-accent: #0f8f7f;
  --app-accent-strong: #0a6b60;
  --app-warm: #e56f34;
  --app-surface: rgba(255, 255, 255, 0.84);
  --app-shadow: 0 16px 36px rgba(15, 37, 66, 0.12);
}

html {
  font-size: 15px;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--app-ink);
  font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
  background:
    radial-gradient(circle at 8% -8%, rgba(15, 143, 127, 0.22), transparent 40%),
    radial-gradient(circle at 92% 5%, rgba(229, 111, 52, 0.18), transparent 34%),
    linear-gradient(180deg, #fbf9f4 0%, var(--page-bg) 62%, #e8eef8 100%);
  background-attachment: fixed;
}

a {
  color: var(--app-accent-strong);
}

a:hover {
  color: #075048;
}

.app-shell {
  margin-inline: auto;
}

.app-header,
.app-content,
.app-footer,
.layout-modal-main {
  position: relative;
}

.app-header {
  position: relative;
  padding-top: .5rem;
}

.app-nav {
  border: 1px solid var(--app-border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.8);
  padding: 0.65rem 1rem;
  box-shadow: var(--app-shadow);
  backdrop-filter: blur(10px);
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--app-ink);
}

.app-brand:hover {
  color: var(--app-ink);
}

.app-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.85rem;
  color: #fff;
  font-family: "Bahnschrift", "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(140deg, var(--app-accent), var(--app-warm));
  box-shadow: 0 10px 18px rgba(16, 73, 110, 0.28);
}

.app-brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.app-brand-title {
  font-family: "Bahnschrift", "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.app-brand-subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.app-nav-toggle {
  border: 1px solid rgba(23, 50, 77, 0.25);
  border-radius: 0.75rem;
  padding: 0.35rem 0.55rem;
}

.app-nav-toggle:focus {
  box-shadow: 0 0 0 0.2rem rgba(15, 143, 127, 0.2);
}

.app-primary-nav {
  gap: 0.35rem;
}

.app-nav-link {
  border-radius: 999px;
  padding: 0.42rem 0.9rem !important;
  color: var(--app-muted) !important;
  font-weight: 700;
  transition: all 0.22s ease;
}

.app-nav-link:hover {
  color: var(--app-ink) !important;
  background: rgba(23, 50, 77, 0.08);
}

.app-nav-link.active {
  color: #fff !important;
  background: linear-gradient(135deg, var(--app-accent), #1f7fa5);
  box-shadow: 0 10px 20px rgba(13, 106, 133, 0.28);
}

.app-auth-nav {
  margin-left: auto;
}

.app-account-link {
  border-radius: 999px;
  padding: 0.35rem 0.8rem !important;
  color: var(--app-ink) !important;
  font-weight: 600;
  background: rgba(23, 50, 77, 0.07);
}

.app-login-button,
.app-logout-button {
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-weight: 700;
}

.app-login-button {
  border: 0;
  color: #fff;
  background: linear-gradient(140deg, var(--app-warm), #f39b40);
  box-shadow: 0 12px 20px rgba(229, 111, 52, 0.3);
}

.app-login-button:hover {
  color: #fff;
  transform: translateY(-1px);
}

.app-logout-button {
  border: 1px solid rgba(23, 50, 77, 0.18);
  color: var(--app-ink);
  background: #fff;
}

.app-logout-button:hover {
  color: var(--app-ink);
  background: #f9fcff;
  border-color: rgba(23, 50, 77, 0.34);
}

.app-content {
  padding: .5rem;
  animation: layout-rise 420ms ease-out;
}

.app-alert-stack .alert {
  border: 0;
  border-radius: 0.95rem;
  box-shadow: 0 10px 24px rgba(15, 37, 66, 0.12);
}

.app-main-surface {
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 1.45rem;
  padding: 1.1rem;
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.app-footer {
  padding-bottom: 1.2rem;
}

.app-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--app-border);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.78);
  color: var(--app-muted);
  padding: 0.75rem 1rem;
}

.app-footer-link {
  font-weight: 700;
  text-decoration: none;
}

.app-footer-link:hover {
  text-decoration: underline;
}

.layout-modal-main {
  padding: 0.5rem;
}

@keyframes layout-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 991.98px) {
  .app-shell {
    width: min(1320px, calc(100% - 1.1rem));
  }

  .app-nav {
    padding: 0.6rem 0.8rem;
  }

  .app-nav-shell {
    border-top: 1px solid rgba(23, 50, 77, 0.12);
    margin-top: 0.7rem;
    padding-top: 0.7rem;
  }

  .app-primary-nav {
    margin-bottom: 0.45rem !important;
  }

  .app-auth-nav {
    margin-left: 0;
  }
}

@media (max-width: 575.98px) {
  .app-main-surface {
    border-radius: 1.1rem;
    padding: 0.85rem;
  }

  .app-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-content,
  .app-nav-link,
  .app-login-button {
    animation: none;
    transition: none;
  }
}

.hero-panel {
  background: linear-gradient(130deg, #eaf2ff 0%, #f8fbff 100%);
  border: 1px solid #deebff;
}

.preview-frame {
  min-height: 62vh;
}

.preview-iframe {
  min-height: 62vh;
  border: 0;
}

.preview-video {
  min-height: 50vh;
  background: #000;
}

.card-footer .btn {
  min-width: 86px;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(15, 143, 127, 0.2);
}

.qr-page-header h1 {
  font-weight: 700;
}

.qr-editor-card {
  border-radius: 14px;
  background: #ffffff;
}

.qr-virtual-path-banner {
  background: #f8fbff;
  border-color: #d9e7fb !important;
}

.qr-form-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.qr-form-section {
  border: 1px solid #e8eef7;
  border-radius: 12px;
  padding: 1rem;
  background: #fbfdff;
}

.qr-form-section-title {
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #2f4b6a;
  margin-bottom: 0.75rem;
}

.qr-switch-surface {
  background: #f5f8fd;
}

.qr-form-actions {
  border-color: #e7edf6 !important;
}

.qr-upload-progress {
  border: 1px solid #d6e2f2;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: #f7fbff;
}

.qr-upload-progress-track {
  height: 0.9rem;
  margin-bottom: 0.45rem;
}

.qr-upload-progress-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: #335273;
}

.qr-validation-summary.validation-summary-valid {
  display: none;
}

.qr-validation-summary ul {
  margin-bottom: 0;
  padding-left: 1rem;
}

.dashboard-list-table thead th {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6f7f93;
  border-bottom-color: #dfe7f3;
  white-space: nowrap;
}

.dashboard-sort-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 700;
}

.dashboard-sort-link:hover {
  color: #334155;
  text-decoration: none;
}

.dashboard-sort-indicator {
  font-size: 0.78rem;
  line-height: 1;
  color: #2563eb;
}

.dashboard-sort-indicator.inactive {
  color: #9ca3af;
}

.dashboard-list-table tbody td {
  border-color: #edf2f8;
}

.dashboard-title-cell .dashboard-title {
  font-weight: 600;
}

.dashboard-meta {
  font-size: 0.82rem;
  color: #64748b;
  text-decoration: none;
}

.dashboard-meta:hover {
  color: #334155;
  text-decoration: underline;
}

.dashboard-url-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dashboard-copy-btn {
  width: 1.45rem;
  height: 1.45rem;
  padding: 0;
}

.dashboard-copy-btn svg {
  width: 0.75rem;
  height: 0.75rem;
}

.dashboard-type-icon {
  width: 0.85rem;
  height: 0.85rem;
}

.dashboard-qr-thumb-btn {
  border: 0;
  background: transparent;
  padding: 0;
  line-height: 0;
  border-radius: 8px;
}

.dashboard-qr-thumb-btn:hover .dashboard-qr-thumb {
  border-color: #93b4e8;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.dashboard-qr-thumb {
  width: 42px;
  height: 42px;
  border: 1px solid #dbe4f1;
  border-radius: 8px;
  padding: 2px;
  background: #fff;
  flex: 0 0 auto;
  cursor: zoom-in;
}

.dashboard-qr-modal-image {
  max-width: min(86vw, 620px);
  max-height: 70vh;
  border: 1px solid #dbe4f1;
  border-radius: 12px;
  padding: 8px;
  background: #fff;
}

.dashboard-form-modal-dialog {
  max-width: min(1200px, 96vw);
}

.dashboard-form-modal-body {
  position: relative;
  min-height: 78vh;
}

.dashboard-form-loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.95);
  color: #2f4b6a;
  font-weight: 600;
}

.dashboard-form-iframe {
  width: 100%;
  min-height: 78vh;
  border: 0;
  background: #fff;
  display: block;
}

.dashboard-action-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.icon-action-btn {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.icon-action-btn svg {
  width: 1rem;
  height: 1rem;
}
