@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&display=swap");

body {
  font-family: "Space Grotesk", sans-serif;
  margin: 0;
  background: #0e0e12;
  color: #f2f2f2;
}
.top-header {
  background: linear-gradient(135deg, #1a0a08 0%, #0e0e12 50%, #0e0e12 100%);
  color: #f2f2f2;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand { font-weight: 700; letter-spacing: 0.2px; }
.main-menu { display: flex; gap: 8px; flex-wrap: wrap; }
.main-menu a { color: #f2f2f2; text-decoration: none; font-size: 14px; padding: 6px 10px; border-radius: 6px; border: 1px solid #2a2a32; }
.main-menu a.active { background: #ea4335; color: #fff; border-color: #ea4335; }
.main-menu a.group { background: linear-gradient(135deg, #ea4335 0%, #ff6b35 100%); color: #fff; border-color: #ea4335; }
.sub-menu { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 30px 0; }
.sub-menu a { color: #f2f2f2; text-decoration: none; font-size: 13px; padding: 6px 10px; border-radius: 6px; border: 1px solid #2a2a32; background: #14151c; }
.sub-menu a.active { background: #ea4335; border-color: #ea4335; color: #fff; }
main {
  max-width: 1120px;
  margin: 20px auto;
  background: #111217;
  border: 1px solid #22232a;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.app-shell { display: flex; min-height: 100vh; }
.app-shell .top-header { display: none; }
.app-shell main {
  max-width: 1280px;
  margin: 30px 20px;
}
.app-sidebar {
  width: 244px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #1a0a08 0%, #0e0e12 60%, #0e0e12 100%);
  border-right: 1px solid #22232a;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  transition: width 0.18s ease;
}
.app-sidebar.collapsed { width: 64px; }
.app-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #22232a;
}
.app-sidebar-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}
.app-sidebar-logo {
  display: block;
  width: 156px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}
.app-sidebar.collapsed .app-sidebar-brand { display: none; }
.app-collapse-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 1px solid #2e2f38;
  color: #f2f2f2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
}
.app-collapse-btn:hover { background: #1a1418; border-color: #3a3b45; }
.app-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.app-nav .nav-section-label {
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #6f6970;
  padding: 12px 12px 6px;
  white-space: nowrap;
}
.app-sidebar.collapsed .nav-section-label { display: none; }
.app-nav a.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #e8e2da;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.app-nav a.nav-link:hover { background: #181318; color: #fff; }
.app-nav a.nav-link.active {
  background: #ea4335;
  color: #fff;
  border-color: #ea4335;
}
.app-nav a.nav-link.active i { color: #fff; }
.app-nav a.nav-link i {
  width: 18px;
  text-align: center;
  color: #ff8c42;
  flex-shrink: 0;
  font-size: 14px;
}
.app-nav .nav-link-label { transition: opacity 0.18s ease; }
.app-sidebar.collapsed .nav-link-label { display: none; }
.app-nav .nav-group { display: flex; flex-direction: column; gap: 2px; }
.app-nav .nav-group-toggle {
  cursor: pointer;
  user-select: none;
}
.app-nav .nav-group-toggle.active-parent {
  color: #ffd8b0;
}
.app-nav .nav-group-toggle.active-parent i:first-child { color: #ffd8b0; }
.app-nav .nav-group-caret {
  margin-left: auto;
  font-size: 10px !important;
  width: auto !important;
  color: #6f6970 !important;
  transition: transform 0.18s ease;
}
.app-nav .nav-group.collapsed-group .nav-group-caret {
  transform: rotate(-90deg);
}
.app-nav .nav-group-children {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 16px;
  border-left: 2px solid #2a1f1d;
  margin: 2px 0 4px 18px;
  overflow: hidden;
  max-height: 600px;
  transition: max-height 0.18s ease, opacity 0.15s ease, margin 0.15s ease;
}
.app-nav .nav-group.collapsed-group .nav-group-children {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
  pointer-events: none;
}
.app-sidebar.collapsed .nav-group-children {
  padding-left: 0;
  margin: 2px 0 4px 0;
  border-left: none;
}
.app-sidebar.collapsed .nav-group.collapsed-group .nav-group-children {
  max-height: 600px;
  opacity: 1;
  pointer-events: auto;
}
.app-sidebar.collapsed .nav-group-caret { display: none; }
.app-nav .nav-group-children a.nav-link {
  font-size: 13px;
  padding: 7px 10px;
}
.app-sidebar-footer {
  border-top: 1px solid #22232a;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.app-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #e6dad1;
  min-width: 0;
}
.app-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ea4335;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #fff;
  flex-shrink: 0;
}
.app-user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.app-user-meta .user-name {
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-user-meta .user-role {
  font-size: 11px;
  color: #b9aca0;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.app-sidebar.collapsed .app-user-meta { display: none; }
.app-sidebar.collapsed .app-logout-btn { padding: 8px 0; }
.app-logout-btn {
  background: #1b1c22;
  color: #f2f2f2;
  border: 1px solid #3a3b45;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  cursor: pointer;
}
.app-logout-btn:hover { background: #2a1f1d; border-color: #4a3a36; }
.app-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: #0d0e13;
  border-bottom: 1px solid #22232a;
  position: sticky;
  top: 0;
  z-index: 5;
}
.app-topbar-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #c7b9b8;
}
.app-topbar-title .crumb-active { color: #fff; font-weight: 600; }
.app-topbar-actions { display: flex; align-items: center; gap: 10px; }
.app-mobile-toggle {
  display: none;
  width: 36px;
  height: 36px;
  padding: 0;
  background: #1b1c22;
  color: #fff;
  border: 1px solid #3a3b45;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
@media (max-width: 900px) {
  .app-sidebar {
    position: fixed;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    width: 244px;
  }
  .app-sidebar.mobile-open { transform: translateX(0); }
  .app-sidebar.collapsed { width: 244px; }
  .app-content { width: 100%; }
  .app-mobile-toggle { display: inline-flex; }
}
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.page-header > div:first-child { max-width: 50%; min-width: 0; }
.page-title { margin: 0; font-size: 22px; }
.page-subtitle { margin: 2px 0 0 0; color: #c7b9b8; font-size: 14px; line-height: 1.4; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
form { display: grid; gap: 10px; margin: 0; }
label {
  font-size: 12px;
  color: #c7b9b8;
  font-weight: 600;
}
input, select, textarea, button {
  padding: 8px;
  font-size: 12px;
  font-family: "Space Grotesk", sans-serif;
  border-radius: 6px;
  border: 1px solid #2e2f38;
  background: #0f1015;
  color: #f2f2f2;
}
button { background: #ea4335; color: #fff; border: 1px solid #ea4335; cursor: pointer; font-weight: 700; }
button.secondary { background: #1b1c22; color: #f2f2f2; border-color: #3a3b45; }
button.ghost { background: #191a20; color: #f2f2f2; border-color: #2e2f38; }
button.warning { background: #7c2d12; color: #fff; border-color: #9a3412; }
button.danger { background: #7f1d1d; color: #fff; border-color: #991b1b; }
.table-count {
  display: block;
  margin: 16px 0 0;
  font-size: 10px;
  color: #f6f6f6;
  text-align: right;
}
.table-count + table { margin-top: 4px; }
.table-pagination {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
table { width: 100%; border-collapse: collapse; margin-top: 12px; }
th, td { border-bottom: 1px solid #2a2b33; text-align: left; padding: 10px 8px; }
th {
  color: #ff8c42;
  font-weight: 700;
  font-size: 13px;
  position: sticky;
  top: 52px;
  z-index: 2;
  background: #111217;
}
td { font-size: 12px; }
.sortable { cursor: pointer; user-select: none; }
.sortable:hover { color: #ffd8b0; }
.icon-cell { text-align: center; vertical-align: middle; }
.num-cell { text-align: right; font-variant-numeric: tabular-nums; }
.muted { color: #6b7280; font-size: 12px; }
.inline-checkbox { display: inline-flex; align-items: center; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-hint { margin: 0; font-size: 12px; color: #94a3b8; }
.modal-hint:empty { display: none; }
.alert {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  border: 1px solid transparent;
}
.alert-error {
  background: rgba(234, 67, 53, 0.08);
  border-color: rgba(234, 67, 53, 0.4);
  color: #fca5a5;
}
.cost-picker {
  border: 1px solid #2a2b33;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cost-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #c7b9b8;
  font-weight: 600;
}
.cost-picker-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}
.cost-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.cost-row:hover { background: rgba(255, 140, 66, 0.08); }
.cost-row input[type="checkbox"] { margin: 0; }
.cost-row .cost-name { font-size: 12px; color: #e7e1d8; }
.cost-row .cost-amount { font-size: 12px; font-variant-numeric: tabular-nums; }
.chip {
  display: inline-block;
  padding: 2px 8px;
  margin: 1px 2px 1px 0;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(255, 140, 66, 0.12);
  color: #ffd8b0;
  border: 1px solid rgba(255, 140, 66, 0.3);
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
}
.fa-solid { line-height: 1; }
.badge-disabled {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #ffd8b0;
  background: rgba(234, 67, 53, 0.18);
  border: 1px solid rgba(234, 67, 53, 0.45);
}
.badge-type {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #ffd8b0;
  background: rgba(234, 67, 53, 0.18);
  border: 1px solid rgba(234, 67, 53, 0.45);
}
.inline-help {
  margin-left: 6px;
  color: #ff8c42;
  font-size: 12px;
  cursor: help;
}
.tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.tooltip-wrap::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  min-width: 220px;
  max-width: 360px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #1a1418;
  color: #f7efe7;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 20;
}
.tooltip-wrap::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #1a1418 transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
  z-index: 20;
}
.tooltip-wrap:hover::after,
.tooltip-wrap:hover::before {
  opacity: 1;
  visibility: visible;
}
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label {
  font-size: 12px;
  color: #c7b9b8;
  font-weight: 600;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.field > label .req { color: #ea4335; }
.field-error {
  display: block;
  font-size: 11px;
  line-height: 1.3;
  color: #f87171;
  min-height: 0;
}
.field-error:empty { display: none; }
.field.has-error > input,
.field.has-error > select,
.field.has-error > textarea {
  border-color: #ea4335;
  box-shadow: 0 0 0 1px rgba(234, 67, 53, 0.35) inset;
}
.status { color: #0f766e; font-weight: 600; margin-bottom: 8px; }
.error { color: #ea4335; font-weight: 600; margin-bottom: 8px; }
.modal { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal.show { display: flex; }
.modal-card {
  width: min(720px, 100%);
  background: #0f1015;
  border: 1px solid #2e2f38;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.45);
}

/* Tall forms (e.g. Add Project Completion + expanded direct cost): scroll body, pin actions. */
.modal-card-scrollable {
  max-height: min(92vh, calc(100dvh - 32px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.modal-card-scrollable > .modal-header {
  flex-shrink: 0;
}
.modal-card-scrollable > form.project-completion-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
.modal-card-scrollable .modal-scroll-body {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}
.modal-card-scrollable .modal-actions {
  flex-shrink: 0;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid #2e2f38;
}

.ocr-linked-file {
  border: 1px solid #2a4a38;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #101a14;
}
.ocr-linked-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #e2e8f0;
  word-break: break-word;
}
.ocr-linked-file-link {
  color: #ffffff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ocr-linked-file-link:hover { color: #ffffff; opacity: 0.92; }
.ocr-linked-file-link:visited { color: #ffffff; }
.ocr-preview-eye {
  color: #ffffff;
  opacity: 0.9;
  font-size: 12px;
}
.form-dup-notice {
  margin: 4px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(220, 38, 38, 0.45);
  background: rgba(127, 29, 29, 0.14);
  color: #fecaca;
  font-size: 12px;
  line-height: 1.35;
}
.dup-warning-icon {
  color: #ef4444;
  margin-left: 6px;
  font-size: 12px;
}
.ocr-linked-file-row .fa-circle-check {
  color: #34d399;
  flex-shrink: 0;
}
.modal-card.loading-card {
  width: auto;
  max-width: min(420px, 92vw);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  text-align: left;
}
.modal-card.loading-card .loading-spinner {
  font-size: 28px;
  color: #ff8c42;
  flex-shrink: 0;
}
.modal-card.loading-card .modal-title { font-size: 14px; }
.modal-card.import-modal-card {
  width: min(60vw, 980px);
  min-width: min(96vw, 720px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
.modal-card.invoice-preview-card {
  width: min(92vw, 1100px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
.invoice-preview-body {
  margin-top: 8px;
  border: 1px solid #2e2f38;
  border-radius: 8px;
  background: #0f1015;
  min-height: 60vh;
  max-height: 68vh;
  overflow: auto;
}
.invoice-preview-embed {
  width: 100%;
  height: 66vh;
  border: 0;
  display: block;
}
.invoice-preview-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
.invoice-preview-empty {
  margin: 0;
  padding: 14px;
  color: #c7b9b8;
}
.import-preview-wrap {
  display: none;
  max-height: 62vh;
  overflow: auto;
  border: 1px solid #2e2f38;
  border-radius: 8px;
  padding: 6px;
  background: #0d0e13;
}
.modal th {
  top: 0;
  background: #0f1015;
}
.import-row-fields {
  display: grid;
  gap: 6px;
}
.import-row-fields select,
.import-row-fields input {
  width: 100%;
}
.import-issue {
  font-size: 12px;
  margin-bottom: 4px;
  line-height: 1.25;
}
.import-issue.error {
  color: #ea4335;
}
.import-issue.warn {
  color: #f59e0b;
}
.import-suggestion-panel {
  border: 1px solid #3a3b45;
  border-radius: 8px;
  padding: 8px;
  background: #14151c;
  display: grid;
  gap: 8px;
}
.import-suggestion-actions {
  display: flex;
  justify-content: flex-end;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.modal-title { margin: 0; font-size: 14px; }
.modal-actions { display: flex; gap: 8px; margin-top: 8px; justify-content: flex-end; }
/* Make sure the `hidden` HTML attribute always wins over layout
   classes like `.stack` (display: grid) and `.row` (display: flex). */
[hidden] { display: none !important; }
.stack { display: grid; gap: 10px; }
.checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #2e2f38;
  border-radius: 8px;
  background: #12131a;
  font-size: 12px;
}
.checkbox-item input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
}
.collapse-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffd8b0;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
.collapse-content {
  display: none;
}
.collapse-content.show {
  display: grid;
  gap: 8px;
}
.checkbox-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 180px;
  overflow: auto;
  padding-right: 4px;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ---------- AI Invoice OCR widget (apps/aiocr) ---------- */
.ocr-shell { display: grid; gap: 10px; }
.ocr-pane { display: grid; gap: 10px; }
.ocr-pane[hidden] { display: none; }
.ocr-dropzone {
  border: 2px dashed #3a3b45;
  border-radius: 12px;
  padding: 28px 18px;
  text-align: center;
  background: #0d0e13;
  cursor: pointer;
  display: grid;
  gap: 8px;
  justify-items: center;
  transition: border-color 120ms ease, background 120ms ease;
}
.ocr-dropzone:hover,
.ocr-dropzone:focus,
.ocr-dropzone.is-dragging {
  border-color: #ff8c42;
  background: #14151c;
  outline: none;
}
.ocr-dropzone-icon {
  font-size: 28px;
  color: #ffd8b0;
}
.ocr-dropzone-title {
  font-size: 15px;
  font-weight: 600;
  color: #f6f6f6;
}
.ocr-dropzone-sub {
  font-size: 12px;
  color: #94a3b8;
}
.ocr-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
}
.ocr-quota.muted { color: #94a3b8; }
.link-button {
  background: none;
  border: none;
  padding: 0;
  color: #ffb285;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.link-button:hover { color: #ff8c42; }

.ocr-spinner-wrap {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 24px 12px;
  border: 1px solid #2e2f38;
  border-radius: 12px;
  background: #0d0e13;
}
.ocr-spinner-icon {
  font-size: 32px;
  color: #ff8c42;
}
.ocr-spinner-title {
  font-weight: 600;
  color: #f6f6f6;
}
.ocr-spinner-sub {
  font-size: 12px;
  color: #94a3b8;
}

.ocr-review-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #2e6f4a;
  background: rgba(34, 197, 94, 0.08);
  border-radius: 10px;
  flex-wrap: wrap;
}
.ocr-review-icon {
  color: #34d399;
  font-size: 22px;
}
.ocr-review-title {
  font-weight: 600;
  color: #d1fae5;
}
.ocr-review-sub {
  font-size: 12px;
}
.ocr-review-summary .link-button { margin-left: auto; }
.ocr-notes {
  font-size: 12px;
  padding: 8px 10px;
  border: 1px solid #2e2f38;
  border-radius: 8px;
  background: #14151c;
}

.ocr-quota-pane,
.ocr-feature-off-pane {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid #6b3a18;
  background: rgba(255, 140, 66, 0.08);
  border-radius: 10px;
}
.ocr-feature-off-pane {
  border-color: #2e2f38;
  background: #14151c;
}
.ocr-quota-icon {
  color: #ffb285;
  font-size: 22px;
}
.ocr-quota-title {
  font-weight: 600;
  color: #ffd8b0;
}
.ocr-quota-sub { font-size: 12px; }

.ocr-feature-off-pane .ocr-quota-icon { color: #94a3b8; }
.ocr-feature-off-pane .ocr-quota-title { color: #e2e8f0; }

.confidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}
.confidence-badge.confident {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}
.confidence-badge.uncertain {
  background: rgba(234, 179, 8, 0.16);
  color: #fde68a;
}

.floating-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  opacity: 0;
  pointer-events: none;
  z-index: 120;
  background: #12261d;
  border: 1px solid #2e6f4a;
  color: #d1fae5;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.floating-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
