:root {
  --sidebar-width: 240px;
  --header-height: 60px;
  --primary-color: #CC9933;
  --primary-hover: #B8862E;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f1f1f;
  --gray-900: #141414;
}

* {
  box-sizing: border-box;
}
/* Layout helpers */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-header h1 {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.page-header p {
  font-size: 0.9rem;
  margin: 0.35rem 0 0 0;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}


html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background-color: var(--gray-50);
  color: var(--gray-800);
  height: 100%;
  user-select: none;
}

input,
textarea,
select,
.selectable {
  user-select: text;
}

/* App Container */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  background: var(--gray-900);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  border-top-right-radius: 1.25rem;
  border-bottom-right-radius: 1.25rem;
  overflow: hidden;
  transition: width 0.2s ease;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1rem;
  border-bottom: 1px solid var(--gray-700);
}

.brand-logo {
  width: 100%;
  max-height: 80px;
  aspect-ratio: initial;
  object-fit: contain;
  display: block;
}

.brand-text {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.5rem;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--gray-300);
  text-decoration: none;
  border-radius: 0.5rem;
  margin-bottom: 0.25rem;
  transition: all 0.15s ease;
  font-size: 0.9375rem;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--gray-800);
  color: white;
}

.nav-item.active {
  background: var(--primary-color);
  color: white;
}

.nav-icon {
  margin-right: 0.75rem;
  font-size: 1.125rem;
  min-width: 1.25rem;
}

.nav-icon.bi {
  font-size: 1.125rem;
}

.nav-badge {
  margin-left: auto;
  background: var(--danger-color);
  color: white;
  border-radius: 9999px;
  padding: 0.1rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  min-width: 1.4rem;
  height: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-divider {
  height: 1px;
  background: var(--gray-700);
  margin: 0.75rem 0;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem;
  padding: 0.75rem 0.75rem;
  background: var(--gray-800);
  border-radius: 0.75rem;
  color: white;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.sidebar-user-card:hover {
  background: var(--gray-700);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.sidebar-user-card:active {
  transform: translateY(0);
}

.sidebar-user-card-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
  flex: 1;
  min-width: 0;
}

.sidebar-user-card-link:hover {
  color: white;
}

/* Non-selectable UI */
.nav-item,
.sidebar-user-card,
.header-right,
.header-left,
.breadcrumb,
.stat-card,
.header-actions {
  user-select: none;
}

.sidebar-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(204, 153, 51, 0.3);
}

.sidebar-user-initials {
  letter-spacing: 0.02em;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.sidebar-user-actions {
  margin-left: auto;
}

.sidebar-signout-button {
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  border: none;
  background-color: #0000;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-signout-button:hover {
  background: var(--primary-color);
  color: white;
}

.sidebar-user-name {
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-email {
  font-size: 0.75rem;
  color: var(--gray-300);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Content */
.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.2s ease;
}


.app-header {
  height: var(--header-height);
  background: white;
  border-bottom: 1px solid var(--gray-200);
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(320px, 1.2fr) minmax(220px, 1fr);
  align-items: center;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--gray-900);
}

.user-name {
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-end;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
}


.global-search {
  display: flex;
  align-items: center;
  min-width: 280px;
  max-width: 520px;
  width: 100%;
}

.global-search-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 0.8rem;
  padding: 0.25rem 0.55rem 0.25rem 0.7rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.global-search-box:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(204, 153, 51, 0.15);
}

.global-search-icon {
  color: var(--gray-500);
  font-size: 1rem;
}

.global-search-input {
  border: none;
  box-shadow: none;
  background: transparent;
  width: 100%;
  min-width: 180px;
  font-size: 0.82rem;
  color: var(--gray-800);
}

.global-search-input::placeholder {
  color: var(--gray-500);
}

.global-search-input:focus {
  box-shadow: none;
  outline: none;
}

.global-search-button {
  border: none;
  background: var(--gray-900);
  color: white;
  padding: 0.35rem 0.7rem;
  border-radius: 0.6rem;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.global-search-button:hover {
  background: #101010;
  transform: translateY(-1px);
}

.header-left .page-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Utility classes (Bootstrap-like) */
.text-muted {
  color: var(--gray-600);
}

.text-end {
  text-align: right;
}

.d-flex {
  display: flex;
}

.d-block {
  display: block;
}

.flex-wrap {
  flex-wrap: wrap;
}

.align-items-center {
  align-items: center;
}

.justify-content-end {
  justify-content: flex-end;
}

.justify-content-between {
  justify-content: space-between;
}

.gap-1 {
  gap: 0.25rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 1rem;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-3 {
  margin-bottom: 1rem;
}

.ms-3 {
  margin-left: 1rem;
}

.primary-text {
  color: var(--gray-900);
  font-weight: 600;
  text-decoration: none;
}

.primary-text:hover {
  color: var(--primary-color);
}

/* Input group (Bootstrap-like) */
.input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.input-group > .form-control {
  flex: 1 1 auto;
  min-width: 0;
}

.input-group-text {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--gray-300);
  background: var(--gray-50);
  color: var(--gray-600);
  border-right: none;
  border-top-left-radius: 0.5rem;
  border-bottom-left-radius: 0.5rem;
}

.input-group .form-control {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.input-group-sm .input-group-text {
  padding: 0.5rem 0.625rem;
  font-size: 0.875rem;
}

.input-group-sm .form-control {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

/* Modal (Bootstrap-like) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1040;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1050;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal.d-block {
  display: flex;
}

.modal-dialog {
  width: min(100%, 640px);
  margin: auto;
}

.modal-dialog.modal-lg {
  width: 800px;
  max-width: 95vw;
}

.modal-dialog.modal-xl {
  width: 1140px;
  max-width: 95vw;
}

.modal-dialog.modal-60 {
  width: 60vw;
  max-width: 95vw;
}

.modal-dialog.modal-65 {
  width: 65vw;
  max-width: 95vw;
}

.modal-dialog.modal-dialog-centered {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100% - 3rem);
}

.modal-content {
  background: white;
  border-radius: 0.9rem;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.2);
  border: none;
  overflow: hidden;
  width: 100%;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  background: linear-gradient(135deg, rgba(249, 250, 251, 0.95), rgba(255, 255, 255, 0.75));
}

.modal-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
}

.modal-body {
  padding: 1.6rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 0 1.6rem 1.4rem;
}

.btn-close {
  width: 24px;
  height: 24px;
  border-radius: 0.5rem;
  border: 1px solid var(--gray-200);
  background: transparent;
  color: var(--gray-700);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.btn-close:hover {
  background: var(--gray-100);
}

.btn-close::before {
  content: "\00d7";
  font-size: 0.9rem;
  line-height: 1;
}

/* Progress */
.progress {
  height: 0.625rem;
  border-radius: 9999px;
  background: var(--gray-100);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--primary-color);
  width: 0;
  transition: width 0.15s ease;
}

.header-icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: var(--gray-100);
  color: var(--gray-700);
  text-decoration: none;
}

.header-badge {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  background: var(--danger-color);
  color: white;
  border-radius: 9999px;
  padding: 0.1rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 600;
}

.header-dot {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--danger-color);
  box-shadow: 0 0 0 2px #fff;
}

.app-content {
  flex: 1;
  padding: 1.5rem;
}

.app-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-200);
  color: var(--gray-600);
  font-size: 0.8125rem;
  background: white;
  text-align: center;
}

/* Cards */
.card {
  background: white;
  border-radius: 0.9rem;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  font-weight: 600;
  color: var(--gray-900);
  background: linear-gradient(135deg, rgba(249, 250, 251, 0.9), rgba(255, 255, 255, 0.6));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.page-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body {
  padding: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  gap: 0.375rem;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-outline {
  background: white;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
}

.btn-outline:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-info {
  background: var(--primary-color);
  color: white;
}

.btn-info:hover {
  background: var(--primary-hover);
  color: white;
}

.btn-sm {
  padding: 0.3125rem 0.625rem;
  font-size: 0.75rem;
  border-radius: 0.3125rem;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

/* Form Controls */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.375rem;
}

.form-control {
  width: 100%;
  padding: 0.55rem 0.85rem;
  font-size: 0.875rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  background: #fbfcfe;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.form-control-sm {
  padding: 0.375rem 0.625rem;
  font-size: 0.8125rem;
  border-radius: 0.3125rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  background: white;
  box-shadow: 0 0 0 4px rgba(204, 153, 51, 0.12);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  gap: 0.375rem;
  white-space: nowrap;
}

.badge-icon {
  font-size: 0.85rem;
  line-height: 1;
}

.badge-icon--spin {
  display: inline-block;
  animation: spin 1s linear infinite;
}

.badge-uploading {
  background: #fef5e7;
  color: #996600;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-parsing {
  background: #fef3c7;
  color: #92400e;
}

.badge-error {
  background: #fee2e2;
  color: #991b1b;
}

/* Notification filters */
.notification-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.1fr) minmax(220px, 1fr) minmax(260px, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-pill {
  border: 1px solid var(--gray-200);
  background: white;
  color: var(--gray-700);
  border-radius: 9999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.filter-count {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 9999px;
  padding: 0.1rem 0.4rem;
  font-size: 0.7rem;
}

.filter-pill.active .filter-count {
  background: rgba(255, 255, 255, 0.25);
}

.filter-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.6rem;
  padding: 0.35rem 0.6rem;
  background: white;
}

.filter-search-input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 0.82rem;
  background: transparent;
}

.filter-dates {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-summary {
  margin-bottom: 1rem;
  font-size: 0.75rem;
}

/* (table-toolbar, col-index, table-pagination, etc. — see GOD-LEVEL TABLE block) */

/* Document Preview */
.doc-thumb {
  width: 60px;
  height: 80px;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid var(--gray-200);
  background: white;
  pointer-events: auto;
  cursor: pointer;
}

.doc-thumb-placeholder {
  width: 60px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
  border: 1px dashed var(--gray-300);
  background: var(--gray-50);
  color: var(--gray-600);
}

.file-thumb {
  width: 48px;
  height: 64px;
  border-radius: 0.5rem;
  border: 1px solid var(--gray-200);
  object-fit: cover;
  background: white;
}

.status-warning {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1.5rem;
}

.preview-modal {
  background: white;
  border-radius: 0.75rem;
  max-width: 960px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.preview-body {
  height: 70vh;
}

.preview-frame {
  width: 100%;
  height: 100%;
  border: none;
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--gray-300);
  border-radius: 0.75rem;
  padding: 3rem 2rem;
  text-align: center;
  transition: all 0.15s ease;
  cursor: pointer;
  display: block;
  position: relative;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--primary-color);
  background: rgba(204, 153, 51, 0.03);
}

.upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-subtext {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--gray-500);
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.upload-icon .bi {
  font-size: 4rem;
}

.upload-text {
  color: var(--gray-600);
  font-size: 0.9375rem;
}

.upload-text strong {
  color: var(--primary-color);
}

.upload-list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.upload-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  background: white;
}

.upload-item-name {
  font-weight: 600;
}

.upload-item-meta {
  font-size: 0.8rem;
  color: var(--gray-600);
}

.upload-item-error {
  color: var(--danger-color);
  font-size: 0.8rem;
  margin-left: 0.25rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Detail lists */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.detail-list {
  display: grid;
  gap: 0.75rem;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.detail-label {
  font-size: 0.75rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.detail-value {
  font-weight: 600;
  color: var(--gray-900);
  text-align: right;
}

.detail-subtext {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

.modern-profile-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.modern-profile-hero {
  background: #ffffff;
  border-radius: 1.25rem;
  border: 1px solid var(--gray-200);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.modern-profile-main {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 2rem;
}

.modern-profile-avatar-wrapper {
  flex-shrink: 0;
}

.modern-profile-avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
  border: 4px solid #ffffff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.modern-profile-initials {
  letter-spacing: 0.05em;
}

.modern-profile-identity {
  padding-top: 0.5rem;
  flex: 1;
}

.modern-profile-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 0.25rem 0;
}

.modern-profile-email {
  color: var(--gray-600);
  font-size: 1rem;
  margin: 0 0 0.75rem 0;
}

.modern-profile-role {
  display: inline-flex;
}

.modern-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.modern-info-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modern-info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--gray-50);
  border-radius: 0.75rem;
  border: 1px solid var(--gray-200);
  transition: all 0.2s ease;
}

.modern-info-item:hover {
  background: var(--gray-100);
  border-color: var(--gray-300);
}

.modern-info-label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--gray-600);
  font-size: 0.875rem;
  font-weight: 500;
}

.modern-info-label i {
  font-size: 1rem;
  color: var(--gray-500);
}

.modern-info-value {
  font-weight: 600;
  color: var(--gray-900);
  font-size: 0.9375rem;
}

.modern-security-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--gray-50), #ffffff);
  border-radius: 0.875rem;
  border: 1px solid var(--gray-200);
  transition: all 0.2s ease;
}

.modern-security-item:hover {
  border-color: var(--gray-300);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.modern-security-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  background: rgba(204, 153, 51, 0.12);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.modern-security-content {
  flex: 1;
  min-width: 0;
}

.modern-security-title {
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.modern-security-desc {
  color: var(--gray-600);
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .modern-profile-main {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
  }

  .modern-profile-identity {
    padding-top: 0;
  }

  .modern-profile-grid {
    grid-template-columns: 1fr;
  }

  .modern-security-item {
    flex-direction: column;
    text-align: center;
  }
}

.stat-card {
  background: white;
  border-radius: 0.9rem;
  padding: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.stat-card--amber {
  background: linear-gradient(135deg, rgba(255, 236, 210, 0.65), rgba(255, 255, 255, 0.8));
  border-color: rgba(245, 158, 11, 0.25);
}

.stat-card--sage {
  background: linear-gradient(135deg, rgba(209, 250, 229, 0.55), rgba(255, 255, 255, 0.85));
  border-color: rgba(16, 185, 129, 0.25);
}

.stat-card--sky {
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.7), rgba(255, 255, 255, 0.85));
  border-color: rgba(59, 130, 246, 0.25);
}

.stat-card--lavender {
  background: linear-gradient(135deg, rgba(237, 233, 254, 0.7), rgba(255, 255, 255, 0.85));
  border-color: rgba(139, 92, 246, 0.25);
}

/* Breadcrumbs */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--gray-500);
  margin: 0 0 1rem 0;
  padding: 0;
  list-style: none;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.breadcrumb-item::after {
  content: "";
  margin: 0;
}

.breadcrumb-item:last-child::after {
  content: "";
  margin: 0;
}

.breadcrumb-link {
  color: var(--gray-600);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.breadcrumb-link:hover {
  color: var(--gray-900);
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
}

/* Alerts */
.alert {
  padding: 0.875rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.alert-danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

/* Auth Pages */
.auth-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(circle at top, #ffffff 0%, #f1f5f9 45%, #e2e8f0 100%);
}

.auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(circle at top, #ffffff 0%, #f1f5f9 45%, #e2e8f0 100%);
}

.auth-shell {
  width: min(960px, 100%);
  background: #fff;
  border-radius: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.15);
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr);
  overflow: hidden;
}

.auth-brand {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  justify-content: center;
}

.auth-brand-logo {
  width: 100%;
  max-width: 200px;
  height: 48px;
  object-fit: contain;
}

.auth-brand-text {
  font-size: 1.1rem;
  line-height: 1.4;
  color: #e2e8f0;
}

.auth-content {
  padding: 2.5rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    display: none;
  }
}

.auth-card {
  background: #fff;
  border-radius: 1rem;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.12);
}

.auth-card-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.auth-card-logo img {
  width: 180px;
  max-width: 100%;
  height: auto;
}

.auth-logo-top {
  width: 100%;
  max-width: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.auth-logo-top img {
  width: 220px;
  height: auto;
  max-width: 100%;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-card form .btn {
  width: 100%;
}

.auth-logo {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-logo img {
  width: 220px;
  height: auto;
  max-width: 100%;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
}

.auth-subtitle {
  color: var(--gray-600);
  font-size: 0.9375rem;
  margin-top: 0.5rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--gray-600);
  font-size: 0.875rem;
  border-top: 1px solid var(--gray-200);
  padding-top: 1rem;
}

.auth-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

/* Landing Page */
.landing-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
  color: white;
}

.hero-logo {
  margin-bottom: 1rem;
  width: 100%;
}

.hero-logo img {
  width: 280px;
  height: auto;
  max-width: 100%;
}

.page-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.page-logo img {
  width: 220px;
  height: auto;
  max-width: 100%;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  margin: 0 0 1rem 0;
  letter-spacing: -0.025em;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--gray-300);
  max-width: 500px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

/* Blazor defaults */
.valid.modified:not([type="checkbox"]) {
  outline: 1px solid var(--success-color);
}

.invalid {
  outline: 1px solid var(--danger-color);
}

.validation-message {
  color: var(--danger-color);
  font-size: 0.8125rem;
  margin-top: 0.375rem;
}

.blazor-error-boundary {
  background: var(--danger-color);
  padding: 1rem;
  color: white;
  border-radius: 0.5rem;
}

.blazor-error-boundary::after {
  content: "An error has occurred.";
}

#blazor-error-ui {
  display: none;
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--danger-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  z-index: 1000;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--gray-600);
}

.empty-state i {
  display: block;
  font-size: 2rem;
  color: var(--gray-400);
  margin-bottom: 0.5rem;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
  color: var(--gray-600);
}

.empty-icon .bi {
  font-size: 4rem;
}

.empty-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.empty-text {
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

/* Notifications */
.notification-list {
  display: flex;
  flex-direction: column;
}

.notification-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  align-items: flex-start;
}

.notification-item.unread {
  background: #f8fafc;
}

.notification-icon {
  font-size: 1.25rem;
  margin-top: 0.2rem;
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.notification-message {
  color: var(--gray-700);
  font-size: 0.9rem;
}

.notification-meta {
  color: var(--gray-600);
  font-size: 0.75rem;
  margin-top: 0.4rem;
}

/* ============================ */
/*  New Dashboard UI Overrides  */
/* ============================ */

:root {
  --sidebar-width: 256px;
  --sidebar-bg: #0f172a;
  --sidebar-accent: #1e293b;
  --sidebar-border: rgba(148, 163, 184, 0.12);
  --content-bg: #f8fafc;
  --card-border: rgba(148, 163, 184, 0.22);
}

html,
body {
  background: var(--content-bg);
  color: var(--gray-900);
}

.app-container {
  display: flex;
  min-height: 100vh;
  background: var(--content-bg);
}

.app-sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 140;
  border-right: 1px solid var(--sidebar-border);
  transition: width 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 12px 0 30px rgba(15, 23, 42, 0.25);
  overflow: visible;
  pointer-events: auto;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--sidebar-border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  font-size: 1rem;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: #f8fafc;
}

.brand-subtitle {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #94a3b8;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0.6rem 1rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nav-section {
  display: grid;
  gap: 0.35rem;
}

.nav-section-title {
  padding: 0 0.75rem 0.25rem;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 600;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  color: #cbd5f5;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-item:hover {
  background: var(--sidebar-accent);
  color: #f8fafc;
  transform: translateX(2px);
}

.nav-item.active {
  background: rgba(204, 153, 51, 0.15);
  color: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(204, 153, 51, 0.35);
}

.nav-indicator {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 999px;
  background: var(--primary-color);
  opacity: 0;
}

.nav-item.active .nav-indicator {
  opacity: 1;
}

.nav-icon {
  font-size: 1.1rem;
  color: #94a3b8;
}

.nav-item.active .nav-icon {
  color: var(--primary-color);
}

.nav-badge {
  margin-left: auto;
  background: var(--primary-color);
  color: #111827;
  border-radius: 9999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
}

.sidebar-user-card {
  margin: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.3);
}

.sidebar-user-avatar {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: #fff;
  box-shadow: 0 4px 12px rgba(204, 153, 51, 0.35);
}

.sidebar-user-initials {
  letter-spacing: 0.02em;
}

.sidebar-user-name {
  color: #f8fafc;
}

.sidebar-user-email {
  color: #94a3b8;
}

.sidebar-signout-button {
  background: rgba(148, 163, 184, 0.12);
}

.sidebar-signout-button:hover {
  background: rgba(204, 153, 51, 0.2);
  color: #f8fafc;
}


.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.25s ease;
  position: relative;
  z-index: 1;
}

.app-header {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 150;
  pointer-events: auto;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.header-title {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.page-title {
  font-size: 1rem;
  font-weight: 600;
}

.page-subtitle {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.page-subtitle:empty {
  display: none;
}


.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.global-search {
  width: min(520px, 100%);
}

.global-search-box {
  background: #f8fafc;
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  box-shadow: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.global-search-box:focus-within {
  border-color: rgba(204, 153, 51, 0.6);
  box-shadow: 0 0 0 4px rgba(204, 153, 51, 0.12);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  position: relative;
  z-index: 160;
}

.header-icon-button {
  width: 34px;
  height: 34px;
  border-radius: 0.65rem;
  background: #f1f5f9;
  color: #334155;
  transition: transform 0.2s ease, background 0.2s ease;
}

.header-icon-button:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

.header-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
}

.header-badge::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  animation: pulse 1.8s infinite ease-in-out;
}

@keyframes pulse {
  0% { opacity: 0.8; transform: scale(0.9); }
  70% { opacity: 0; transform: scale(1.4); }
  100% { opacity: 0; transform: scale(1.4); }
}

.app-content {
  flex: 1;
  padding: 1.5rem 2rem 2rem;
  background: var(--content-bg);
}

.page-shell {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.page-title-block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.page-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.content-shell {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  background: #fff;
  border-radius: 1rem;
  border: 1px solid var(--card-border);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.card-lg {
  grid-column: span 2;
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--card-border);
  padding: 1.25rem 1.5rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
}

.card-title i {
  margin-right: 0.35rem;
  color: var(--gray-500);
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 0.15rem;
}

.dashboard-card-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dashboard-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--gray-100);
  padding: 0.25rem;
  border-radius: 9999px;
  border: 1px solid var(--gray-200);
}

.dashboard-tab {
  border: none;
  background: transparent;
  color: var(--gray-600);
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dashboard-tab:hover {
  color: var(--gray-900);
}

.dashboard-tab.active {
  background: white;
  color: var(--gray-900);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.dashboard-tab-count {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 9999px;
  padding: 0.1rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
}

.dashboard-tab.active .dashboard-tab-count {
  background: rgba(204, 153, 51, 0.2);
  color: var(--gray-900);
}

.card-body {
  padding: 1.5rem;
}

.dashboard-hero {
  background: linear-gradient(120deg, rgba(204, 153, 51, 0.08), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(204, 153, 51, 0.18);
}

.dashboard-hero-body {
  display: grid;
  grid-template-columns: minmax(240px, 1.3fr) minmax(240px, 1fr);
  gap: 1.5rem;
  align-items: center;
}

.dashboard-hero-copy {
  display: grid;
  gap: 0.5rem;
}

.hero-kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  font-weight: 600;
}

.hero-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gray-900);
}

.hero-subtitle {
  color: var(--gray-600);
  font-size: 0.9rem;
}

.dashboard-hero-chips {
  display: grid;
  gap: 0.75rem;
}

.metric-chip {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.metric-label {
  font-size: 0.75rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.metric-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
}

.job-queue-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.summary-card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 0.9rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.summary-card--neutral {
  background: linear-gradient(135deg, rgba(241, 245, 249, 0.8), rgba(255, 255, 255, 0.85));
  border-color: rgba(148, 163, 184, 0.25);
}

.summary-card--warning {
  background: #fef3c7;
  border-color: rgba(245, 158, 11, 0.3);
}

.summary-card--success {
  background: #d1fae5;
  border-color: rgba(16, 185, 129, 0.3);
}

.summary-card--error {
  background: #fee2e2;
  border-color: rgba(220, 38, 38, 0.3);
}

.summary-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  font-weight: 600;
}

.summary-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-top: 0.35rem;
}

.job-detail-grid {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 1.5rem;
}

.job-status-card {
  border: 1px solid rgba(204, 153, 51, 0.2);
  background: linear-gradient(140deg, rgba(204, 153, 51, 0.08), #fff 60%);
}

.status-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  font-weight: 600;
}

.status-pill-lg {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  margin-top: 0.6rem;
  background: var(--gray-100);
  color: var(--gray-800);
}

.status-message {
  margin-top: 0.6rem;
  color: var(--gray-600);
  font-size: 0.85rem;
}

.status-meta {
  display: grid;
  gap: 0.35rem;
  margin-top: 1rem;
  color: var(--gray-600);
  font-size: 0.82rem;
}

.status-meta-label {
  display: inline-block;
  min-width: 70px;
  color: var(--gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.7rem;
  margin-right: 0.4rem;
}

.job-meta-card .detail-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.col-status {
  min-width: 140px;
}

.status-pill {
  font-weight: 600;
}

.table-entity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.table-icon {
  width: 38px;
  height: 38px;
  border-radius: 0.75rem;
  background: rgba(204, 153, 51, 0.12);
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.table-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(204, 153, 51, 0.12);
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  overflow: hidden;
}

.table-stacked {
  display: grid;
  gap: 0.15rem;
}

.table-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
}

.preview-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border-radius: 0.85rem;
  background: #f8fafc;
  border: 1px dashed var(--gray-200);
}

.preview-panel .file-thumb {
  width: 140px;
  height: 190px;
  object-fit: cover;
  border-radius: 0.5rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.stat-link:focus-visible {
  outline: 2px solid rgba(204, 153, 51, 0.6);
  outline-offset: 2px;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 0.85rem;
  background: rgba(15, 23, 42, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--gray-700);
}

.stat-content {
  display: grid;
  gap: 0.25rem;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  font-weight: 600;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gray-900);
}

.dashboard-page {
  display: grid;
  gap: 1.5rem;
}

.dashboard-header h1 {
  font-size: 1.5rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}


.tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #fff;
  padding: 0.35rem 0.6rem;
  font-size: 0.7rem;
  border-radius: 0.5rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

.tooltip[data-tooltip=""]::after,
.tooltip[data-tooltip=" "]::after {
  display: none;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 0.25rem 0.75rem;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
}

.breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--gray-600);
  text-decoration: none;
}

.breadcrumb-link:hover {
  color: var(--gray-900);
}

.breadcrumb-item::after {
  content: "";
}

.components-reconnect-container {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--gray-200);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
  text-align: center;
  max-width: 360px;
}

.components-rejoining-animation {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.components-rejoining-animation div {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--primary-color);
  animation: bounce 0.9s infinite alternate;
}

.components-rejoining-animation div:nth-child(2) {
  animation-delay: 0.3s;
}

@keyframes bounce {
  from { transform: translateY(0); opacity: 0.6; }
  to { transform: translateY(-6px); opacity: 1; }
}

.notification-list {
  display: grid;
  gap: 0.75rem;
}

.notification-card {
  display: grid;
  grid-template-columns: 8px 28px 1fr;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem;
  border-radius: 0.85rem;
  border: 1px solid var(--gray-100);
  background: #fff;
  transition: background 0.2s ease, transform 0.2s ease;
}

.notification-card.is-unread {
  cursor: pointer;
  border-color: rgba(204, 153, 51, 0.35);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.notification-card:hover {
  background: #f8fafc;
  transform: translateY(-1px);
}

.notification-card.is-unread:hover {
  background: #fffaf0;
}

.notification-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-top: 0.4rem;
  background: var(--gray-300);
}

.notification-dot.badge-success {
  background: #22c55e;
}

.notification-dot.badge-parsing {
  background: #f59e0b;
}

.notification-dot.badge-error {
  background: #ef4444;
}

.notification-dot.badge-uploading {
  background: #3b82f6;
}

.notification-icon {
  color: var(--gray-500);
  font-size: 1.05rem;
}

.notification-body {
  display: grid;
  gap: 0.2rem;
}

.notification-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-900);
}

.notification-time {
  font-size: 0.7rem;
  color: var(--gray-500);
  margin-top: 0.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.time-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--gray-500);
  font-size: 0.75rem;
}

.overview-split {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.overview-preview {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 1rem;
  border-radius: 0.85rem;
  background: #f8fafc;
  border: 1px dashed var(--gray-200);
  min-height: 220px;
}

.preview-center {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  border-radius: 0.85rem;
  background: #f8fafc;
  border: 1px dashed var(--gray-200);
  min-height: 260px;
}

.file-thumb--hero {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 0.75rem;
  background: #fff;
}

.pdf-viewer-body {
  padding: 0 !important;
  overflow: hidden;
  border-radius: 0 0 0.85rem 0.85rem;
}

.pdf-viewer-frame {
  display: block;
  width: 100%;
  height: 720px;
  border: none;
  border-radius: 0 0 0.85rem 0.85rem;
}

.overview-details {
  display: grid;
  gap: 0.75rem;
}

.notification-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.filter-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  padding: 0.35rem 0.75rem;
  background: #fff;
}

.filter-search i {
  color: var(--gray-500);
}

.filter-search-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.85rem;
  min-width: 200px;
}

.filter-dates {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-summary {
  margin-bottom: 0.75rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  align-items: end;
}

.align-items-middle {
  align-items: center;
}

.result-list {
  display: grid;
  gap: 0.75rem;
}

.result-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid var(--gray-200);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease, transform 0.2s ease;
}

.result-item:hover {
  background: #f8fafc;
  transform: translateY(-1px);
}

.result-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.75rem;
  background: rgba(204, 153, 51, 0.12);
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.result-item[data-kind="Project"] .result-icon {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}

.result-item[data-kind="File"] .result-icon {
  background: rgba(14, 165, 233, 0.12);
  color: #0ea5e9;
}

.result-item[data-kind="Job"] .result-icon {
  background: rgba(245, 158, 11, 0.14);
  color: #f59e0b;
}

.result-item[data-kind="Notification"] .result-icon {
  background: rgba(168, 85, 247, 0.14);
  color: #a855f7;
}

.result-body {
  display: grid;
  gap: 0.25rem;
}

.result-title {
  font-weight: 600;
}

.result-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.result-time {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.input-icon {
  position: relative;
}

.input-icon i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
}

.input-icon .form-control {
  padding-left: 2.25rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  align-items: end;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.form-actions.align-end {
  justify-content: flex-end;
  align-self: end;
}

.detail-card {
  border: 1px solid var(--gray-200);
  background: #f8fafc;
  border-radius: 0.85rem;
  padding: 1rem;
  display: grid;
  gap: 0.35rem;
}

.detail-card .detail-label {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--gray-500);
}

.detail-card .detail-value {
  font-weight: 600;
  color: var(--gray-900);
}

.error-details {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 0.85rem;
  background: #f8fafc;
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
}

.missing-shell {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

.missing-card {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 2rem;
  padding: 2.25rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.9));
  box-shadow: 0 32px 60px rgba(15, 23, 42, 0.18);
  width: min(920px, 100%);
}

.missing-hero {
  display: grid;
  place-items: center;
  gap: 0.85rem;
  border-radius: 1rem;
  background: linear-gradient(160deg, #0f172a, #1f2937);
  color: #fff;
  padding: 1.75rem 1.5rem;
  text-align: center;
}

.missing-badge {
  width: 64px;
  height: 64px;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
}

.missing-code {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.missing-caption {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(226, 232, 240, 0.8);
}

.missing-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 0.5rem 0;
}

.missing-subtitle {
  color: var(--gray-600);
  margin: 0;
  max-width: 520px;
}

.missing-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.missing-inline {
  padding: 1rem 0 2rem 0;
}

.missing-inline-card {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  padding: 1.5rem 1.75rem;
  border-radius: 1rem;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
}

.missing-inline-icon {
  width: 56px;
  height: 56px;
  border-radius: 1rem;
  background: rgba(204, 153, 51, 0.12);
  color: var(--primary-color);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.missing-inline-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
}

.missing-inline-subtitle {
  color: var(--gray-600);
  margin-top: 0.25rem;
}

.missing-inline-actions {
  margin-top: 0.85rem;
}

@media (max-width: 900px) {
  .missing-card {
    grid-template-columns: 1fr;
  }

  .missing-hero {
    padding: 1.5rem;
  }
}

@media (max-width: 640px) {
  .missing-card {
    padding: 1.5rem;
  }

  .missing-inline-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

.text-right {
  text-align: right;
}

@media (max-width: 1024px) {
  .header-center {
    display: none;
  }

  .app-content {
    padding: 1.5rem;
  }

  .dashboard-hero-body {
    grid-template-columns: 1fr;
  }

  .job-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-sidebar {
    transform: translateX(-100%);
  }

  .app-main {
    margin-left: 0;
  }

  .overview-split {
    grid-template-columns: 1fr;
  }

  .job-queue-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ========================================
   Modern Auth Layout - Clean Background
   ======================================== */

.modern-auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.modern-auth-background {
  position: absolute;
  inset: 0;
  background: var(--gray-900);
  z-index: 0;
}

.modern-auth-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(204, 153, 51, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
  background-size: 100% 100%;
  animation: patternMove 20s ease-in-out infinite;
}

@keyframes patternMove {
  0%, 100% { 
    transform: scale(1) translate(0, 0); 
  }
  50% { 
    transform: scale(1.1) translate(-2%, 2%); 
  }
}

.modern-auth-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.modern-auth-brand-header {
  display: flex;
  justify-content: center;
  margin-bottom: 0;
}

.modern-brand-logo {
  width: 180px;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.modern-brand-logo:hover {
  transform: scale(1.02);
}

.modern-auth-content-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

.modern-auth-bottom {
  text-align: center;
  margin-top: 1rem;
}

.modern-auth-copyright {
  font-size: 0.8125rem;
  color: var(--gray-400);
  margin: 0;
}

@media (max-width: 640px) {
  .modern-auth-container {
    padding: 1.5rem;
    gap: 1.5rem;
  }

  .modern-brand-logo {
    width: 200px;
  }
}

/* ========================================
   Modern Auth Pages - Clean & Professional
   ======================================== */

.modern-auth-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.75rem 2rem;
  width: 100%;
  max-width: 440px;
  border: 1px solid rgba(203, 213, 225, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 
              0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.modern-auth-card:hover {
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 
              0 8px 16px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

/* Auth Header */
.modern-auth-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.modern-auth-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  border-radius: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: white;
  font-size: 1.5rem;
  box-shadow: 0 8px 20px rgba(204, 153, 51, 0.3);
  transition: all 0.3s ease;
}

.modern-auth-icon:hover {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 16px 36px rgba(204, 153, 51, 0.35);
}

.modern-auth-icon-register {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.25);
}

.modern-auth-icon-register:hover {
  box-shadow: 0 16px 36px rgba(16, 185, 129, 0.35);
}

.modern-auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.02em;
}

.modern-auth-subtitle {
  color: var(--gray-600);
  font-size: 0.875rem;
  margin: 0;
  font-weight: 400;
}

/* Modern Alert */
.modern-alert {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  border-radius: 0.625rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modern-alert i {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.modern-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.modern-alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

/* Modern Form */
.modern-auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modern-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modern-form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modern-form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  user-select: none;
}

.modern-form-label i {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.modern-form-link {
  font-size: 0.875rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.modern-form-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.modern-form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  background: #ffffff;
  color: var(--gray-900);
  transition: all 0.2s ease;
  font-family: inherit;
  outline: none;
}

.modern-form-input::placeholder {
  color: var(--gray-400);
}

.modern-form-input:hover {
  border-color: var(--gray-400);
  background: var(--gray-50);
}

.modern-form-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(204, 153, 51, 0.15);
  background: #ffffff;
}

.modern-form-input:disabled {
  background: var(--gray-100);
  cursor: not-allowed;
  opacity: 0.5;
}

.modern-form-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: -0.25rem;
}

.modern-form-hint i {
  font-size: 0.875rem;
}

/* Modern Checkbox */
.modern-form-options {
  margin: -0.5rem 0;
}

.modern-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.modern-checkbox {
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--gray-300);
  border-radius: 0.25rem;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 0.125rem;
  transition: all 0.2s ease;
  accent-color: var(--primary-color);
}

.modern-checkbox:hover {
  border-color: var(--primary-color);
}

.modern-checkbox:checked {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.modern-checkbox-text {
  font-size: 0.8125rem;
  color: var(--gray-600);
  line-height: 1.4;
}

.modern-checkbox-text a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.modern-checkbox-text a:hover {
  text-decoration: underline;
}

/* Modern Button */
.modern-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  outline: none;
  position: relative;
  overflow: hidden;
}

.modern-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.modern-btn:active::before {
  width: 300px;
  height: 300px;
}

.modern-btn i {
  font-size: 1.125rem;
}

.modern-btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  box-shadow: 0 8px 20px rgba(204, 153, 51, 0.25);
}

.modern-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(204, 153, 51, 0.35);
}

.modern-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(204, 153, 51, 0.2);
}

.modern-btn-primary:disabled {
  background: var(--gray-300);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Auth Divider */
.modern-auth-divider {
  position: relative;
  text-align: center;
  margin: 1.25rem 0 1rem;
}

.modern-auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gray-200);
}

.modern-auth-divider span {
  position: relative;
  display: inline-block;
  padding: 0 0.875rem;
  background: #ffffff;
  font-size: 0.8125rem;
  color: var(--gray-500);
  font-weight: 500;
}

/* Auth Footer */
.modern-auth-footer {
  text-align: center;
  margin-top: 0.5rem;
}

.modern-auth-footer-text {
  font-size: 0.8125rem;
  color: var(--gray-600);
  margin: 0 0 0.75rem 0;
}

.modern-auth-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.modern-auth-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.modern-auth-footer-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--gray-600);
  margin: 0;
  padding: 0.75rem;
  background: var(--gray-50);
  border-radius: 0.5rem;
  border: 1px solid var(--gray-200);
}

.modern-auth-footer-hint i {
  font-size: 0.875rem;
  flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 640px) {
  .modern-auth-card {
    padding: 1.5rem 1.25rem;
    border-radius: 0.75rem;
  }

  .modern-auth-icon {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }

  .modern-auth-title {
    font-size: 1.25rem;
  }

  .modern-auth-subtitle {
    font-size: 0.8125rem;
  }

  .modern-form-input {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }

  .modern-btn {
    padding: 0.5rem 1rem;
  }
}

/* Accessibility Improvements */
.modern-form-input:focus-visible,
.modern-btn:focus-visible,
.modern-checkbox:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Loading State */
.modern-btn.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

.modern-btn.is-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.db-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 2rem;
}

.db-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, var(--gray-900) 0%, #1a2540 100%);
  border-radius: 1rem;
  padding: 1.5rem 2rem;
  color: white;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.db-welcome-left { flex: 1; }
.db-welcome-greeting {
  font-size: 1.35rem;
  font-weight: 600;
  color: white;
  line-height: 1.3;
}
.db-welcome-date {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  margin-top: 0.35rem;
}
.db-welcome-sep { opacity: 0.4; }
.db-welcome-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}
.db-welcome-outline-btn {
  background: transparent !important;
  color: rgba(255,255,255,0.9) !important;
  border-color: rgba(255,255,255,0.35) !important;
}
.db-welcome-outline-btn:hover {
  background: rgba(255,255,255,0.12) !important;
  color: white !important;
}

.db-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.db-kpi-card {
  position: relative;
  border-radius: 1.1rem;
  padding: 1.6rem 1.5rem 1.25rem;
  color: white;
  text-decoration: none !important;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  display: block;
}
.db-kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0,0,0,0.22);
  color: white !important;
}
.db-kpi-card::after {
  content: '';
  position: absolute;
  top: 0; left: -110%;
  width: 55%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: skewX(-18deg);
  transition: 0.55s ease;
}
.db-kpi-card:hover::after { left: 160%; }

.db-kpi-indigo { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); box-shadow: 0 6px 20px rgba(102,126,234,0.35); }
.db-kpi-emerald { background: linear-gradient(135deg, #0bab64 0%, #3bb78f 100%); box-shadow: 0 6px 20px rgba(11,171,100,0.3); }
.db-kpi-amber { background: linear-gradient(135deg, #CC9933 0%, #f7a440 100%); box-shadow: 0 6px 20px rgba(204,153,51,0.35); }
.db-kpi-rose { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); box-shadow: 0 6px 20px rgba(245,87,108,0.3); }

.db-kpi-bg-icon {
  position: absolute;
  right: -0.5rem;
  top: -0.75rem;
  font-size: 5.5rem;
  opacity: 0.1;
  line-height: 1;
  user-select: none;
}

.db-kpi-icon-wrap {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: rgba(255,255,255,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 0.85rem;
}

.db-kpi-number {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1.5px;
  animation: db-fade-up 0.4s ease both;
}
@keyframes db-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.db-kpi-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 0.4rem;
}
.db-kpi-footer {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.85);
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.db-kpi-live { color: #a7f3d0; }
.db-pulse-dot {
  font-size: 0.5rem;
  animation: db-pulse 1.5s ease-in-out infinite;
  color: #4ade80;
}
@keyframes db-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}

.db-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.db-charts-row {
  grid-template-columns: 3fr 2fr;
}
.db-chart-card-lg { }
.db-chart-card-sm { }
.db-chart-body {
  padding-top: 0 !important;
  padding-bottom: 0.5rem !important;
}

.db-list-body {
  padding: 0 !important;
}
.db-job-list {
  display: flex;
  flex-direction: column;
}
.db-job-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.85rem 1.25rem;
  text-decoration: none !important;
  color: var(--gray-800) !important;
  transition: background 0.15s ease;
  border-bottom: 1px solid var(--gray-100);
}
.db-job-row:last-child { border-bottom: none; }
.db-job-row:hover { background: var(--gray-50); }

.db-job-icon-wrap {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.db-job-icon-wrap.badge-success   { background: #d1fae5; color: #059669; }
.db-job-icon-wrap.badge-error     { background: #fee2e2; color: #dc2626; }
.db-job-icon-wrap.badge-parsing   { background: #dbeafe; color: #2563eb; }
.db-job-icon-wrap.badge-uploading { background: var(--gray-100); color: var(--gray-400); }

.db-job-info { flex: 1; min-width: 0; }
.db-job-name {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-job-meta {
  display: flex;
  gap: 0.9rem;
  margin-top: 0.2rem;
}
.db-job-meta span {
  font-size: 0.72rem;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.db-job-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  flex-shrink: 0;
}
.db-job-time {
  font-size: 0.7rem;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.db-note-feed {
  display: flex;
  flex-direction: column;
}
.db-note-row {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.15s ease;
}
.db-note-row:last-child { border-bottom: none; }
.db-note-row:hover { background: var(--gray-50); }

.db-note-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.db-note-success { background: #d1fae5; color: #059669; }
.db-note-warning { background: #fef3c7; color: #d97706; }
.db-note-danger  { background: #fee2e2; color: #dc2626; }
.db-note-info    { background: #dbeafe; color: #2563eb; }

.db-note-body  { flex: 1; min-width: 0; }
.db-note-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-note-msg {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 0.15rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.db-note-time {
  font-size: 0.7rem;
  color: var(--gray-400);
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.db-admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #1a2a4a 0%, #0f1e36 100%);
  border-radius: 1rem;
  padding: 1.25rem 1.75rem;
  color: white;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.db-admin-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.db-admin-header-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #93c5fd;
}
.db-admin-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: white;
}
.db-admin-sub {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  margin-top: 0.2rem;
}
.db-admin-header .btn-outline {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.9) !important;
}
.db-admin-header .btn-outline:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.35);
  color: white !important;
}

.db-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}
.db-metric-card {
  background: white;
  border-radius: 0.9rem;
  padding: 1.25rem 1rem;
  text-align: center;
  border: 1px solid var(--gray-100);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.db-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.09);
}
.db-metric-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: 0.9rem 0.9rem 0 0;
}
.db-metric-blue::before   { background: linear-gradient(90deg, #667eea, #764ba2); }
.db-metric-green::before  { background: linear-gradient(90deg, #0bab64, #3bb78f); }
.db-metric-red::before    { background: linear-gradient(90deg, #ef4444, #f97316); }
.db-metric-purple::before { background: linear-gradient(90deg, #9333ea, #c026d3); }
.db-metric-teal::before   { background: linear-gradient(90deg, #0891b2, #22d3ee); }
.db-metric-orange::before { background: linear-gradient(90deg, #CC9933, #f7a440); }

.db-metric-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--gray-300);
}
.db-metric-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-800);
  line-height: 1;
  letter-spacing: -0.5px;
}
.db-metric-label {
  font-size: 0.7rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-top: 0.35rem;
}

.db-user-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.db-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}
.db-bar-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.db-bar-track {
  flex: 1;
  height: 6px;
  background: var(--gray-100);
  border-radius: 999px;
  overflow: hidden;
  max-width: 100px;
}
.db-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.db-bar-val {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gray-700);
  white-space: nowrap;
}

@media (max-width: 1280px) {
  .db-kpi-grid         { grid-template-columns: repeat(2, 1fr); }
  .db-metric-grid      { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .db-two-col,
  .db-charts-row       { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .db-kpi-grid         { grid-template-columns: 1fr; }
  .db-metric-grid      { grid-template-columns: repeat(2, 1fr); }
  .db-welcome          { flex-direction: column; align-items: flex-start; }
  .db-welcome-actions  { width: 100%; }
}

.text-success { color: var(--success-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-danger  { color: var(--danger-color) !important; }
.text-primary { color: var(--primary-color) !important; }
.text-right   { text-align: right; }

.card {
  transition: box-shadow 0.22s ease;
}
.card:hover {
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
}


.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--gray-200);
  background: white;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.filter-pill:hover {
  background: var(--gray-50);
  border-color: var(--primary-color);
  color: var(--gray-900);
}
.filter-pill.active {
  background: linear-gradient(135deg, #b8862e, var(--primary-color));
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 12px rgba(204,153,51,0.3);
}
.filter-count {
  background: rgba(0,0,0,0.12);
  border-radius: 9999px;
  padding: 0.05rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
}
.filter-pill.active .filter-count {
  background: rgba(255,255,255,0.25);
}

.notification-toolbar {
  margin-bottom: 0.75rem;
}
.notification-card {
  cursor: default;
}
.notification-card.is-unread {
  cursor: pointer;
}
.notification-body .text-muted a {
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: none;
}
.notification-body .text-muted a:hover {
  text-decoration: underline;
}

.empty-state {
  text-align: center;
  padding: 3.5rem 2rem;
}
.empty-state i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--gray-100), var(--gray-50));
  border: 1px solid var(--gray-200);
  font-size: 1.6rem;
  color: var(--gray-400);
  margin-bottom: 0.85rem;
}
.empty-state .text-muted {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin: 0;
}

.job-queue-summary {
  gap: 1.1rem;
}
.summary-card {
  border-radius: 1rem;
  padding: 1.1rem 1.35rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.summary-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(15,23,42,0.1);
}
.summary-card--neutral { background: linear-gradient(135deg, #f8fafc, white);   border-left: 3px solid var(--gray-300); }
.summary-card--warning { background: linear-gradient(135deg, #fffbeb, white);   border-left: 3px solid var(--warning-color); }
.summary-card--success { background: linear-gradient(135deg, #ecfdf5, white);   border-left: 3px solid var(--success-color); }
.summary-card--error   { background: linear-gradient(135deg, #fef2f2, white);   border-left: 3px solid var(--danger-color);  }
.summary-label { font-weight: 600; }
.summary-value { font-size: 1.75rem; letter-spacing: -0.02em; }

.badge {
  letter-spacing: 0.01em;
}
.badge-uploading { background: #fef3c7; color: #78350f; }
.badge-success   { background: #dcfce7; color: #15803d; }
.badge-parsing   { background: #dbeafe; color: #1d4ed8; }
.badge-error     { background: #fee2e2; color: #b91c1c; }

.btn-outline:hover {
  background: #f8fafc;
  border-color: var(--gray-400);
  color: var(--gray-800);
}
.btn-danger:hover {
  background: #dc2626;
}

.detail-row {
  transition: background 0.15s ease;
}
.detail-row:hover {
  background: white;
  border-color: rgba(204,153,51,0.2);
}


.notification-body .text-muted {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--gray-600);
}

.chart-skeleton {
  height: 220px;
  border-radius: 0.75rem;
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: white;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--gray-100);
  box-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 4px 12px rgba(15,23,42,0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.stat-card:hover {
  box-shadow: 0 6px 24px rgba(15,23,42,0.12);
  transform: translateY(-2px);
}
.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.stat-icon--gold   { background: rgba(204,153,51,0.12);  color: #CC9933; }
.stat-icon--green  { background: rgba(34,197,94,0.12);   color: #16a34a; }
.stat-icon--yellow { background: rgba(234,179,8,0.10);   color: #ca8a04; }
.stat-icon--red    { background: rgba(239,68,68,0.10);   color: #dc2626; }
.stat-icon--blue   { background: rgba(59,130,246,0.10);  color: #2563eb; }
.stat-icon--purple { background: rgba(139,92,246,0.10);  color: #7c3aed; }
.stat-icon--teal   { background: rgba(20,184,166,0.10);  color: #0d9488; }
.stat-icon--gray   { background: rgba(100,116,139,0.10); color: #64748b; }
.stat-body { min-width: 0; }
.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
  letter-spacing: -0.03em;
}
.stat-sub {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-top: 0.25rem;
}

.entity-hero {
  background: white;
  border-radius: 14px;
  border: 1px solid var(--gray-100);
  box-shadow: 0 1px 4px rgba(15,23,42,0.06);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.75rem 2rem;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.entity-hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color) 0%, #f0d060 50%, transparent 100%);
}
.entity-hero-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #b8892e 100%);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.875rem;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(204,153,51,0.35);
}
.entity-hero-icon--blue {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 6px 16px rgba(59,130,246,0.30);
}
.entity-hero-icon--green {
  background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
  box-shadow: 0 6px 16px rgba(34,197,94,0.30);
}
.entity-hero-icon--red {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  box-shadow: 0 6px 16px rgba(239,68,68,0.30);
}
.entity-hero-icon--neutral {
  background: linear-gradient(135deg, var(--gray-600) 0%, var(--gray-800) 100%);
  box-shadow: 0 6px 16px rgba(15,23,42,0.25);
}
.entity-hero-icon--thumb {
  width: 96px;
  height: 120px;
  border-radius: 12px;
  background: var(--gray-100);
  box-shadow: 0 4px 16px rgba(0,0,0,0.14);
  padding: 0;
  overflow: hidden;
  align-self: flex-start;
}
.entity-hero-icon--thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
.entity-hero-body {
  flex: 1;
  min-width: 0;
}
.entity-hero-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entity-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1.5rem;
}
.entity-hero-meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--gray-500);
}
.entity-hero-meta-item i {
  font-size: 0.875rem;
  color: var(--gray-400);
}
.entity-hero-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
@media (max-width: 640px) {
  .entity-hero { flex-direction: column; align-items: flex-start; padding: 1.25rem; gap: 1rem; }
  .entity-hero-icon { width: 48px; height: 48px; font-size: 1.375rem; border-radius: 12px; }
  .entity-hero-title { font-size: 1.25rem; }
}

.user-hero-avatar {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #334155 0%, #0f172a 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(15,23,42,0.25);
  letter-spacing: -0.02em;
}

.card-badge {
  background: var(--gray-100);
  color: var(--gray-600);
  border-radius: 20px;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.5rem;
}

.table-result-count {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-500);
  background: var(--gray-100);
  border-radius: 20px;
  padding: 0.2rem 0.65rem;
  white-space: nowrap;
}
.table-result-count strong { color: var(--gray-700); }

.search-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 16px;
  padding: 2rem 2.5rem 2.25rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}
.search-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 80%, rgba(204,153,51,0.14) 0%, transparent 60%);
  pointer-events: none;
}
.search-hero-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: white;
  margin: 0 0 0.375rem;
  position: relative;
}
.search-hero-sub {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.45);
  margin: 0 0 1.5rem;
  position: relative;
}
.search-hero-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 0.875rem;
  align-items: end;
  position: relative;
}
@media (max-width: 1000px) {
  .search-hero-form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .search-hero-form { grid-template-columns: 1fr; }
  .search-hero { padding: 1.25rem; }
}
.search-hero .form-label { color: rgba(255,255,255,0.55); font-size: 0.8rem; margin-bottom: 0.35rem; }
.search-hero .form-control {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.14);
  color: white;
}
.search-hero .form-control::placeholder { color: rgba(255,255,255,0.3); }
.search-hero .form-control:focus {
  background: rgba(255,255,255,0.11);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(204,153,51,0.2);
  color: white;
}
.search-hero .btn-outline {
  color: rgba(255,255,255,0.8);
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.07);
}
.search-hero .btn-outline:hover {
  background: rgba(255,255,255,0.13);
  border-color: rgba(255,255,255,0.4);
  color: white;
}
.search-hero .input-icon i { color: rgba(255,255,255,0.35); }

.error-hero {
  text-align: center;
  padding: 4rem 2rem 3rem;
}
.error-hero-icon-wrap {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.5rem;
}
.error-hero-icon-wrap--red    { background: linear-gradient(135deg, #fef2f2, #fca5a5); color: #dc2626; }
.error-hero-icon-wrap--yellow { background: linear-gradient(135deg, #fffbeb, #fde68a); color: #b45309; }
.error-hero-code {
  font-size: 5rem;
  font-weight: 900;
  color: var(--gray-200);
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.04em;
}
.error-hero-title {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--gray-800);
  margin: 0 0 0.875rem;
}
.error-hero-sub {
  font-size: 0.9375rem;
  color: var(--gray-500);
  max-width: 460px;
  margin: 0 auto 2.25rem;
  line-height: 1.65;
}
.error-hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.error-dev-note {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
  text-align: left;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}
.error-dev-note h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin: 0 0 0.5rem;
}
.error-dev-note p {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin: 0 0 0.5rem;
  line-height: 1.6;
}
.error-dev-note p:last-child { margin: 0; }

.settings-section {
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 1.5rem;
}
.settings-section:first-child { padding-top: 0; }
.settings-section:last-child { border-bottom: none; margin-bottom: 0; }
.settings-section-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.settings-section-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(204,153,51,0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}
.settings-section-text {}
.settings-section-title { font-size: 0.9375rem; font-weight: 600; color: var(--gray-800); line-height: 1.2; }
.settings-section-sub   { font-size: 0.8rem; color: var(--gray-400); margin-top: 0.125rem; }

.model-id-pill {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: 0.175rem 0.525rem;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.8125rem;
  color: #1e40af;
  letter-spacing: -0.01em;
}

.log-token-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.log-token-track {
  flex: 1;
  height: 4px;
  background: var(--gray-100);
  border-radius: 99px;
  overflow: hidden;
  min-width: 40px;
  max-width: 80px;
}
.log-token-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), #f0d060);
  border-radius: 99px;
}

.user-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 900px) {
  .user-detail-grid { grid-template-columns: 1fr; }
}
.card-body.p-0 { padding: 0; }

.user-detail-list {
  display: flex;
  flex-direction: column;
}
.user-detail-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1.25rem;
  text-decoration: none;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.15s ease;
  cursor: pointer;
}
.user-detail-item:last-child { border-bottom: none; }
.user-detail-item:hover { background: #f8fafc; }
.user-detail-item:hover .user-detail-item-arrow { opacity: 1; transform: translateX(2px); }
.user-detail-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(204,153,51,0.10);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.user-detail-item-icon--file  { background: rgba(59,130,246,0.10); color: #2563eb; }
.user-detail-item-icon--job   { background: rgba(100,116,139,0.10); color: #64748b; }
.user-detail-item-body { flex: 1; min-width: 0; }
.user-detail-item-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-800);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-detail-item-sub {
  font-size: 0.775rem;
  color: var(--gray-400);
  margin-top: 0.125rem;
}
.user-detail-item-arrow {
  font-size: 0.75rem;
  color: var(--gray-300);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.notif-stat-strip {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.notif-stat {
  flex: 1;
  min-width: 120px;
  background: white;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  border: 1px solid var(--gray-100);
  box-shadow: 0 1px 3px rgba(15,23,42,0.05);
  transition: box-shadow 0.2s ease;
}
.notif-stat:hover { box-shadow: 0 4px 14px rgba(15,23,42,0.10); }
.notif-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}
.notif-stat-icon--all    { background: rgba(100,116,139,0.10); color: #64748b; }
.notif-stat-icon--unread { background: rgba(59,130,246,0.10);  color: #2563eb; }
.notif-stat-icon--read   { background: rgba(34,197,94,0.10);   color: #16a34a; }
.notif-stat-body {}
.notif-stat-label { font-size: 0.7rem; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.2rem; }
.notif-stat-value { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); line-height: 1; }

.table-shell {
  background: white;
  border-radius: 14px;
  border: 1px solid var(--gray-100);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  background: linear-gradient(180deg, white 0%, #fdfdfd 100%);
}
.table-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: nowrap;
  flex: 1;
  min-width: 0;
}
.table-toolbar-left > * { flex-shrink: 0; }
.table-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.table-filter {
  position: relative;
  display: flex;
  align-items: center;
}
.table-filter > i {
  position: absolute;
  left: 0.75rem;
  color: var(--gray-400);
  font-size: 0.875rem;
  pointer-events: none;
  transition: color 0.2s ease;
  z-index: 1;
}
.table-filter:focus-within > i { color: var(--primary-color); }
.table-filter-input {
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  padding: 0.45rem 0.875rem 0.45rem 2.25rem;
  font-size: 0.825rem;
  color: var(--gray-800);
  background: var(--gray-50);
  min-width: 200px;
  width: 260px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, width 0.25s ease;
}
.table-filter-input::placeholder { color: var(--gray-400); }
.table-filter-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3.5px rgba(204,153,51,0.14);
  background: white;
  width: 320px;
}

.table-result-count {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-500);
  background: var(--gray-100);
  border-radius: 20px;
  padding: 0.2rem 0.7rem;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.table-result-count strong { color: var(--gray-700); font-weight: 700; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.data-table th {
  text-align: left;
  padding: 0.75rem 1.125rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gray-500);
  background: #f8fafc;
  border-bottom: 1.5px solid var(--gray-200);
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
  user-select: none;
}
.data-table th:first-child { padding-left: 1.25rem; }
.data-table th:last-child  { padding-right: 1.25rem; }

.data-table th.th-sorted {
  color: var(--primary-color);
  background: linear-gradient(180deg, #fffdf5 0%, #fef9ec 100%);
  border-bottom-color: var(--primary-color);
}
.data-table th.th-sorted .table-sort { color: var(--primary-color); }
.data-table th.th-sorted .table-sort i { color: var(--primary-color); opacity: 1; }

.table-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gray-500);
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
  line-height: 1;
}
.table-sort:hover { color: var(--gray-800); }
.table-sort i {
  font-size: 0.7rem;
  color: var(--gray-300);
  opacity: 0.7;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.table-sort:hover i { color: var(--gray-500); opacity: 1; }

.col-index { width: 44px; }
.data-table th.col-index,
.data-table td.col-index {
  text-align: center;
  padding-left: 0.875rem;
  padding-right: 0.5rem;
}
.data-table td.col-index {
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gray-300);
  letter-spacing: 0.02em;
}

.data-table td {
  padding: 0.875rem 1.125rem;
  font-size: 0.875rem;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
  transition: background 0.12s ease;
}
.data-table td:first-child { padding-left: 1.25rem; }
.data-table td:last-child  { padding-right: 1.25rem; }
.data-table tr:last-child td { border-bottom: none; }

.data-table--interactive tbody tr { position: relative; }
.data-table--interactive tbody tr > td:first-child { position: relative; }
.data-table--interactive tbody tr > td:first-child::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  transition: background 0.15s ease;
  border-radius: 0 2px 2px 0;
}
.data-table--interactive tbody tr:hover td {
  background: rgba(204,153,51,0.04);
}
.data-table--interactive tbody tr:hover > td:first-child::before {
  background: var(--primary-color);
}
.data-table--interactive tbody tr:hover .table-link { color: var(--primary-color); }

.table-link {
  color: var(--gray-900);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.15s ease;
  position: relative;
}
.table-link::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--primary-color);
  transition: width 0.2s ease;
  border-radius: 1px;
}
.table-link:hover { color: var(--primary-color); }
.table-link:hover::after { width: 100%; }

.table-subtext {
  font-size: 0.775rem;
  color: var(--gray-400);
  margin-top: 0.1rem;
  line-height: 1.4;
}

.table-entity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.table-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(204,153,51,0.10);
  border: 1px solid rgba(204,153,51,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1rem;
  flex-shrink: 0;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.data-table--interactive tbody tr:hover .table-icon {
  box-shadow: 0 4px 10px rgba(204,153,51,0.25);
  transform: scale(1.06);
}
.table-icon--blue   { background: rgba(59,130,246,0.10);  border-color: rgba(59,130,246,0.18);   color: #2563eb; }
.table-icon--green  { background: rgba(34,197,94,0.10);   border-color: rgba(34,197,94,0.18);    color: #16a34a; }
.table-icon--red    { background: rgba(239,68,68,0.10);   border-color: rgba(239,68,68,0.18);    color: #dc2626; }
.table-icon--gray   { background: rgba(100,116,139,0.10); border-color: rgba(100,116,139,0.18);  color: #64748b; }
.table-icon--purple { background: rgba(139,92,246,0.10);  border-color: rgba(139,92,246,0.18);   color: #7c3aed; }
.table-stacked {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.table-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #334155 0%, #0f172a 100%);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(15,23,42,0.20);
}

.table-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  justify-content: flex-end;
  opacity: 0.55;
  transition: opacity 0.15s ease;
}
.data-table--interactive tbody tr:hover .table-actions { opacity: 1; }

.table-filter-select,
.data-table-filter-input {
  appearance: none;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  padding: 0.45rem 2.2rem 0.45rem 0.825rem;
  font-size: 0.825rem;
  background: var(--gray-50);
  color: var(--gray-700);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 6 8 10 12 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 13px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.table-filter-select:focus,
.data-table-filter-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3.5px rgba(204,153,51,0.14);
  background-color: white;
}
.status-filter-select { min-width: 155px; }

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--gray-100);
  background: linear-gradient(180deg, #fdfdfd 0%, white 100%);
  flex-wrap: wrap;
}
.table-pagination-info {
  font-size: 0.78rem;
  color: var(--gray-500);
}
.table-pagination-info strong { color: var(--gray-700); }
.table-pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.table-pagination-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.875rem;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(204,153,51,0.12) 0%, rgba(204,153,51,0.06) 100%);
  border: 1.5px solid rgba(204,153,51,0.25);
  color: var(--primary-color);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.table-shell .empty-state {
  padding: 4rem 2rem;
  border-top: none;
}

@media (max-width: 768px) {
  .table-filter-input { width: 180px; }
  .table-filter-input:focus { width: 220px; }
  .table-toolbar { padding: 0.75rem 1rem; }
  .table-pagination { padding: 0.75rem 1rem; }
  .data-table th,
  .data-table td { padding: 0.75rem 0.875rem; }
  .data-table th:first-child,
  .data-table td:first-child { padding-left: 1rem; }
}


.structure-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem 1.5rem;
}

.detail-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.detail-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
}

.detail-value {
  font-size: 0.92rem;
  color: var(--text-primary);
}

.structure-edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
}

.structure-inverts-section {
  margin-top: 1rem;
  border-top: 1px solid var(--border-color, #e0e0e0);
  padding-top: 0.75rem;
}

.structure-inverts-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.structure-inverts-title i {
  font-size: 0.95rem;
}

.invert-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  align-items: center;
}

.invert-row .btn-danger {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.inverts-table-wrapper {
  margin-bottom: 0.75rem;
}

.inverts-table-wrapper .data-table {
  font-size: 0.85rem;
}

.inverts-table-wrapper .data-table th,
.inverts-table-wrapper .data-table td {
  padding: 0.4rem 0.75rem;
}

.card-header .badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  vertical-align: middle;
  margin-left: 0.35rem;
}

@media (max-width: 600px) {
  .structure-edit-grid,
  .structure-detail-grid {
    grid-template-columns: 1fr;
  }
  .invert-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Feedback dialog — page thumbnails + detail */
.feedback-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  max-height: 420px;
  overflow-y: auto;
  padding: 0.25rem;
}

.feedback-page-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 2px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 0.5rem;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  text-align: left;
}

.feedback-page-card:hover {
  border-color: #0d6efd;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.feedback-page-card:focus-visible {
  outline: 3px solid rgba(13, 110, 253, 0.35);
  outline-offset: 2px;
}

.feedback-page-card.has-note {
  border-color: #198754;
  background: #f1fbf5;
}

.feedback-page-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #f8f9fa;
  border-radius: 0.25rem;
}

.feedback-page-card-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #495057;
}

.feedback-page-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  max-height: 520px;
}

.feedback-page-detail-image {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #f8f9fa;
  border-radius: 0.5rem;
  padding: 0.5rem;
  overflow: hidden;
}

.feedback-page-detail-image img {
  width: 100%;
  max-height: 440px;
  object-fit: contain;
  background: #fff;
  border-radius: 0.25rem;
  flex: 1 1 auto;
  min-height: 0;
}

.feedback-page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.feedback-page-detail-form {
  overflow-y: auto;
  padding-right: 0.25rem;
}

@media (max-width: 900px) {
  .feedback-page-detail {
    grid-template-columns: 1fr;
    max-height: none;
  }
  .feedback-page-detail-image img {
    max-height: 300px;
  }
}
