:root {
  --primary: #0d1b3e;
  --primary-light: #1a3a6b;
  --accent: #00b4d8;
  --accent-hover: #0096b4;
  --sidebar-width: 280px;
  --text-light: #e0e6f0;
  --text-muted: #8899bb;
  --bg-gradient-1: #e8edf5;
  --bg-gradient-2: #d5ddee;
  --glass-bg: rgba(255,255,255,0.55);
  --glass-border: rgba(255,255,255,0.45);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.08);
  --glass-blur: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-1), var(--bg-gradient-2));
  color: #1a1a2e;
  -webkit-font-smoothing: antialiased;
  max-width: 100vw;
  overflow-x: hidden;
}

/* ── page layout ── */
.page {
  display: flex;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand-header {
  padding: 1.3rem 1rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}

.brand-logo {
  max-height: 306px;
  max-width: 100%;
  display: block;
  margin: 0 auto;
}

.brand-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
  margin: 0.6rem 0 0;
  letter-spacing: 0.5px;
  opacity: 0.9;
}
.agent-timer {
  display: inline-flex;
  align-items: center;
  margin-left: 0.45rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(0,180,216,0.18);
  color: #fff;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

a {
  color: inherit;
  text-decoration: none;
}
.desktop-nav {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.desktop-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}
.desktop-nav li {
  margin: 0;
}
.desktop-nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}
.desktop-nav a:visited {
  color: #fff;
}
.desktop-nav a:hover {
  background: rgba(255,255,255,0.06);
  border-left-color: var(--accent);
  color: #fff;
}
.desktop-nav a.active {
  background: rgba(255,255,255,0.1);
  border-left-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.nav-icon {
  width: 26px;
  height: 26px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ── main content ── */
main {
  flex: 1;
  padding: 2rem 2.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
  max-width: 100%;
}

.content {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.content h3 {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.3px;
}

/* ── glass card (shared) ── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: var(--glass-shadow);
}

/* ── tables ── */
.table {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
}

.table th {
  background: rgba(13,27,62,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0.8rem 1rem;
  border: none;
}

.table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(220,225,234,0.5);
  vertical-align: middle;
  background: transparent;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background: rgba(255,255,255,0.4);
}

/* ── filter buttons ── */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.filter-bar .btn {
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  transition: all 0.15s ease;
}

.filter-bar .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,180,216,0.25);
}

.filter-bar .btn-outline-primary {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  color: var(--primary);
}

.filter-bar .btn-outline-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,180,216,0.25);
}

/* ── badges ── */
.badge {
  font-size: 0.7rem;
  padding: 0.3em 0.7em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 20px;
}

.bg-success {
  background: rgba(5,150,105,0.75) !important;
  backdrop-filter: blur(4px);
}

.bg-warning {
  background: rgba(217,119,6,0.75) !important;
  backdrop-filter: blur(4px);
}

.bg-info {
  background: var(--accent) !important;
}

/* ── forms ── */
.form-control, .form-select {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  font-size: 0.9rem;
  padding: 0.6rem 0.9rem;
  color: #1a1a2e;
  transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0,180,216,0.15);
  background: rgba(255,255,255,0.7);
  outline: none;
}

.form-control::placeholder {
  color: #99aabb;
}

.form-label {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--primary);
  margin-bottom: 0.35rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* ── edit user password reset row ── */
.edit-password-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.edit-password-row .form-control {
  flex: 1;
}

/* ── edit form container ── */
.edit-form-container {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: var(--glass-shadow);
  padding: 1.5rem 2rem;
  max-width: 720px;
}

.edit-form-container .mb-3 {
  margin-bottom: 1.25rem;
}

/* ── user list edit form ── */
.edit-user-form {
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.5);
  border-radius: 10px;
  border: 1px solid var(--glass-border);
}
.edit-user-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.status-card-row .btn-outline-primary.btn-sm {
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
}

/* ── buttons ── */
.btn {
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.55rem 1.4rem;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(0,180,216,0.2);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(0,180,216,0.3);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  color: var(--primary);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.7);
  border-color: #c0c8d8;
}

/* ── detail view glass ── */
.detail-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: var(--glass-shadow);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

/* ── approval actions ── */
.approval-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.approval-actions .btn-success {
  background: rgba(5,150,105,0.8);
  border: none;
}
.approval-actions .btn-success:hover {
  background: rgba(5,150,105,1);
}
.approval-actions .btn-danger {
  background: rgba(220,38,38,0.8);
  border: none;
}
.approval-actions .btn-danger:hover {
  background: rgba(220,38,38,1);
}

/* ── pre / code blocks ── */
pre {
  background: rgba(30,30,46,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #cdd6f4;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.5;
  border: 1px solid rgba(255,255,255,0.06);
}

/* ── alerts ── */
.alert-danger {
  border-radius: 10px;
  border: 1px solid rgba(153,27,27,0.2);
  background: rgba(254,242,242,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #991b1b;
}

/* ── footer ── */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  max-width: calc(100vw - var(--sidebar-width));
  overflow-x: hidden;
}
main {
  flex: 1;
}
.site-footer {
  position: fixed;
  bottom: 0;
  left: var(--sidebar-width);
  right: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(13,27,62,0.97), rgba(26,58,107,0.97));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-light);
  padding: 1rem 2rem 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.footer-section {
  flex: 1;
  min-width: 0;
}
.footer-logo {
  display: none;
}
.footer-copy {
  font-size: 0.72rem;
  opacity: 0.7;
  margin: 0 0 0.15rem;
}
.footer-version {
  font-size: 0.65rem;
  opacity: 0.5;
  margin: 0;
  font-family: monospace;
}
.footer-section h4 {
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 0.5rem;
}
.footer-section a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  padding: 0.15rem 0;
  transition: color 0.15s ease;
}
.footer-section a:hover {
  color: var(--accent);
}
.footer-social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--text-muted);
  padding: 0;
  transition: all 0.15s ease;
}
.footer-social a:hover {
  background: var(--accent);
  color: #fff;
}
.footer-social svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.footer-policies {
  flex: none;
  display: flex;
  gap: 1rem;
  align-items: center;
}
.footer-policies a {
  font-size: 0.7rem;
  opacity: 0.7;
  white-space: nowrap;
}
.footer-policies a:hover {
  opacity: 1;
}

/* ── nav more dropdown ── */
.nav-main {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}
.nav-more {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.08);
  position: relative;
}
.nav-more > .nav-more-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.15s ease;
  border-left: 3px solid transparent;
  list-style: none;
}
.nav-more > .nav-more-toggle::-webkit-details-marker {
  display: none;
}
.nav-more > .nav-more-toggle:hover {
  background: rgba(255,255,255,0.06);
  border-left-color: var(--accent);
}
.nav-more-label {
  font-size: 1.1rem;
  font-weight: 500;
}
.nav-more[open] > .nav-more-toggle {
  background: rgba(255,255,255,0.06);
}
.nav-more-dropdown {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 0.5rem 0;
  z-index: 50;
}
.nav-more[open] > .nav-more-dropdown {
  display: block;
}
.nav-more-user {
  padding: 0.5rem 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 0.25rem;
}
.nav-more-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.5rem;
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.15s ease;
  border-left: 3px solid transparent;
}
.nav-more-item:hover {
  background: rgba(255,255,255,0.06);
  border-left-color: var(--accent);
  color: #fff;
}
.nav-more-item-danger:hover {
  border-left-color: #ef4444;
}

/* ── public layout (login pages) ── */
.page-public {
  display: flex;
  min-height: 100vh;
}
.main-public {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0 1rem 2rem;
  background: linear-gradient(135deg, var(--bg-gradient-1), var(--bg-gradient-2));
}

/* ── login screen ── */
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 0 1rem 3rem;
  width: 100%;
}
.login-card {
  width: min(28rem, 100%);
  margin-top: 0;
  padding: 2rem;
  border-radius: 1.4rem;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.login-logo {
  display: block;
  margin: 0 auto 1rem;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
}
.login-card-mobile {
  width: 100%;
}
.login-card h1 {
  margin: 0.25rem 0 0.6rem;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.8rem;
}
.login-card h2 {
  margin: 0.25rem 0 0.6rem;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.4rem;
}
.login-copy {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.login-form {
  display: grid;
}
.login-submit {
  margin-top: 2rem;
}
.login-error {
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.9rem;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.32);
  border: 1px solid rgba(248, 113, 113, 0.24);
  font-size: 0.85rem;
}
.login-success {
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.9rem;
  color: #bbf7d0;
  background: rgba(22, 101, 52, 0.28);
  border: 1px solid rgba(74, 222, 128, 0.2);
  font-size: 0.85rem;
}
.login-mode-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}
.login-mode-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(0, 180, 216, 0.08);
  border: 1px solid rgba(0, 180, 216, 0.18);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.login-mode-tab:hover,
.login-mode-tab:focus-visible {
  background: rgba(0, 180, 216, 0.14);
  border-color: rgba(0, 180, 216, 0.32);
  box-shadow: 0 0 0 0.16rem rgba(0, 180, 216, 0.18);
}
.login-mode-tab.is-active {
  background: linear-gradient(135deg, rgba(0, 180, 216, 0.9), rgba(0, 150, 180, 0.88));
  border-color: rgba(0, 180, 216, 0.96);
  color: #f8fafc;
  box-shadow: 0 0.65rem 1.35rem rgba(0, 180, 216, 0.18);
}
.login-tab-panel {
  min-height: 16rem;
}
.login-qr-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
}
.login-qr-image {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.login-qr-placeholder {
  padding: 3rem 1rem;
  color: var(--text-muted);
  text-align: center;
}
.login-qr-status {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}
.login-qr-link {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
}
.eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
}
.login-inline-links {
  margin-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  justify-content: flex-start;
}
.login-inline-links a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

/* main padding to clear fixed footer */
main {
  padding-bottom: 80px;
}

/* ── policy pages ── */
.policy-content {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: var(--glass-shadow);
  padding: 1.5rem 2rem;
  max-width: 860px;
  line-height: 1.7;
  font-size: 0.9rem;
}
.policy-content h4 {
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
  margin: 1.5rem 0 0.5rem;
}
.policy-content h4:first-of-type {
  margin-top: 0;
}
.policy-content p {
  margin: 0 0 0.75rem;
}
.policy-content ul {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
}
.policy-content li {
  margin-bottom: 0.3rem;
}
.policy-content em {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ── status cards (pending / in-progress) ── */
.status-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.status-card {
  padding: 1.25rem;
}
.status-card h4 {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.status-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(200,210,224,0.3);
}
.status-card-row:last-child {
  border-bottom: none;
}
.status-card-app {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}
.status-card-count {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(0,180,216,0.1);
  padding: 0.1rem 0.6rem;
  border-radius: 20px;
  min-width: 28px;
  text-align: center;
}
.status-card-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.agent-workload,
.agent-activity,
.agent-cost {
  padding: 1rem;
  margin-bottom: 1rem;
}

.agent-workload-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.agent-workload-header h4 {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.agent-workload-header span {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.agent-workload-table {
  display: grid;
  gap: 0.35rem;
}

.agent-workload-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.75fr) minmax(110px, 0.75fr) minmax(78px, 0.42fr) minmax(130px, 0.9fr) minmax(180px, 2fr) minmax(140px, 0.9fr);
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(200,210,224,0.28);
  font-size: 0.82rem;
}

.agent-workload-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-workload-row:last-child {
  border-bottom: none;
}

.agent-workload-head {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.agent-name {
  color: var(--primary);
  font-weight: 700;
}

.agent-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.agent-status-busy {
  color: #7a4d00;
  background: rgba(255, 193, 7, 0.18);
}

.agent-status-idle {
  color: #0f6b3f;
  background: rgba(25, 135, 84, 0.14);
}

.agent-status-other {
  color: var(--text-muted);
  background: rgba(108, 117, 125, 0.12);
}

.agent-current a {
  color: var(--accent);
  text-decoration: none;
}

.agent-current a:hover {
  text-decoration: underline;
}

.agent-log-line {
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(200,210,224,0.28);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.agent-log-line:last-child {
  border-bottom: none;
}

.agent-cost-table {
  display: grid;
  gap: 0.35rem;
}

.agent-cost-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) repeat(7, minmax(82px, 0.7fr));
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(200,210,224,0.28);
  font-size: 0.82rem;
}

.agent-cost-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-cost-row:last-child {
  border-bottom: none;
}

@media (max-width: 768px) {
  .status-cards {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .agent-workload-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding: 0.65rem 0;
  }

  .agent-workload-head {
    display: none;
  }

  .agent-workload-row > span {
    white-space: normal;
  }

  .agent-cost-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem 0.75rem;
    padding: 0.65rem 0;
  }

  .agent-cost-row > span {
    white-space: normal;
  }

  .agent-cost-row.agent-workload-head {
    display: none;
  }

  .agent-workload-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }
}

/* ── chart container ── */
.chart-wrap {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--glass-shadow);
}
.chart-wrap h4 {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.chart-canvas-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* ── charts carousel: horizontal swipe on mobile, 2-per-row on desktop ── */
.charts-carousel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.charts-carousel .chart-wrap {
  margin-bottom: 0;
}
@media (max-width: 768px) {
  .charts-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 1rem;
    margin: 0 -0.25rem;
    padding: 0 0.25rem 0.5rem;
  }
  .charts-carousel::-webkit-scrollbar { display: none; }
  .charts-carousel .chart-wrap {
    flex: 0 0 85%;
    scroll-snap-align: start;
    min-width: 0;
    margin-bottom: 0;
  }
}

/* ── detail header ── */
.detail-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.detail-header h3 {
  margin: 0;
  font-size: 1.15rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-header .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

/* ── app carousel (arrows for navigation) ── */
.app-carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: calc(100vh - 220px);
  overflow: hidden;
  min-width: 0;
}
.app-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 0;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.app-carousel::-webkit-scrollbar { display: none; }
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  box-shadow: var(--glass-shadow);
}
.carousel-arrow:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.carousel-arrow:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.carousel-arrow-left {
  left: 0;
}
.carousel-arrow-right {
  right: 0;
}
.carousel-arrow svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* Hide carousel arrows on mobile - use swipe instead */
@media (max-width: 768px) {
  .carousel-arrow {
    display: none !important;
  }
}

.app-panel {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  scroll-snap-align: start;
  padding: 0 2.25rem;
  overflow: hidden;
}
.app-panel-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0 0.25rem;
}
.app-panel-header h4 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin: 0;
}
.app-panel-count {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.7;
}
.bug-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.25rem;
  min-width: 0;
}

/* ── bug card (two rows) ── */
.bug-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  box-shadow: var(--glass-shadow);
  user-select: none;
  -webkit-user-select: none;
  max-width: 100%;
  min-width: 0;
}
.bug-card-row1 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
  min-width: 0;
}
.bug-card-id {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  font-family: monospace;
  flex-shrink: 0;
}
.bug-card-summary {
  flex: 1;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #1a1a2e;
  min-width: 0;
  padding-right: 8px;
}
.bug-card-date {
  font-size: 0.65rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.bug-card-row2 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
  max-width: 100%;
}
.bug-card-row2 > .badge {
  order: 1;
  flex: 0 0 auto;
}

/* ── mini wizard (inside card) ── */
.bug-card-wizard {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  order: 2;
  flex: 0 0 100%;
  min-width: 0;
  width: 100%;
  margin-top: 0.35rem;
  justify-content: center;
  overflow: hidden;
}
.wiz-step {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 1 auto;
  min-width: 0;
}
.wiz-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c0c8d8;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.wiz-step.wiz-done .wiz-dot {
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(0,180,216,0.2);
}
.wiz-step.wiz-active .wiz-dot {
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(0,180,216,0.3);
  animation: wiz-pulse 1.5s infinite;
}
@keyframes wiz-pulse {
  0% { box-shadow: 0 0 0 0 rgba(0,180,216,0.4); }
  70% { box-shadow: 0 0 0 5px rgba(0,180,216,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,180,216,0); }
}
.wiz-label {
  font-size: 0.55rem;
  font-weight: 600;
  color: #c0c8d8;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  white-space: normal;
  line-height: 1.1;
  text-align: center;
}
.wiz-step.wiz-done .wiz-label { color: var(--accent); }
.wiz-step.wiz-active .wiz-label { color: var(--accent); }
.wiz-line {
  width: clamp(8px, 1.8vw, 28px);
  height: 2px;
  background: #c0c8d8;
  border-radius: 1px;
  margin: 0 2px;
  margin-bottom: 0;
  transition: all 0.2s ease;
  flex: 0 1 clamp(8px, 1.8vw, 28px);
}
.wiz-line.wiz-line-done { background: var(--accent); }

/* ── card action buttons ── */
.bug-card-actions {
  display: flex;
  gap: 0.3rem;
  order: 1;
  flex-shrink: 0;
  margin-left: auto;
}
.bug-card-actions a,
.bug-card-actions button {
  padding: 0.25rem 0.55rem;
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 7px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.card-action-view {
  color: #fff;
  background: var(--accent);
  border: none;
}
.card-action-view:hover { background: var(--accent-hover); }
.card-action-reopen {
  color: var(--text-muted);
  background: transparent;
  border: 1px solid #c0c8d8;
}
.card-action-reopen:hover { border-color: var(--accent); color: var(--accent); }

/* ── status steps wizard ── */
.status-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: var(--glass-shadow);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-width: 80px;
}
.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  background: #c0c8d8;
  transition: all 0.2s ease;
}
.step-completed .step-circle {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(0,180,216,0.2);
}
.step-active .step-circle {
  background: var(--accent);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0,180,216,0.4); }
  70% { box-shadow: 0 0 0 8px rgba(0,180,216,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,180,216,0); }
}
.step-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.step-completed .step-label {
  color: var(--accent);
}
.step-connector {
  width: 48px;
  height: 3px;
  background: #c0c8d8;
  margin: 0 4px;
  margin-bottom: 1.6rem;
  border-radius: 2px;
  transition: all 0.2s ease;
}
.connector-completed {
  background: var(--accent);
}

/* ── bug detail timeline ── */
.timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.timeline-section {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: var(--glass-shadow);
  padding: 1rem;
  min-width: 0;
}
.timeline-section-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}
.timeline-step-number {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  flex: none;
}
.timeline-section h4 {
  margin: 0 0 0.25rem;
  color: var(--primary);
  font-size: 0.95rem;
}
.timeline-meta {
  display: grid;
  gap: 0.25rem;
  color: #34405a;
  font-size: 0.78rem;
}
.timeline-details {
  margin: 0.75rem 0 0;
  max-height: 180px;
  font-size: 0.72rem;
}

/* ── desktop / mobile nav toggles ── */
@media (min-width: 769px) {
  .mobile-bottom-nav {
    display: none !important;
  }
  .desktop-nav {
    display: block;
  }
  .app-carousel {
    overflow-x: hidden;
  }
  .bug-card-list {
    max-width: 100%;
  }
  .bug-card {
    width: 100%;
  }
}
@media (max-width: 768px) {
  .desktop-nav {
    display: none !important;
  }
  .mobile-bottom-nav {
    display: flex !important;
  }
}

/* ── mobile bottom tab bar ── */
.mobile-bottom-nav {
  position: fixed;
  bottom: calc(var(--mobile-footer-height, 48px) + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(13,27,62,0.97), rgba(26,58,107,0.97));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: var(--mobile-nav-height, 62px);
  max-height: var(--mobile-nav-height, 62px);
  min-height: 0;
  padding: 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: none;
  overflow: visible;
}

/* ── mobile bug card text truncation and button visibility ── */
@media (max-width: 768px) {
  .bug-card-row2 {
    flex-wrap: wrap;
  }
  .bug-card-wizard {
    flex-wrap: wrap;
    width: 100%;
  }
  .bug-card-summary {
    max-height: 3.2em;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-break: break-word;
  }

  .bug-card-actions {
    display: flex;
    flex-direction: row;
    gap: 0.3rem;
    margin-left: 0;
    margin-top: 0.3rem;
    justify-content: flex-end;
  }

  .bug-card-actions a,
  .bug-card-actions button {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    min-width: 55px;
    text-align: center;
  }
}
.mobile-bottom-nav > ul {
  flex: 4;
}
.mobile-bottom-nav > .nav-more {
  flex: 1;
}
.mobile-bottom-nav ul {
  display: flex;
  padding: 0;
  margin: 0;
  list-style: none;
}
.mobile-bottom-nav li {
  flex: 1;
  margin: 0;
}
.mobile-bottom-nav a,
.mobile-bottom-nav .nav-more-toggle {
  display: grid;
  grid-template-rows: 22px 14px;
  align-items: center;
  justify-content: center;
  justify-items: center;
  text-align: center;
  gap: 1px;
  padding: 0.28rem 0.12rem 0.22rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.2px;
  border-left: none;
  border-top: 3px solid transparent;
  transition: all 0.15s ease;
  position: relative;
  height: var(--mobile-nav-height, 52px);
  min-height: 0;
}
.mobile-bottom-nav a .nav-icon,
.mobile-bottom-nav .nav-more-toggle .nav-icon {
  display: block;
  width: 20px;
  height: 20px;
  align-self: center;
  justify-self: center;
}
.mobile-bottom-nav a:hover,
.mobile-bottom-nav a.active {
  color: var(--accent);
  border-top-color: var(--accent);
  background: transparent;
}
.mobile-bottom-nav .nav-more {
  margin-top: 0;
  border-top: none;
  position: static;
}
.mobile-bottom-nav .nav-more > .nav-more-toggle {
  background: transparent;
  cursor: pointer;
  height: var(--mobile-nav-height, 52px);
  min-height: 0;
  border: none;
  width: 100%;
  list-style: none;
}
.mobile-bottom-nav .nav-more > .nav-more-toggle::-webkit-details-marker {
  display: none;
}
.mobile-bottom-nav .nav-more > .nav-more-toggle:hover {
  color: var(--accent);
  border-top-color: var(--accent);
}
.mobile-bottom-nav .nav-more .nav-more-label {
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.2px;
}
.mobile-bottom-nav .nav-more[open] > .nav-more-toggle {
  color: var(--accent);
  border-top-color: var(--accent);
}
.mobile-bottom-nav .nav-more-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  top: auto;
  border-radius: 12px 12px 0 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom: none;
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
  padding: 0.5rem 0;
  z-index: 1001;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
}

/* ── mobile footer ── */
@media (max-width: 768px) {
  :root {
    --mobile-footer-height: 64px;
    --mobile-nav-height: 52px;
    --mobile-footer-gap: 0px;
  }
  .main-area {
    min-height: auto;
    max-width: 100vw;
  }
  .site-footer {
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--mobile-footer-height) + env(safe-area-inset-bottom, 0px));
    min-height: 0;
    padding: 0.3rem 0.75rem calc(0.25rem + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
    z-index: 100;
  }
  .mobile-bottom-nav {
    bottom: calc(var(--mobile-footer-height) + env(safe-area-inset-bottom, 0px));
    height: var(--mobile-nav-height);
    max-height: var(--mobile-nav-height);
  }
  .footer-inner {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    justify-content: center;
    align-content: center;
    height: 100%;
  }
  .footer-section {
    min-width: unset;
    flex: none;
    text-align: center;
  }
  .footer-brand {
    width: 100%;
  }
  .footer-copy {
    font-size: 0.56rem;
  }
  .footer-version {
    font-size: 0.5rem;
  }
  .footer-social {
    display: flex;
    gap: 0.35rem;
  }
  .footer-social a {
    width: 24px;
    height: 24px;
  }
  .footer-social svg {
    width: 13px;
    height: 13px;
  }
  .footer-policies {
    display: none;
  }
  .footer-policies a {
    font-size: 0.6rem;
  }
  .policy-content {
    padding: 1rem;
    border-radius: 10px;
    max-width: 100%;
  }
  /* main padding to clear fixed footer + nav on mobile */
  main {
    padding-bottom: 0.5rem;
  }
}

/* ── mobile sidebar (compact top bar) ── */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: auto;
    flex-direction: row;
    align-items: center;
    z-index: 999;
    padding: 0.5rem 1rem;
    padding-top: calc(0.7rem + env(safe-area-inset-top, 0));
    min-width: 0;
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
  }
  .sidebar .brand-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding: 0;
    border-bottom: none;
    text-align: left;
    width: 100%;
  }
  .sidebar .brand-logo {
    max-height: 71px;
    margin: 0;
  }
  .sidebar .brand-title {
    margin: 0;
    font-size: 1.05rem;
  }
  .page {
    padding-top: 77px;
    padding-bottom: calc(var(--mobile-footer-height) + var(--mobile-nav-height) + env(safe-area-inset-bottom, 0) + 18px);
    flex-direction: column;
  }
  main {
    padding: 1rem 1rem 2rem;
  }
  .app-panel {
    padding: 0;
  }
  .content.px-4 {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* ── table: hide secondary columns on mobile ── */
  .table {
    font-size: 0.75rem;
  }
  .table th,
  .table td {
    padding: 0.5rem 0.45rem;
    white-space: nowrap;
  }
  [data-col="submitted"],
  [data-col="env"],
  [data-col="processed"] {
    display: none;
  }
  [data-col="actions"] .view-link {
    display: inline-block;
    padding: 0.35rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(0,180,216,0.1);
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
  }

  /* ── status steps ── */
  .status-steps {
    padding: 0.75rem 0.5rem;
    gap: 0;
    flex-wrap: wrap;
  }
  .step {
    min-width: 60px;
  }
  .step-circle {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
  .step-label {
    font-size: 0.6rem;
  }
  .step-connector {
    width: 24px;
  }

  /* ── filter bar ── */
  .filter-bar {
    flex-wrap: nowrap;
    gap: 0.35rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
  }
  .filter-bar .btn {
    font-size: 0.72rem;
    padding: 0.3rem 0.75rem;
    white-space: nowrap;
  }

  /* ── headings ── */
  .content h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  .brand-title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
  }
  .agent-timer {
    margin-left: 0;
    font-size: 0.68rem;
  }
  .detail-header .btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.74rem;
    min-height: 32px;
  }
  .detail-header h3 {
    font-size: 0.82rem;
  }
  .detail-action-row .btn {
    margin-top: 0.4rem;
  }
  .mt-2.mb-3 .btn-outline-warning,
  .mt-2.mb-3 .btn-outline-danger {
    margin-left: 0 !important;
    padding: 0.35rem 0.6rem;
    font-size: 0.74rem;
  }

  /* ── detail glass ── */
  .detail-glass {
    padding: 1rem;
    border-radius: 10px;
  }
  .detail-glass h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  /* ── code blocks ── */
  pre {
    font-size: 0.7rem;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
  }

  .row {
    margin-left: 0;
    margin-right: 0;
  }
  ol, ul {
    padding-left: 1rem !important;
  }

  /* ── bug card text truncation and button visibility (mobile) ── */
  .bug-card-row2 {
    flex-wrap: wrap;
  }
  .bug-card-summary {
    max-height: 3.2em;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-break: break-word;
  }

  .bug-card-actions {
    display: flex;
    flex-direction: row;
    gap: 0.3rem;
    margin-left: 0;
    margin-top: 0.3rem;
    justify-content: flex-end;
  }

  .bug-card-actions a,
  .bug-card-actions button {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    min-width: 55px;
    text-align: center;
  }

  /* ── forms: native app feel ── */
  .edit-form-container {
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    max-width: 100%;
  }
  .edit-form-container .mb-3 {
    margin-bottom: 0.75rem;
  }
  .form-label {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    padding-left: 0.25rem;
  }
  .form-control, .form-select {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(200,210,224,0.5);
    border-radius: 12px;
    font-size: 1rem;
    padding: 0.8rem 0.9rem;
    min-height: 48px;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
  }
  .form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,180,216,0.2);
    background: rgba(255,255,255,0.95);
  }
  textarea.form-control {
    min-height: 100px;
  }
  /* stacked buttons */
  .edit-form-container .btn-primary,
  .edit-form-container .btn-secondary {
    display: block;
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    border-radius: 12px;
    text-align: center;
    margin: 0;
  }
  .edit-form-container .btn-primary {
    margin-bottom: 0.5rem;
  }
  .edit-form-container .btn-secondary {
    margin-left: 0 !important;
  }
  .edit-form-container .ms-2 {
    margin-left: 0 !important;
  }

  /* error alert */
  .alert-danger {
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
  }
}
