/* =====================================================================
   UNI1 GLOBAL THEME  |  cream + burgundy + gold
   Load this AFTER assets/css/style.css and after any inline <style> in the layout.
   All colours live in the variables below: change them here and everything follows.
   ===================================================================== */
:root {
  --cream:        #fdf8f1;
  --cream-2:      #f8efe3;
  --surface:      #ffffff;
  --burgundy:     #6b1230;
  --burgundy-2:   #8a1d45;
  --burgundy-deep:#4a0d24;
  --gold:         #c9983a;
  --gold-deep:    #8a5a14;
  --gold-soft:    #f6e3b8;
  --sand:         #ecd2a0;
  --text:         #3a1a24;
  --muted:        #85737a;
  --line:         #eadfd0;
  --ok:           #1c7a3f;
  --ok-soft:      #e4f5ea;
  --radius:       20px;
  --radius-sm:    14px;
  --shadow:       0 10px 30px rgba(107, 18, 48, .08);
  --shadow-lg:    0 18px 40px rgba(107, 18, 48, .16);
  --font: "Inter", "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", "Noto Sans SC", "Noto Sans TC", "Noto Sans Thai", sans-serif;
}

/* ---------- base ---------- */
body, .container-scroller, .page-body-wrapper, .main-panel {
  background: var(--cream);
  color: var(--text);
  font-family: var(--font);
}

.content-wrapper {
  background:
    radial-gradient(900px 480px at 92% -8%, rgba(246, 205, 125, .45), transparent 62%),
    radial-gradient(700px 420px at -8% 12%, rgba(107, 18, 48, .07), transparent 60%),
    var(--cream);
  padding: 1.75rem;
}

a { color: var(--burgundy); }
a:hover { color: var(--burgundy-2); }

/* headings / text inside pages */
.content-wrapper h1, .content-wrapper h2, .content-wrapper h3,
.content-wrapper h4, .content-wrapper h5, .content-wrapper h6,
.content-wrapper .card-title, .content-wrapper .card-description,
.content-wrapper label, .content-wrapper .form-group label {
  color: var(--text) !important;
}
.text-muted,
.preview-list .preview-item .preview-item-content p .content-category { color: var(--muted) !important; }

/* safety net: pages that hard-code white text inline (written for the old dark theme)
   stay readable on light cards. Dark panels opt out with the .on-dark class. */
.content-wrapper :is([style*="color:white"], [style*="color: white"], [style*="color:#fff"], [style*="color: #fff"], [style*="color:#FFF"], [style*="color: #FFF"]):not(.on-dark *) {
  color: var(--text) !important;
}

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
}

/* ---------- top navbar ---------- */
.navbar {
  background: rgba(253, 248, 241, .88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}
.navbar .navbar-menu-wrapper, .navbar .navbar-brand-wrapper { background: transparent; }
.navbar .navbar-menu-wrapper .navbar-nav .nav-item .nav-link i,
.navbar .navbar-nav .nav-link i { color: var(--burgundy) !important; }
.mdi-format-line-spacing::before { color: var(--burgundy) !important; }

#notificationDropdown {
  background: #fff !important;
  color: var(--burgundy) !important;
  border: 1px solid var(--line);
  border-radius: 999px !important;
  font-weight: 600;
}
.dropdown-menu.navbar-dropdown {
  background: #fff !important;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}
.dropdown-menu.navbar-dropdown a { color: var(--text) !important; }

/* ---------- sidebar ---------- */
.sidebar,
.sidebar .sidebar-brand-wrapper {
  background: #fffaf3;
  border-right: 1px solid var(--line);
}

.sidebar .nav .nav-item .nav-link {
  margin: 3px .75rem;
  border-radius: var(--radius-sm);
  transition: background .15s ease;
}
.sidebar .nav .nav-item .nav-link:hover { background: rgba(107, 18, 48, .06); }

.sidebar .nav .nav-item .nav-link .menu-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.sidebar .nav .nav-item .menu-icon { background: unset; }
.sidebar .nav .nav-item .menu-icon i {
  color: var(--gold-deep) !important;
  font-size: 1.5rem;
}

/* active item = burgundy pill */
.sidebar .nav .nav-item.active > .nav-link {
  background: linear-gradient(135deg, var(--burgundy), var(--burgundy-2));
  box-shadow: 0 8px 18px rgba(107, 18, 48, .25);
}
.sidebar .nav .nav-item.active > .nav-link .menu-title,
.sidebar .nav .nav-item.active > .nav-link .menu-arrow:before { color: #fff !important; }
.sidebar .nav .nav-item.active > .nav-link .menu-icon i { color: var(--sand) !important; }

/* chevron: "<" closed, "v" open */
.sidebar .nav .nav-item .nav-link .menu-arrow:before {
  content: "\F141" !important;
  color: var(--burgundy);
  font-size: 1.4rem;
}
.sidebar .nav .nav-item .nav-link[aria-expanded="true"] .menu-arrow:before { content: "\F140" !important; }

.sidebar .nav.sub-menu .nav-item .nav-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  margin: 0;
}
.sidebar .nav.sub-menu .nav-item .nav-link:hover,
.sidebar .nav.sub-menu .nav-item .nav-link.active { color: var(--burgundy); background: transparent; }

/* sidebar footer: clock / language / logout / user */
.sidebar-footer { padding: 2rem 1.25rem 2.5rem; }
.sidebar-footer .sf-row {
  display: flex; align-items: center; gap: .7rem;
  padding: .8rem 0; color: var(--text);
  font-size: 14px; font-weight: 700; text-decoration: none;
}
.sidebar-footer .sf-row i { font-size: 1.6rem; color: var(--burgundy); }
.sidebar-footer .sf-row i.sf-muted { color: var(--gold-deep); }
.sidebar-footer .sf-flag { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--gold-soft); }
.sidebar-footer .sf-lang-list .nav-link { color: var(--text); font-size: 13px; padding: .4rem 0 .4rem 2.4rem; margin: 0; }
.sidebar-footer .sf-flag-sm { width: 20px; margin-right: .4rem; }
.sidebar-footer .sf-user {
  margin-top: 1.25rem; padding: .75rem .9rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.sidebar-footer .sf-avatar { font-size: 2.6rem; line-height: 1; color: var(--burgundy); }
.sidebar-footer .sf-username { word-break: break-all; }
.sidebar-footer .sf-edit { margin-left: auto; }
.sidebar-footer .sf-edit i { color: var(--gold-deep); font-size: 1.5rem; }

/* ---------- footer bar ---------- */
.footer { background: transparent; border-top: 1px solid var(--line); }

/* ---------- forms ---------- */
.form-control, .asColorPicker-input,
.dataTables_wrapper select,
select.form-control {
  background-color: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.form-control:focus, .asColorPicker-input:focus, .dataTables_wrapper select:focus {
  background-color: #fff;
  color: var(--text);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 152, 58, .2);
}
input::placeholder { color: #a99ba0 !important; }

/* ---------- buttons ---------- */
button.btn.btn-primary, .btn-primary {
  background: var(--burgundy);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(107, 18, 48, .22);
}
button.btn.btn-primary:hover, .btn-primary:hover { background: var(--burgundy-2); color: #fff; }
.btn-primary:not(.btn-light):not(.btn-secondary):focus,
.btn-primary:not(.btn-light):not(.btn-secondary):active {
  background: var(--burgundy-deep);
  border-color: transparent;
}

/* ---------- tables ---------- */
.table, .table th, .table td, .jsgrid .jsgrid-table th, .jsgrid .jsgrid-table td {
  color: var(--text);
  border-color: var(--line);
}
.table thead, thead { background: var(--cream-2); }
.table thead th { color: var(--burgundy); font-weight: 700; border-bottom: 1px solid var(--line); }
.table-dark { background: #fff; color: var(--text); border: 1px solid var(--line); }
.table-hover tbody tr:hover { background: rgba(246, 227, 184, .25); }

/* =====================================================================
   DASHBOARD  (.dash-page)
   ===================================================================== */
.dash-hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 2.5rem 2.5rem 2.25rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(120deg, #fffaf2 0%, #fbe8c5 55%, #f4cf86 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-height: 230px;
}
/* ribbon echoing the swirl in the brand artwork */
.dash-hero::after {
  content: "";
  position: absolute;
  right: -70px; bottom: -110px;
  width: 460px; height: 260px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(138, 29, 69, .85), rgba(107, 18, 48, .25));
  transform: rotate(-16deg);
}
.dash-hero .orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, .95), rgba(246, 205, 125, .55) 45%, rgba(201, 152, 58, .25) 70%, rgba(201, 152, 58, 0) 72%);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, .7);
  z-index: 1;
}
.dash-hero .orb.o1 { width: 120px; height: 120px; right: 16%; top: 14%; }
.dash-hero .orb.o2 { width: 64px;  height: 64px;  right: 34%; top: 48%; }
.dash-hero .orb.o3 { width: 90px;  height: 90px;  right: 5%;  top: 52%; }

.dash-hero-text { position: relative; z-index: 2; max-width: 560px; }
.dash-hero .eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-deep); margin-bottom: .6rem;
}
.dash-hero h1 {
  margin: 0 0 .5rem;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.02;
  font-weight: 300;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
.dash-hero h1 span { display: block; }
.dash-hero h1 .l1 { color: var(--burgundy); }
.dash-hero h1 .l2 { color: var(--gold-deep); }
.dash-hero .hello { font-size: 1.15rem; color: var(--burgundy); margin: 0 0 1.1rem; }
.dash-hero .hello b { font-weight: 700; }

.chip {
  display: inline-block;
  padding: .35rem .9rem;
  border-radius: 999px;
  font-size: 12.5px; font-weight: 700;
  background: var(--burgundy); color: #fff;
  margin: 0 .35rem .35rem 0;
}
.chip.chip-gold { background: var(--sand); color: var(--burgundy-deep); }
.chip.chip-ok   { background: var(--ok-soft); color: var(--ok); }

/* stat tiles */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.25rem;
  display: flex; align-items: center; gap: 1rem;
  min-width: 0;
}
.stat .ico {
  flex: 0 0 auto;
  width: 50px; height: 50px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--gold-soft), var(--sand));
  color: var(--burgundy);
}
.stat .ico i { font-size: 1.6rem; line-height: 1; }
.stat .lbl { font-size: 12.5px; color: var(--muted); font-weight: 600; margin: 0 0 .15rem; }
.stat .val { font-size: 1.45rem; font-weight: 800; color: var(--text); line-height: 1.15; word-break: break-word; }
.stat .val small { font-size: .8rem; font-weight: 600; color: var(--muted); }
.stat.stat-hero {
  background: linear-gradient(135deg, var(--burgundy-deep), var(--burgundy-2));
  border: 0; box-shadow: var(--shadow-lg);
}
.stat.stat-hero .ico { background: rgba(255, 255, 255, .16); color: var(--sand); }
.stat.stat-hero .lbl { color: rgba(255, 255, 255, .75); }
.stat.stat-hero .val { color: #fff; }
.stat.stat-hero .val small { color: rgba(255, 255, 255, .7); }

/* cards on the dashboard */
.dash-page .card { margin-bottom: 1.5rem; }
.dash-page .card-body { padding: 1.4rem 1.5rem 1.5rem; }

.dash-title {
  display: flex; align-items: center; gap: .6rem;
  font-size: 1.15rem; font-weight: 800; color: var(--burgundy) !important;
  margin: 0 0 1rem;
}
.dash-title::before {
  content: "";
  width: 5px; height: 22px; border-radius: 99px;
  background: linear-gradient(180deg, var(--gold), var(--burgundy-2));
}

.dash-row {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .8rem .25rem;
  border-bottom: 1px dashed var(--line);
  font-size: 14.5px;
}
.dash-row:last-child { border-bottom: 0; }
.dash-row .dash-label { color: var(--muted); font-weight: 600; }
.dash-row .dash-value { color: var(--text); font-weight: 700; text-align: right; word-break: break-word; }
.dash-row.is-total {
  background: linear-gradient(90deg, var(--gold-soft), #fff4dc);
  border-radius: var(--radius-sm);
  border-bottom: 0;
  padding: .9rem 1rem;
  margin-top: .5rem;
}
.dash-row.is-total .dash-label { color: var(--burgundy); }
.dash-row.is-total .dash-value { color: var(--burgundy); font-size: 1.1rem; }

/* announcements */
.dash-announce { list-style: none; margin: 0; padding: 0; }
.dash-announce li {
  display: flex; align-items: flex-start; gap: .9rem;
  padding: .75rem .25rem; border-bottom: 1px dashed var(--line); font-size: 14.5px;
}
.dash-announce li:last-child { border-bottom: 0; }
.dash-announce .num {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-soft); color: var(--burgundy); font-size: 12px; font-weight: 800;
}
.dash-announce a { color: var(--burgundy); font-weight: 600; text-decoration: none; }
.dash-announce a:hover { text-decoration: underline; }

/* BV table */
.dash-page .table { margin: 0; }
.dash-page .table thead { background: var(--cream-2); }
.dash-page .table th, .dash-page .table td { font-size: 14px; padding: .85rem 1rem; border: 0; }
.dash-page .table tbody tr { border-bottom: 1px dashed var(--line); }
.dash-page .table tbody tr:last-child { border-bottom: 0; font-weight: 800; color: var(--burgundy); }
.dash-page .table td:not(:first-child), .dash-page .table th:not(:first-child) { width: 20%; }
.dash-page .table thead th:first-child { border-radius: 12px 0 0 12px; }
.dash-page .table thead th:last-child  { border-radius: 0 12px 12px 0; }

/* progress bars (leadership) */
.dash-progress { padding: .6rem .25rem .2rem; }
.dash-progress .meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: .35rem; }
.dash-progress .bar { height: 10px; border-radius: 99px; background: var(--cream-2); overflow: hidden; }
.dash-progress .bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold), var(--burgundy-2)); }

/* wallet includes: dark burgundy tiles so their inline white text stays readable */
.dash-tiles .card {
  background:
    radial-gradient(circle at 100% 0%, rgba(246, 205, 125, .35), transparent 55%),
    linear-gradient(135deg, var(--burgundy-deep), var(--burgundy-2));
  border: 0;
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.dash-tiles .card .text-muted { color: rgba(255, 255, 255, .8) !important; }

@media (max-width: 991.98px) {
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575.98px) {
  .content-wrapper { padding: 1rem .75rem; }
  .dash-hero { padding: 1.75rem 1.4rem; border-radius: 22px; }
  .dash-hero::after { width: 300px; height: 190px; right: -90px; }
  .dash-hero .orb.o1 { width: 80px; height: 80px; }
  .dash-hero .orb.o3 { display: none; }
  .dash-stats { gap: .7rem; }
  .stat { padding: .9rem; gap: .7rem; }
  .stat .ico { width: 42px; height: 42px; border-radius: 13px; }
  .stat .val { font-size: 1.15rem; }
  .dash-row { font-size: 13.5px; }
}

/* =====================================================================
   WALLET TILE  (include/_wallet_tile.blade.php)
   Burgundy on its own, so it is readable on any page, not just .dash-tiles
   ===================================================================== */
.wallet-tile {
  background:
    radial-gradient(circle at 100% 0%, rgba(246, 205, 125, .35), transparent 55%),
    linear-gradient(135deg, var(--burgundy-deep), var(--burgundy-2));
  border: 0;
  box-shadow: var(--shadow-lg);
}
.wallet-tile .card-body { display: flex; align-items: center; gap: 1rem; padding: 1.15rem 1.35rem; }
.wallet-tile .wt-main { min-width: 0; }
.wallet-tile .wt-title { margin: 0 0 .25rem; font-size: 13px; font-weight: 700; color: var(--gold-soft); }
.wallet-tile .wt-amount { font-size: 1.6rem; font-weight: 800; color: #fff; line-height: 1.15; word-break: break-all; }
.wallet-tile .wt-link {
  display: inline-block; margin-top: .65rem; padding: .25rem .85rem;
  font-size: 12px; font-weight: 700; text-decoration: none;
  color: var(--burgundy-deep); background: var(--sand); border-radius: 999px;
}
.wallet-tile .wt-link:hover { background: var(--gold-soft); color: var(--burgundy-deep); }
.wallet-tile .wt-icon {
  margin-left: auto; flex: 0 0 auto; width: 48px; height: 48px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .14);
}
.wallet-tile .wt-icon i { font-size: 1.7rem; color: var(--sand); }

/* =====================================================================
   SIDEBAR FIXES
   1) logo no longer hidden behind the first menu item
   2) hover = soft burgundy tint (Corona's black hover is beaten on purpose:
      it uses this exact long :not() selector, so ours must match + !important)
   ===================================================================== */

/* 1) logo area: give it real height and push the menu below it (desktop only;
      on mobile the logo isn't in the sidebar) */
@media (min-width: 992px) {
  .sidebar .sidebar-brand-wrapper {
    height: 140px;
    padding: .75rem 0;
    z-index: 11;
    align-items: center;
    justify-content: center;
    background: #fffaf3;
  }
  .sidebar .sidebar-brand-wrapper .sidebar-brand img {
    width: auto !important;
    height: auto !important;
    max-width: 150px;
    max-height: 100px;
    margin: 0 auto !important;
    display: block;
  }
  .sidebar { padding-top: 150px; }
}

/* 2) hover */
.sidebar .nav:not(.sub-menu) > .nav-item:hover:not(.nav-category):not(.nav-profile) > .nav-link {
  background: rgba(107, 18, 48, .08) !important;
  color: var(--burgundy) !important;
}
.sidebar .nav:not(.sub-menu) > .nav-item:hover:not(.nav-category):not(.nav-profile) > .nav-link .menu-title,
.sidebar .nav:not(.sub-menu) > .nav-item:hover:not(.nav-category):not(.nav-profile) > .nav-link .menu-arrow:before {
  color: var(--burgundy) !important;
}
.sidebar .nav:not(.sub-menu) > .nav-item:hover:not(.nav-category):not(.nav-profile) > .nav-link .menu-icon i {
  color: var(--gold-deep) !important;
}

/* the selected item keeps its burgundy pill, hovered or not */
.sidebar .nav:not(.sub-menu) > .nav-item.active:hover:not(.nav-category):not(.nav-profile) > .nav-link {
  background: linear-gradient(135deg, var(--burgundy), var(--burgundy-2)) !important;
  color: #fff !important;
}
.sidebar .nav:not(.sub-menu) > .nav-item.active:hover:not(.nav-category):not(.nav-profile) > .nav-link .menu-title,
.sidebar .nav:not(.sub-menu) > .nav-item.active:hover:not(.nav-category):not(.nav-profile) > .nav-link .menu-arrow:before {
  color: #fff !important;
}
.sidebar .nav:not(.sub-menu) > .nav-item.active:hover:not(.nav-category):not(.nav-profile) > .nav-link .menu-icon i {
  color: var(--sand) !important;
}

/* sub-menu links on hover: no black either */
.sidebar .nav.sub-menu .nav-item .nav-link:hover { background: transparent !important; color: var(--burgundy) !important; }
