/* =========================================================================
   DMAS Consultants — Aesthetic Light Portal Theme
   Brand:  #a5092c (Crimson)  &  #be1722 (Vermilion)
   Layered on top of volt.css to give the portal a premium, modern feel.
   ========================================================================= */

:root {
  /* Brand palette */
  --brand-900: #6e0119;
  --brand-800: #8a0623;
  --brand-700: #a5092c;   /* primary */
  --brand-600: #be1722;   /* secondary */
  --brand-500: #d8323d;
  --brand-400: #ec5b62;
  --brand-300: #f48a8f;
  --brand-200: #fbc2c5;
  --brand-100: #fde4e6;
  --brand-50:  #fff3f4;

  --brand-gradient: linear-gradient(135deg, #a5092c 0%, #be1722 55%, #d8323d 100%);
  --brand-gradient-soft: linear-gradient(135deg, #fff5f6 0%, #ffe6e8 100%);
  --brand-gradient-hero: linear-gradient(135deg, #6e0119 0%, #a5092c 45%, #be1722 100%);

  /* Neutrals */
  --ink-900: #1a1c20;
  --ink-700: #383b42;
  --ink-500: #6b7280;
  --ink-400: #9097a3;
  --ink-300: #c2c7d0;
  --ink-200: #e6e8ed;
  --ink-100: #f1f3f7;
  --ink-50:  #f7f9fc;

  --surface: #ffffff;
  --surface-soft: #fbfbfd;
  --surface-tint: #fdf7f8;

  /* Status */
  --success: #16a34a;
  --warning: #f59e0b;
  --danger:  #dc2626;
  --info:    #2563eb;

  /* Effects */
  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-xs: 0 1px 2px rgba(20, 22, 28, 0.04);
  --shadow-sm: 0 4px 12px rgba(20, 22, 28, 0.06);
  --shadow:    0 10px 30px rgba(20, 22, 28, 0.07);
  --shadow-lg: 0 20px 50px rgba(165, 9, 44, 0.12);
  --shadow-brand: 0 14px 30px rgba(190, 23, 34, 0.28);

  --ring-brand: 0 0 0 4px rgba(190, 23, 34, 0.15);

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* =========================================================================
   Base typography & background
   ========================================================================= */
html, body {
  background: var(--ink-50) !important;
  color: var(--ink-900);
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}

body {
  background-image:
    radial-gradient(1200px 600px at -10% -10%, rgba(190,23,34,0.06), transparent 60%),
    radial-gradient(900px 500px at 110% 0%, rgba(165,9,44,0.05), transparent 60%);
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--ink-900);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.text-gray-900 { color: var(--ink-900) !important; }
.text-gray-800 { color: var(--ink-700) !important; }
.text-gray-700 { color: var(--ink-700) !important; }
.text-gray-600 { color: var(--ink-500) !important; }
.text-gray-500 { color: var(--ink-500) !important; }
.text-gray-400 { color: var(--ink-400) !important; }
.text-gray      { color: var(--ink-500) !important; }
.text-primary   { color: var(--brand-700) !important; }
.text-danger    { color: var(--brand-600) !important; }

::selection {
  background: rgba(190,23,34,0.18);
  color: var(--brand-900);
}

/* =========================================================================
   App layout shell — main content & background
   ========================================================================= */
main.content {
  background: transparent !important;
  padding: 0 1.75rem 2.5rem 1.75rem;
}

@media (min-width: 992px) {
  main.content { padding-left: 2.25rem; padding-right: 2.25rem; }
}

/* =========================================================================
   Sidebar — light, premium, brand-accent
   ========================================================================= */
.sidebar.bg-gray-800 {
  background: var(--surface) !important;
  color: var(--ink-700) !important;
  border-right: 1px solid var(--ink-200);
  box-shadow: 0 0 0 1px rgba(20,22,28,0.02), 8px 0 30px rgba(20,22,28,0.04);
}

.sidebar .sidebar-inner {
  padding-top: 1.25rem !important;
}

/* Brand block at top of sidebar (logo container) */
.sidebar .sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 76px;
  margin: 0.25rem 0.5rem 1rem 0.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--ink-200);
  box-shadow: var(--shadow-xs);
  padding: 0.75rem;
}

.sidebar .sidebar-brand img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.sidebar .nav-item {
  margin: 2px 6px;
}

.sidebar .nav-link {
  color: var(--ink-700) !important;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.7rem 0.9rem !important;
  border-radius: 12px;
  transition: all .25s var(--ease);
  position: relative;
}

.sidebar .nav-item > .nav-link:hover,
.sidebar .nav-item > .nav-link:focus,
.sidebar .nav-item > .nav-link:focus-visible,
.sidebar.bg-gray-800 .nav-item > .nav-link:hover,
.sidebar.bg-gray-800 .nav-item > .nav-link:focus {
  background: var(--brand-50) !important;
  background-color: var(--brand-50) !important;
  color: var(--brand-700) !important;
  transform: translateX(2px);
  box-shadow: none !important;
}

.sidebar .nav-link svg,
.sidebar .nav-link .sidebar-icon svg {
  color: var(--ink-400);
  transition: color .25s var(--ease), transform .25s var(--ease);
}

.sidebar .nav-item > .nav-link:hover svg,
.sidebar .nav-item > .nav-link:focus svg {
  color: var(--brand-700) !important;
}

.sidebar .nav-item.active > .nav-link,
.sidebar .nav-link.active {
  background: var(--brand-gradient) !important;
  color: #fff !important;
  box-shadow: var(--shadow-brand);
  transform: translateX(0);
}

.sidebar .nav-item.active > .nav-link svg,
.sidebar .nav-link.active svg {
  color: #fff !important;
}

.sidebar .nav-item.active > .nav-link::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 22%;
  bottom: 22%;
  width: 4px;
  border-radius: 4px;
  background: var(--brand-700);
}

.sidebar .sidebar-text {
  font-weight: 500;
  letter-spacing: 0.005em;
}

.sidebar .user-card h2,
.sidebar .user-card h5 {
  color: var(--ink-900);
}

/* Mobile sidebar header */
.navbar-theme-primary {
  background: var(--brand-gradient) !important;
}

/* =========================================================================
   Topbar
   ========================================================================= */
.navbar-dashboard {
  background: rgba(255,255,255,0.75) !important;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  margin: 1.25rem 0 1.25rem 0;
  padding: 0.65rem 1.1rem !important;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 1040;
}

.navbar-dashboard .dropdown-menu {
  z-index: 1080;
}

.navbar-dashboard .topbar-brand {
  display: inline-flex;
  align-items: center;
  height: 44px;
}

.navbar-dashboard .topbar-brand img {
  height: 100%;
  width: auto;
  display: block;
  object-fit: contain;
}

.navbar-dashboard .nav-link {
  color: var(--ink-900) !important;
}

.navbar-dashboard .media-body span {
  color: var(--ink-900) !important;
  font-weight: 600 !important;
}

.dashboard-dropdown {
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.5rem !important;
  min-width: 220px;
}

.dashboard-dropdown .dropdown-item {
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font-weight: 500;
  color: var(--ink-700);
  transition: background .2s var(--ease), color .2s var(--ease);
}

.dashboard-dropdown .dropdown-item:hover {
  background: var(--brand-50);
  color: var(--brand-700);
}

.dashboard-dropdown .dropdown-item:hover svg {
  color: var(--brand-700) !important;
}

/* =========================================================================
   Cards — soft, modern, with subtle gradient borders
   ========================================================================= */
.card {
  background: var(--surface) !important;
  border: 1px solid var(--ink-200) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: transform .25s var(--ease), box-shadow .3s var(--ease);
}

.card.shadow,
.card.shadow-sm,
.card.shadow-lg {
  box-shadow: var(--shadow-sm) !important;
}

.card:hover {
  box-shadow: var(--shadow) !important;
}

.card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--ink-200) !important;
  padding: 1.15rem 1.35rem !important;
}

.card-body {
  padding: 1.35rem !important;
}

.card-footer {
  background: transparent !important;
  border-top: 1px solid var(--ink-200) !important;
}

/* Stat cards (dashboard top row) */
.card .icon-shape {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px !important;
  background: var(--brand-gradient) !important;
  color: #fff !important;
  box-shadow: var(--shadow-brand);
  position: relative;
  overflow: hidden;
}

.card .icon-shape svg {
  color: #fff !important;
  width: 26px;
  height: 26px;
  position: relative;
  z-index: 1;
}

.card .icon-shape::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0));
}

/* Themed stat-card variants applied via data-theme="..." on .card */
.card[data-theme="amber"] .icon-shape { background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%) !important; box-shadow: 0 14px 30px rgba(245,158,11,0.28); }
.card[data-theme="emerald"] .icon-shape { background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important; box-shadow: 0 14px 30px rgba(16,185,129,0.28); }
.card[data-theme="indigo"]  .icon-shape { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important; box-shadow: 0 14px 30px rgba(99,102,241,0.28); }

.card .fw-extrabold {
  color: var(--ink-900);
  font-weight: 800 !important;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.card .h6.text-gray-400 {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem !important;
  color: var(--ink-400) !important;
  font-weight: 600;
}

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.005em;
  padding: 0.55rem 1.05rem;
  transition: transform .15s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}

.btn:focus,
.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring-brand);
}

.btn-primary,
.btn-gray-800 {
  background: var(--brand-gradient) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: var(--shadow-brand);
}

.btn-primary:hover,
.btn-gray-800:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(190,23,34,0.32);
  color: #fff !important;
}

.btn-secondary {
  background: var(--surface) !important;
  border: 1px solid var(--ink-200) !important;
  color: var(--ink-900) !important;
}

.btn-secondary:hover {
  background: var(--ink-100) !important;
  color: var(--brand-700) !important;
  border-color: var(--ink-300) !important;
}

.btn-outline-primary {
  border: 1px solid var(--brand-700) !important;
  color: var(--brand-700) !important;
  background: transparent !important;
}

.btn-outline-primary:hover {
  background: var(--brand-700) !important;
  color: #fff !important;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
}

/* =========================================================================
   Tables
   ========================================================================= */
.table {
  color: var(--ink-700);
}

.table thead.thead-light th,
.table thead th {
  background: var(--ink-50) !important;
  color: var(--ink-500) !important;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  border-bottom: 1px solid var(--ink-200) !important;
  padding: 0.85rem 1.1rem;
}

.table tbody td {
  padding: 0.95rem 1.1rem;
  border-top: 1px solid var(--ink-100);
  vertical-align: middle;
  color: var(--ink-700);
}

.table tbody tr {
  transition: background .2s var(--ease);
}

.table tbody tr:hover {
  background: var(--brand-50);
}

.table-flush tbody tr:first-child td {
  border-top: 0;
}

/* =========================================================================
   Forms
   ========================================================================= */
.form-control,
.form-select,
textarea.form-control {
  background: var(--surface) !important;
  border: 1px solid var(--ink-200) !important;
  color: var(--ink-900) !important;
  border-radius: 12px !important;
  padding: 0.65rem 0.9rem !important;
  font-size: 0.95rem !important;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--brand-500) !important;
  box-shadow: var(--ring-brand) !important;
  background: var(--surface) !important;
}

.form-control::placeholder { color: var(--ink-400); }

label, .form-label {
  font-weight: 600;
  color: var(--ink-700);
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.input-group .input-group-text {
  background: var(--surface) !important;
  border: 1px solid var(--ink-200) !important;
  border-right: none !important;
  border-radius: 12px 0 0 12px !important;
  color: var(--brand-700) !important;
}

.input-group > .form-control {
  border-radius: 0 12px 12px 0 !important;
  border-left: none !important;
}

.invalid-input {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.12) !important;
}

/* Choices.js */
.choices__inner {
  background: var(--surface) !important;
  border: 1px solid var(--ink-200) !important;
  border-radius: 12px !important;
  min-height: 44px !important;
  padding: 0.45rem 0.75rem !important;
}

/* =========================================================================
   Badges & status pills
   ========================================================================= */
.badge,
.bg-secondary {
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.35em 0.7em;
}

.bg-primary,
.badge.bg-primary {
  background: var(--brand-gradient) !important;
  color: #fff !important;
}

/* =========================================================================
   Alerts
   ========================================================================= */
.alert {
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 0.85rem 1rem;
  font-weight: 500;
}

.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.alert-danger {
  background: var(--brand-50);
  color: var(--brand-900);
  border-color: var(--brand-200);
}

/* =========================================================================
   Pagination
   ========================================================================= */
.pagination .page-link {
  border-radius: 10px !important;
  margin: 0 2px;
  border: 1px solid var(--ink-200);
  color: var(--ink-700);
  font-weight: 600;
  transition: all .2s var(--ease);
}

.pagination .page-link:hover {
  background: var(--brand-50);
  color: var(--brand-700);
  border-color: var(--brand-200);
}

.pagination .page-item.active .page-link {
  background: var(--brand-gradient);
  border: none;
  color: #fff;
  box-shadow: var(--shadow-brand);
}

/* =========================================================================
   Dropdowns
   ========================================================================= */
.dropdown-menu {
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.4rem;
  z-index: 1060;
}

.dropdown-item {
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  color: var(--ink-700);
}

.dropdown-item:hover {
  background: var(--brand-50);
  color: var(--brand-700);
}

.dropdown-divider {
  border-top: 1px solid var(--ink-200);
  margin: 0.35rem 0;
}

/* =========================================================================
   Modals
   ========================================================================= */
.modal-content {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(20,22,28,0.18);
  overflow: hidden;
}

.modal-header {
  border-bottom: 1px solid var(--ink-200);
  padding: 1.25rem 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--ink-200);
  padding: 1rem 1.5rem;
}

/* =========================================================================
   Authentication pages — pure white canvas, minimal brand accent on card
   ========================================================================= */
.bg-soft,
section.bg-soft {
  background: #ffffff !important;
  background-image: none !important;
  position: relative;
  overflow: hidden;
}

section.bg-soft::before,
section.bg-soft::after {
  content: none !important;
}

/* Auth card */
section.bg-soft .bg-white.shadow-soft {
  background: #ffffff !important;
  border: 1px solid var(--ink-200) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 24px 50px rgba(20, 22, 28, 0.08),
    0 8px 16px rgba(20, 22, 28, 0.04) !important;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

/* Slim brand gradient bar across top of card */
section.bg-soft .bg-white.shadow-soft::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--brand-gradient);
}

section.bg-soft .bg-white.shadow-soft h1 {
  color: var(--ink-900);
  font-weight: 800;
  letter-spacing: -0.025em;
}

/* =========================================================================
   Scrollbars (light, branded)
   ========================================================================= */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand-200), var(--brand-300));
  border-radius: 999px;
  border: 2px solid var(--ink-50);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--brand-500), var(--brand-700));
}

/* SimpleBar (sidebar) */
.simplebar-scrollbar::before {
  background: var(--brand-300) !important;
}

/* =========================================================================
   SweetAlert2 polish
   ========================================================================= */
.swal2-popup {
  border-radius: var(--radius-lg) !important;
  font-family: inherit !important;
}

.swal2-styled.swal2-confirm {
  background: var(--brand-gradient) !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  box-shadow: var(--shadow-brand) !important;
}

.swal2-styled.swal2-cancel {
  background: var(--ink-100) !important;
  color: var(--ink-700) !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
}

/* =========================================================================
   Notyf
   ========================================================================= */
.notyf__toast {
  border-radius: var(--radius) !important;
  font-family: inherit !important;
  box-shadow: var(--shadow) !important;
}

.notyf__toast--success { background: linear-gradient(135deg, #10b981, #059669) !important; }
.notyf__toast--error   { background: var(--brand-gradient) !important; }

/* =========================================================================
   Utility: pretty link styles
   ========================================================================= */
a {
  color: var(--brand-700);
  text-decoration: none;
  transition: color .2s var(--ease);
}

a:hover {
  color: var(--brand-600);
}

/* =========================================================================
   Loading overlay polish
   ========================================================================= */
#loading.loading {
  background: rgba(20, 22, 28, 0.35) !important;
  backdrop-filter: blur(2px);
  border-radius: var(--radius-lg);
}

#loading.loading::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 56px; height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  animation: dmas-spin 0.9s linear infinite;
}

@keyframes dmas-spin {
  to { transform: rotate(360deg); }
}

/* =========================================================================
   Small motion / reveal
   ========================================================================= */
.card,
.btn,
.dropdown-menu {
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* =========================================================================
   Logout component (used inside dropdown — acts as a dropdown-item itself)
   ========================================================================= */
.dmas-logout {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  font-weight: 500;
  color: var(--brand-700);
  width: 100%;
  user-select: none;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  transition: background .2s var(--ease), color .2s var(--ease);
}

.dmas-logout:hover {
  background: var(--brand-50);
  color: var(--brand-800);
}

.dmas-logout svg {
  color: var(--brand-700);
}

/* Header layout helpers */
.page-header-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink-900);
}

.page-header-sub {
  color: var(--ink-500);
  font-size: 0.92rem;
}

/* Improve readability of small chart wrapper */
canvas { max-width: 100%; }

/* =========================================================================
   Breadcrumb
   ========================================================================= */
.breadcrumb {
  background: transparent !important;
  padding: 0 !important;
  margin-bottom: 0.5rem;
  font-size: .82rem;
}

.breadcrumb .breadcrumb-item,
.breadcrumb .breadcrumb-item a {
  color: var(--ink-500);
  font-weight: 500;
  text-decoration: none;
}

.breadcrumb .breadcrumb-item a:hover {
  color: var(--brand-700);
}

.breadcrumb .breadcrumb-item.active {
  color: var(--brand-700);
  font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--ink-300) !important;
  content: '›' !important;
  font-weight: 700;
}

/* =========================================================================
   Accordion (folders)
   ========================================================================= */
.accordion {
  --bs-accordion-border-color: var(--ink-200);
  --bs-accordion-border-radius: var(--radius);
  --bs-accordion-inner-border-radius: var(--radius);
  --bs-accordion-btn-bg: var(--surface);
  --bs-accordion-active-bg: var(--brand-50);
  --bs-accordion-active-color: var(--brand-700);
  --bs-accordion-btn-focus-box-shadow: var(--ring-brand);
}

.accordion-item {
  background: var(--surface) !important;
  border: 1px solid var(--ink-200) !important;
  border-radius: var(--radius) !important;
  margin-bottom: 0.85rem;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: box-shadow .25s var(--ease);
}

.accordion-item:hover {
  box-shadow: var(--shadow-sm);
}

.accordion-button {
  background: var(--surface) !important;
  color: var(--ink-900) !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  padding: 1rem 1.15rem !important;
  border-radius: var(--radius) !important;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transition: background .2s var(--ease), color .2s var(--ease);
}

.accordion-button:not(.collapsed) {
  background: var(--brand-50) !important;
  color: var(--brand-800) !important;
  box-shadow: inset 0 -1px 0 var(--brand-100);
}

.accordion-button::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 10px;
  background: var(--brand-50) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23a5092c' stroke-width='1.8' viewBox='0 0 24 24'><path stroke-linecap='round' stroke-linejoin='round' d='M3 7a2 2 0 012-2h4l2 2h8a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2V7z'/></svg>") center/18px 18px no-repeat;
  transition: background-color .2s var(--ease);
}

.accordion-button:not(.collapsed)::before {
  background-color: #fff;
}

.accordion-button::after {
  content: '' !important;
  font: 0/0 a !important;
  color: transparent !important;
  text-shadow: none !important;
  background: none !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%236b7280' stroke-width='2' viewBox='0 0 24 24'><path stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 16px 16px !important;
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0;
  margin-left: auto;
  transform: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

.accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23a5092c' stroke-width='2' viewBox='0 0 24 24'><path stroke-linecap='round' stroke-linejoin='round' d='M18 15l-6-6-6 6'/></svg>") !important;
  transform: none !important;
}

.accordion-body {
  padding: 1.15rem 1.15rem 1.25rem 1.15rem !important;
  background: var(--surface);
}

/* Inline folder action chips inside accordion header */
.folder-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: .72rem;
  font-weight: 600;
  border-radius: 999px;
  margin-left: 8px;
  cursor: pointer;
  transition: all .2s var(--ease);
  background: transparent;
  border: 1px solid transparent;
  user-select: none;
}

.folder-action.edit {
  color: var(--info);
  border-color: rgba(37,99,235,0.25);
  background: rgba(37,99,235,0.06);
}

.folder-action.edit:hover {
  background: rgba(37,99,235,0.12);
}

.folder-action.delete {
  color: var(--brand-700);
  border-color: var(--brand-200);
  background: var(--brand-50);
}

.folder-action.delete:hover {
  background: var(--brand-100);
}

/* =========================================================================
   File rows
   ========================================================================= */
.file-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--ink-200);
  border-radius: 12px;
  background: var(--surface);
  margin-bottom: 0.55rem;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease), border-color .2s var(--ease);
}

.file-row:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: var(--brand-200);
}

.file-row .file-icon {
  width: 40px; height: 40px;
  flex: 0 0 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: .68rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.file-icon.pdf  { background: linear-gradient(135deg,#a5092c,#be1722); }
.file-icon.doc  { background: linear-gradient(135deg,#1e40af,#3b82f6); }
.file-icon.xls  { background: linear-gradient(135deg,#047857,#10b981); }
.file-icon.gen  { background: linear-gradient(135deg,#475569,#64748b); }

.file-row .file-info {
  flex: 1 1 auto;
  min-width: 0;
}

.file-row .file-name {
  display: block;
  color: var(--ink-900);
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .2s var(--ease);
}

.file-row .file-name:hover {
  color: var(--brand-700);
}

.file-row .file-meta {
  font-size: .76rem;
  color: var(--ink-500);
  margin-top: 2px;
}

.file-row .file-meta strong {
  color: var(--ink-700);
  font-weight: 600;
}

.file-row .file-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--ink-200);
  background: var(--surface);
  color: var(--ink-500);
  cursor: pointer;
  transition: all .2s var(--ease);
}

.icon-btn:hover {
  color: var(--brand-700);
  border-color: var(--brand-200);
  background: var(--brand-50);
}

.icon-btn.danger:hover {
  color: #fff;
  background: var(--brand-700);
  border-color: var(--brand-700);
}

.empty-state {
  padding: 2.25rem 1rem;
  text-align: center;
  color: var(--ink-500);
  border: 1.5px dashed var(--ink-200);
  border-radius: 14px;
  background: var(--ink-50);
}

.empty-state .empty-icon {
  width: 56px; height: 56px;
  margin: 0 auto 12px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--ink-200);
  color: var(--brand-700);
}

/* =========================================================================
   Modal polish (upload, add folder)
   ========================================================================= */
.modal-content .card {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
}

.modal-body .btn-close {
  background-color: var(--ink-100);
  border-radius: 50% !important;
  padding: 0.5rem;
  opacity: 1;
  transition: background .2s var(--ease);
}

.modal-body .btn-close:hover {
  background-color: var(--brand-100);
}

/* Beautified file input as dropzone */
.dropzone-wrap {
  position: relative;
  border: 2px dashed var(--ink-200);
  border-radius: 14px;
  padding: 1.5rem 1rem;
  text-align: center;
  background: var(--ink-50);
  transition: all .2s var(--ease);
}

.dropzone-wrap:hover,
.dropzone-wrap.is-dragover {
  border-color: var(--brand-500);
  background: var(--brand-50);
}

.dropzone-wrap input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: 0 !important;
  padding: 0 !important;
}

.dropzone-icon {
  width: 56px; height: 56px;
  margin: 0 auto 0.5rem;
  border-radius: 16px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-700);
  border: 1px solid var(--ink-200);
}

.dropzone-title { font-weight: 700; color: var(--ink-900); }
.dropzone-hint  { font-size: .82rem; color: var(--ink-500); }

/* Outline gray button used in the page (Add Folder) */
.btn-outline-gray-600 {
  background: var(--surface) !important;
  color: var(--ink-900) !important;
  border: 1px solid var(--ink-200) !important;
}

.btn-outline-gray-600:hover {
  border-color: var(--brand-200) !important;
  color: var(--brand-700) !important;
  background: var(--brand-50) !important;
}

/* Page header card (used on client-file page) */
.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 0;
  width: 4px;
  background: var(--brand-gradient);
}

.page-hero .hero-id-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
