/* OG Facility — Brand Theme & Ops Console Styles (Red & White Palette) */

:root {
  --red: #c71b19;
  --red-dark: #a81513;
  --red-light: #fff1f0;
  --red-glow: rgba(199, 27, 25, 0.22);
  --red-subtle: rgba(199, 27, 25, 0.08);

  --ink: #0f172a;
  --graphite-950: #0a0d10;
  --graphite-900: #101418;
  --graphite-800: #161b21;
  --graphite-700: #1f2730;
  --graphite-600: #334155;
  --slate: #64748b;
  --muted: #94a3b8;
  --paper: #f8fafc;
  --white: #ffffff;
  --line: #e2e8f0;
  --line-subtle: #f1f5f9;
  --line-dark: rgba(255, 255, 255, 0.08);

  --green: #10b981;
  --green-light: #ecfdf5;
  --amber: #f59e0b;
  --amber-light: #fffbeb;
  --blue: #2563eb;
  --blue-light: #eff6ff;

  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "DM Mono", monospace;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 10px -2px rgba(0, 0, 0, 0.04);

  /* Console & internal UI aliases */
  --bg: var(--white);
  --bg-soft: var(--paper);
  --success: var(--green);
  --warning: var(--amber);
  --urgent: var(--red);

  --rust-500: var(--red);
  --orange-500: var(--red);
  --orange-100: var(--red-light);
  --gold-500: var(--red);

  --font-sans: var(--font);
  --font-mono: var(--mono);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--paper);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.mono-num,
.table-id,
.table-amount,
.table-date,
.stat-value {
  font-family: var(--font-mono);
  font-weight: 500;
}

/* Sidebar Layout */
.app-sidebar {
  width: 260px;
  background-color: var(--graphite-900);
  color: #FFFFFF;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  border-right: 1px solid var(--line-dark);
}

.sidebar-header {
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--line-dark);
}

.sidebar-brand {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.sidebar-logo {
  height: 38px;
  max-height: 42px;
  width: auto;
  max-width: 155px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  transition: transform .2s ease;
}

.sidebar-brand:hover .sidebar-logo {
  transform: scale(1.03);
}

.brand-tag {
  display: inline-flex;
  align-items: center;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background-color: var(--red);
  color: #FFFFFF;
  padding: 3px 7px;
  border-radius: 4px;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(199, 27, 25, 0.4);
}

.sidebar-status-banner {
  margin: 14px 16px 4px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--green);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: live-pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.status-banner-text {
  font-size: 11.5px;
  line-height: 1.3;
}

.status-banner-text strong {
  display: block;
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 600;
}

.status-banner-text span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10.5px;
}

.sidebar-nav {
  padding: 14px 0;
  flex: 1;
  overflow-y: auto;
}

.nav-section-title {
  padding: 10px 20px 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.38);
  text-transform: uppercase;
  letter-spacing: 0.9px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  margin: 2px 10px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.nav-item-icon {
  width: 17px;
  height: 17px;
  opacity: 0.7;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
}

.nav-item:hover .nav-item-icon {
  opacity: 1;
}

.nav-item.active {
  background-color: rgba(199, 27, 25, 0.16);
  color: #FFFFFF;
  font-weight: 600;
  border-left: 3px solid var(--red);
  padding-left: 15px;
}

.nav-item.active .nav-item-icon {
  opacity: 1;
  color: var(--red);
}

.nav-badge {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  background-color: var(--red);
  color: #FFFFFF;
  padding: 1px 7px;
  border-radius: 12px;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--line-dark);
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12.5px;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.45);
}

.user-ext-link {
  color: rgba(255, 255, 255, 0.4);
  padding: 5px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  transition: all 0.15s ease;
}

.user-ext-link:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

/* Main Content Area */
.app-main {
  margin-left: 260px;
  flex: 1;
  padding: 32px 40px 60px;
  background-color: var(--paper);
  min-height: 100vh;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.header-pretitle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--slate);
  margin-bottom: 6px;
}

.brand-crumb {
  color: var(--red);
  font-weight: 800;
}

.crumb-sep {
  opacity: 0.4;
}

.page-title {
  font-size: 26px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 13.5px;
  color: var(--slate);
}

.header-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.system-time-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--slate);
  box-shadow: var(--shadow-sm);
}

.btn-action-primary,
.btn-action-red {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: #FFFFFF;
  padding: 9px 18px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  border: none;
  box-shadow: 0 2px 8px var(--red-glow);
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-action-primary:hover,
.btn-action-red:hover {
  background: linear-gradient(135deg, #b51715 0%, #941210 100%);
  color: #FFFFFF;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(199, 27, 25, 0.4);
}

.btn-action-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--white);
  color: var(--ink);
  padding: 9px 15px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
  cursor: pointer;
}

.btn-action-secondary:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--ink);
  text-decoration: none;
}

/* Stat Tiles & Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-tile {
  background-color: var(--white);
  border: 1px solid var(--line);
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stat-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.stat-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon-wrapper.icon-red {
  background: var(--red-subtle);
  color: var(--red);
}

.stat-icon-wrapper.icon-amber {
  background: var(--amber-light);
  color: var(--amber);
}

.stat-icon-wrapper.icon-green {
  background: var(--green-light);
  color: var(--green);
}

.stat-icon-wrapper.icon-blue {
  background: var(--blue-light);
  color: var(--blue);
}

.stat-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
}

.badge-subtle-red {
  background: var(--red-light);
  color: var(--red);
}

.badge-subtle-amber {
  background: var(--amber-light);
  color: #b45309;
}

.badge-subtle-green {
  background: var(--green-light);
  color: #047857;
}

.badge-subtle-slate {
  background: #f1f5f9;
  color: var(--slate);
}

.stat-value {
  font-size: 30px;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 6px;
}

.stat-subtext {
  font-size: 12px;
  color: var(--slate);
  font-weight: 500;
}

/* Lifecycle Pipeline Flow Banner */
.pipeline-banner {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.pipeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.pipeline-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pipeline-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.pipeline-step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.15s ease;
}

.pipeline-step:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.step-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--slate);
  font-weight: 600;
}

.step-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.step-count {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--ink);
}

.step-count.has-count {
  color: var(--red);
}

/* Content Panels / Cards */
.panel {
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.panel-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--white);
}

.panel-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: #f1f5f9;
  color: var(--slate);
}

.panel-body {
  padding: 0;
}

/* Tables */
.ops-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.ops-table th {
  background-color: #f8fafc;
  color: #475569;
  font-weight: 700;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.ops-table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-subtle);
  color: var(--ink);
  vertical-align: middle;
}

.ops-table tr:hover td {
  background-color: #fafbfc;
}

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

.ops-table a {
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
}

.ops-table a:hover {
  text-decoration: underline;
  color: var(--red-dark);
}

/* Status Indicators and Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot.dot-logged,
.status-dot.dot-new,
.status-dot.dot-open {
  background-color: var(--blue);
}

.status-dot.dot-draft {
  background-color: var(--slate);
}

.status-dot.dot-assessing,
.status-dot.dot-investigating {
  background-color: #8b5cf6;
}

.status-dot.dot-sent,
.status-dot.dot-quoted {
  background-color: #06b6d4;
}

.status-dot.dot-scheduled {
  background-color: #6366f1;
}

.status-dot.dot-in_progress {
  background-color: var(--amber);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

.status-dot.dot-approved,
.status-dot.dot-completed,
.status-dot.dot-resolved,
.status-dot.dot-paid,
.status-dot.dot-preferred,
.status-dot.dot-active {
  background-color: var(--green);
}

.status-dot.dot-partial,
.status-dot.dot-backup_only {
  background-color: var(--amber);
}

.status-dot.dot-standard {
  background-color: var(--slate);
}

.status-dot.dot-unpaid,
.status-dot.dot-urgent,
.status-dot.dot-emergency,
.status-dot.dot-rejected,
.status-dot.dot-cancelled,
.status-dot.dot-inactive,
.status-dot.dot-closed {
  background-color: var(--red);
}

/* Empty States */
.empty-state-box {
  padding: 40px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate);
  margin-bottom: 12px;
}

.empty-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.empty-desc {
  font-size: 12.5px;
  color: var(--slate);
  max-width: 320px;
  margin-bottom: 14px;
  line-height: 1.4;
}

.empty-row {
  padding: 30px 20px;
  color: var(--slate);
  text-align: center;
  font-size: 13px;
}

/* Operations Shortcuts Hub */
.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.shortcut-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.shortcut-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.shortcut-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--red-subtle);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.shortcut-content {
  flex: 1;
}

.shortcut-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  display: block;
  line-height: 1.3;
}

.shortcut-sub {
  font-size: 11.5px;
  color: var(--slate);
}

/* Status Stepper */
.stepper-panel {
  background-color: #FFFFFF;
  border: 1px solid var(--line);
  padding: 24px 28px;
  margin-bottom: 28px;
  border-radius: 8px;
  border-left: 3px solid var(--red);
}

.stepper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  position: relative;
}

.stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  text-align: center;
}

.stepper-step-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.stepper-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  z-index: 2;
  background-color: #FFFFFF;
  border: 2px solid var(--line);
  color: var(--slate);
  transition: all 0.2s ease;
}

.stepper-step.completed .stepper-circle {
  background-color: var(--red);
  border-color: var(--red);
  color: #FFFFFF;
}

.stepper-step.current .stepper-circle {
  background-color: #FFFFFF;
  border-color: var(--red);
  border-width: 3px;
  color: var(--red);
  box-shadow: 0 0 0 3px rgba(223, 62, 50, 0.2);
}

.stepper-step.upcoming .stepper-circle {
  background-color: #FFFFFF;
  border-color: var(--line);
  color: var(--slate);
}

.stepper-step.cancelled .stepper-circle {
  background-color: #FFFFFF;
  border-color: var(--red-dark);
  border-width: 3px;
  color: var(--red-dark);
}

.stepper-connector {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 2px;
  background-color: var(--line);
  z-index: 1;
  transform: translateY(-50%);
}

.stepper-connector.connector-active {
  background-color: var(--red);
}

.stepper-label {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--slate);
  max-width: 110px;
  line-height: 1.3;
}

.stepper-step.completed .stepper-label {
  color: var(--graphite-900);
  font-weight: 600;
}

.stepper-step.current .stepper-label {
  color: var(--red);
  font-weight: 600;
}

.stepper-step.cancelled .stepper-label {
  color: var(--red-dark);
  font-weight: 600;
}

/* Key Info Grid */
.info-card {
  background-color: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 28px;
  border-left: 3px solid var(--graphite-700);
}

.info-card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  color: var(--graphite-900);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding: 20px;
}

.info-item {
  display: flex;
  flex-direction: column;
}

.info-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.info-value {
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 500;
}

.info-full {
  grid-column: 1 / -1;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.info-full .info-value {
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--ink);
}

/* Collapsible Details Sections */
details.panel-collapsible {
  background-color: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 20px;
  overflow: hidden;
}

details.panel-collapsible summary.panel-summary {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--graphite-900);
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  background-color: #FFFFFF;
  transition: background-color 0.15s ease;
}

details.panel-collapsible summary.panel-summary:hover {
  background-color: #f5f3ee;
}

details.panel-collapsible summary.panel-summary::-webkit-details-marker {
  display: none;
}

details.panel-collapsible[open] summary.panel-summary {
  border-bottom: 1px solid var(--line);
}

.summary-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.summary-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--slate);
}

.toggle-icon {
  font-size: 12px;
  color: var(--slate);
  transition: transform 0.2s ease;
}

details.panel-collapsible[open] .toggle-icon {
  transform: rotate(90deg);
}

.collapsible-body {
  padding: 20px;
}

.collapsible-body.no-padding {
  padding: 0;
}

/* Photo Evidence Grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.photo-card {
  border: 1px solid var(--line);
  background: #FFFFFF;
  padding: 10px;
  border-radius: 6px;
}

.photo-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.photo-card-info {
  margin-top: 8px;
  font-size: 12px;
}

.photo-badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 4px;
  margin-bottom: 4px;
}

.photo-badge.before {
  background-color: var(--graphite-700);
  color: #FFFFFF;
}

.photo-badge.after {
  background-color: var(--success);
  color: #FFFFFF;
}

.badge-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-tag.tag-open {
  background-color: var(--graphite-700);
  color: #FFFFFF;
}

.badge-tag.tag-resolved {
  background-color: var(--success);
  color: #FFFFFF;
}

.badge-tag.tag-investigating {
  background-color: var(--warning);
  color: #FFFFFF;
}

.badge-tag.tag-closed {
  background-color: var(--slate);
  color: #FFFFFF;
}

/* ==========================================================================
   Form Styles (Team Portal)
   ========================================================================== */

.form-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.form-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}

.form-card-subtitle {
  font-size: 13px;
  color: var(--slate);
}

.form-card-body {
  padding: 28px 24px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 24px;
}

.form-col-full {
  grid-column: 1 / -1;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-label-req {
  color: var(--red);
  font-weight: 700;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  background-color: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #a3a69e;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371736d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(223, 62, 50, 0.12);
}

.form-hint {
  font-size: 12px;
  color: var(--slate);
  margin-top: 5px;
  line-height: 1.4;
}

.form-error {
  font-size: 12.5px;
  color: var(--red-dark);
  margin-top: 5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #FFFFFF;
  color: var(--ink);
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid var(--line);
  transition: background-color 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: var(--paper);
  border-color: #ccc9be;
  color: var(--ink);
  text-decoration: none;
}

@media (max-width: 768px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

