:root {
  --bg: #f7fafc;
  --card: #ffffff;
  --fg: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --link: #2563eb;
  --link-hover: #1d4ed8;
  --primary: #2563eb;
  --primary-contrast: #ffffff;
  --success: #16a34a;
  --danger: #dc2626;
  --shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  --card-soft: #f8fafc;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  background: radial-gradient(1200px 600px at 20% -10%, rgba(14, 165, 233, 0.12), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(30, 58, 138, 0.12), transparent 60%),
    linear-gradient(180deg, #f2f6ff 0%, #ffffff 70%);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("../images/qr_creator_logo.png");
  background-size: 280px;
  background-repeat: repeat;
  background-position: center;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

nav.navbar,
main,
footer {
  position: relative;
  z-index: 1;
}

a {
  color: var(--link);
}

a:hover {
  color: var(--link-hover);
}

main.container {
  flex: 1;
}

.navbar {
  background: rgba(255, 255, 255, 0.9) !important;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
}

.navbar-brand {
  font-weight: 800;
  color: var(--fg) !important;
  letter-spacing: 0.3px;
}

.navbar-nav .nav-link {
  color: var(--muted) !important;
  border-radius: 10px;
  padding: 8px 12px !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  background: #eef2ff;
  color: var(--fg) !important;
}

.btn {
  border-radius: 10px;
  font-weight: 600;
  box-shadow: var(--shadow);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-contrast);
}

.btn-primary:hover {
  background: var(--link-hover);
  border-color: var(--link-hover);
}

.btn-outline-primary {
  color: var(--link);
  border-color: var(--link);
}

.btn-outline-primary:hover {
  background: var(--link);
  color: #fff;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.alert {
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.table {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table > :not(caption) > * > * {
  padding: 12px 14px;
  vertical-align: middle;
}

.table-light {
  background: var(--card-soft) !important;
}

.badge {
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
}

footer {
  background: #0f172a;
  color: #e2e8f0;
}

@media (max-width: 767px) {
  .table-mobile-stack table,
  .table-mobile-stack thead,
  .table-mobile-stack tbody,
  .table-mobile-stack th,
  .table-mobile-stack td,
  .table-mobile-stack tr {
    display: block;
    width: 100%;
  }
  .table-mobile-stack thead {
    display: none;
  }
  .table-mobile-stack tr {
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    background: #fff;
  }
  .table-mobile-stack td {
    border: none;
    position: relative;
    padding-left: 45%;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
  .table-mobile-stack td::before {
    content: attr(data-label);
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    color: #64748b;
    width: 40%;
    white-space: nowrap;
  }
  .table-mobile-stack td .btn {
    margin-bottom: 0.35rem;
  }
}
