/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* -------------------------------------------------------------------------- */
/* Global enterprise look & feel                                              */
/* -------------------------------------------------------------------------- */

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

:root {
  --brand-ink: #0b1120;
  --brand-ink-soft: #1e293b;
  --brand-teal: #3b82f6;
  --brand-teal-dark: #2563eb;
  --brand-coral: #f97316;
  --brand-gold: #fbbf24;
  --brand-bg: #f7f9fc;
  --surface-glass: rgba(255, 255, 255, 0.9);
  --surface-card: #ffffff;
  --surface-card-dark: rgba(15, 23, 42, 0.75);
  --border-muted: rgba(15, 23, 42, 0.08);
  --text-muted: #6b7280;
  --shadow-soft: 0 18px 32px -20px rgba(15, 23, 42, 0.35);
  --shadow-strong: 0 28px 60px -32px rgba(15, 23, 42, 0.42);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  color-scheme: light;
}

body {
  font-family: "Inter", "Segoe UI", "SF Pro Display", "Roboto", sans-serif;
  background: linear-gradient(180deg, #ffffff 0%, var(--brand-bg) 100%);
  color: var(--brand-ink);
  min-height: 100vh;
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 12% 15%, rgba(59, 130, 246, 0.12) 0, transparent 55%),
    radial-gradient(circle at 88% 12%, rgba(94, 234, 212, 0.12) 0, transparent 48%);
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(225deg, rgba(15, 23, 42, 0.04), transparent 55%);
  z-index: -1;
}

a {
  color: var(--brand-teal-dark);
  font-weight: 500;
  transition: color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

a:hover,
a:focus {
  color: var(--brand-teal);
  text-decoration: none;
}

.navbar,
.navbar.navbar-light {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

.card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.04);
  box-shadow: 0 18px 30px -28px rgba(15, 23, 42, 0.3);
  background: #ffffff;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(15, 23, 42, 0.06);
}

.card.bg-light,
.card.bg-body-tertiary {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(8px);
}

.badge {
  border-radius: 999px;
  letter-spacing: .03em;
  font-weight: 600;
  padding: 0.46rem 0.9rem;
}

.btn {
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -12px rgba(15, 23, 42, 0.36);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-primary,
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: linear-gradient(135deg, var(--brand-teal-dark) 0%, var(--brand-teal) 100%);
  border-color: transparent;
  color: #ffffff;
}

.btn-outline-primary,
.btn-outline-secondary {
  border-width: 1.5px;
}

.btn-outline-primary {
  color: var(--brand-teal-dark);
  border-color: rgba(37, 99, 235, 0.25);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  border-color: transparent;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background: rgba(37, 99, 235, 0.08);
}

.alert {
  border-radius: var(--radius-md);
  border-width: 1px;
  border-color: rgba(15, 23, 42, 0.06);
  box-shadow: 0 16px 30px -26px rgba(15, 23, 42, 0.35);
}

.alert.alert-info {
  background: rgba(37, 99, 235, 0.08);
  color: var(--brand-ink);
}

.alert.alert-secondary {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(59, 130, 246, 0.14));
  color: var(--brand-ink);
  border-color: rgba(37, 99, 235, 0.08);
}

.alert.alert-secondary a {
  color: var(--brand-teal-dark);
}

.form-control,
.form-select {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 23, 42, 0.12);
  background-color: rgba(255, 255, 255, 0.88);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(22, 194, 194, 0.65);
  box-shadow: 0 0 0 0.25rem rgba(22, 194, 194, 0.18);
}

.table thead th {
  border-bottom: 1px solid rgba(15, 23, 42, 0.18);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.table tbody tr:hover {
  background-color: rgba(22, 194, 194, 0.05);
}

.pagination .page-item .page-link {
  border-radius: var(--radius-sm);
  border: none;
  color: var(--brand-ink);
  font-weight: 600;
}

.pagination .page-item.active .page-link {
  background-color: var(--brand-teal);
  color: #041421;
  box-shadow: 0 8px 24px -12px rgba(22, 194, 194, 0.65);
}

.badge.text-bg-warning {
  color: #705012 !important;
}

.badge.text-bg-info {
  color: #04556c !important;
}

.badge.text-bg-success {
  color: #0a4f41 !important;
}

.border-warning {
  border-color: rgba(255, 208, 115, 0.8) !important;
}

.border-warning.border-start {
  box-shadow: inset 3px 0 0 rgba(255, 208, 115, 0.7);
}

.shadow-soft {
  box-shadow: var(--shadow-soft);
}

.glass {
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

/* -------------------------------------------------------------------------- */
/* Disputs dashboard                                                          */
/* -------------------------------------------------------------------------- */

.disputs-dashboard {
  position: relative;
  padding-bottom: 4rem;
}

.disputs-dashboard .disput-header-card {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  color: var(--brand-ink);
  border: 1px solid rgba(15, 23, 42, 0.05);
  box-shadow: 0 22px 48px -32px rgba(15, 23, 42, 0.28);
}

.disputs-dashboard .disput-header-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(37, 99, 235, 0.08), rgba(59, 130, 246, 0.03) 45%, transparent 90%);
  z-index: 0;
}

.disputs-dashboard .disput-header-card .card-body {
  position: relative;
  z-index: 1;
}

.disputs-dashboard .metric-card {
  background: rgba(246, 248, 253, 0.9);
  color: var(--brand-ink);
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  min-width: 150px;
}

.disputs-dashboard .metric-card span.text-muted.small {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.disputs-dashboard .disput-header-card h1 {
  color: var(--brand-ink);
  letter-spacing: 0.01em;
}

.disputs-dashboard .disput-header-card .lead {
  color: rgba(15, 23, 42, 0.6);
}

.disputs-dashboard .metric-card span.display-6 {
  font-size: 2.4rem !important;
}

.disputs-dashboard .filter-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.05);
  box-shadow: 0 18px 30px -28px rgba(15, 23, 42, 0.25);
}

.disputs-dashboard .filter-card h5 {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.disputs-dashboard .filter-card .btn-outline-primary,
.disputs-dashboard .filter-card .btn-outline-secondary {
  border-radius: 999px;
  padding-inline: 1rem;
  padding-block: 0.45rem;
}

.disputs-dashboard .disput-card {
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.05);
  box-shadow: 0 18px 36px -30px rgba(15, 23, 42, 0.32);
}

.disputs-dashboard .disput-card.highlighted {
  border: 1px solid rgba(250, 204, 21, 0.45);
  background: linear-gradient(145deg, rgba(253, 230, 138, 0.28), rgba(255, 255, 255, 0.92));
  box-shadow: 0 20px 38px -32px rgba(250, 204, 21, 0.45);
}

.disputs-dashboard .disput-preview {
  border-radius: 18px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.08);
}

.disputs-dashboard .disput-preview img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.disputs-dashboard .activity-meta {
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.disputs-dashboard .activity-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.disputs-dashboard .activity-meta span svg,
.disputs-dashboard .activity-meta span i {
  opacity: 0.7;
}

.disputs-dashboard .badge.text-bg-warning.text-dark.ms-1 {
  background: rgba(252, 211, 77, 0.32) !important;
  color: #7c5214 !important;
  border: 1px solid rgba(252, 211, 77, 0.4);
}

.disputs-dashboard .btn-outline-primary {
  color: var(--brand-ink);
}

.disputs-dashboard .btn-outline-primary:hover {
  color: #041421;
}

.disputs-dashboard .btn-outline-primary .badge,
.disputs-dashboard .btn-primary .badge {
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-ink);
  font-size: 0.75rem;
  padding: 0.35rem 0.6rem;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.disputs-dashboard .alert-info strong,
.disputs-dashboard .alert-info span.badge {
  font-weight: 700;
}

.disputs-dashboard .alert-info span.badge {
  background: rgba(37, 99, 235, 0.12);
  color: var(--brand-ink);
  border: 1px solid rgba(37, 99, 235, 0.16);
}

.disputs-dashboard .alert-secondary .btn-outline-primary {
  border-color: rgba(37, 99, 235, 0.2);
  color: var(--brand-teal-dark);
}

.disputs-dashboard .alert-secondary .btn-outline-primary:hover {
  background: rgba(37, 99, 235, 0.08);
}

.disputs-dashboard .card-body .btn-outline-primary {
  border-color: rgba(15, 23, 42, 0.08);
}

.disputs-dashboard .card-body .btn-outline-primary:hover {
  border-color: transparent;
}

.disputs-dashboard .card-body .form-select {
  background-color: rgba(245, 248, 255, 0.86);
}

.disputs-dashboard .card-body .form-select:focus {
  background-color: rgba(255, 255, 255, 0.96);
}

@media (max-width: 992px) {
  .disputs-dashboard .btn-group {
    width: 100%;
  }

  .disputs-dashboard .btn-group .btn {
    flex: 1 1 auto;
  }

  .disputs-dashboard .card-body .d-flex.flex-column.flex-lg-row {
    align-items: flex-start !important;
  }

  .disputs-dashboard .card-body .btn-outline-primary {
    width: 100%;
  }
}

/* -------------------------------------------------------------------------- */
/* Disput show page                                                           */
/* -------------------------------------------------------------------------- */

.disput-show .card-header h5 {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.disput-show__header {
  border: 1px solid rgba(15, 23, 42, 0.05);
  background: #ffffff;
}

.disput-show__header .card-body {
  padding: 2.5rem;
}

.disput-show__pill {
  background: rgba(15, 23, 42, 0.05);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.disput-show__attachment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.disput-show__attachment {
  border-radius: 14px;
  box-shadow: 0 10px 18px -14px rgba(15, 23, 42, 0.25);
  object-fit: cover;
  height: 160px;
  width: 100%;
}

.disput-show__meta {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.35rem 1rem;
  margin-bottom: 0;
}

.disput-show__meta dt {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0;
}

.disput-show__meta dd {
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: var(--brand-ink);
}

.disput-show__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.disput-show__stat {
  background: #f7f9fc;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: flex-start;
  box-shadow: 0 16px 28px -24px rgba(15, 23, 42, 0.18);
  flex: 1 1 120px;
}

.disput-show__stat span.display-6 {
  font-size: 1.8rem !important;
  font-weight: 700;
  color: var(--brand-ink);
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.chat-message {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.chat-message__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.chat-message__bubble {
  border-radius: 16px;
  padding: 1rem 1.15rem;
  line-height: 1.55;
  box-shadow: 0 12px 26px -24px rgba(15, 23, 42, 0.35);
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--brand-ink);
}

.chat-message--outgoing .chat-message__bubble {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.22);
  align-self: flex-end;
}

.chat-message--outgoing .chat-message__meta {
  color: var(--brand-teal-dark);
}

.chat-message__attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.chat-message__attachments img {
  max-width: 180px;
  box-shadow: 0 12px 24px -20px rgba(15, 23, 42, 0.4);
}

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

  .disput-show__header .card-body {
    padding: 1.75rem;
  }

  .disput-show__stats .disput-show__stat {
    flex: 1 1 100%;
  }
}

/* -------------------------------------------------------------------------- */
/* Utility components                                                         */
/* -------------------------------------------------------------------------- */

/* Loader overlay – hidden by default, flex when visible */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-overlay.hidden {
  display: none !important;
}

/* If you rely on Bootstrap's spinner-border, you're all set; otherwise you can size it: */
.spinner-border {
  width: 3rem;
  height: 3rem;
}
