/* Final pass: loaded after page-level inline styles so the glass UX wins consistently. */

body {
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.34)),
        radial-gradient(circle at 12% 8%, rgba(168, 212, 46, 0.30), transparent 30rem),
        radial-gradient(circle at 88% 4%, rgba(209, 154, 39, 0.24), transparent 34rem),
        radial-gradient(circle at 70% 95%, rgba(237, 28, 36, 0.08), transparent 30rem),
        linear-gradient(135deg, #fbfff4 0%, #fffaf0 42%, #f7fff2 100%) !important;
    color: var(--ink) !important;
}

body::before {
    animation: glassGridPulse 16s ease-in-out infinite alternate;
}

.navbar,
.navbar-light.bg-white,
.navbar-dark.bg-primary,
.sticky-top {
    background: rgba(255, 255, 255, 0.66) !important;
    border-color: rgba(255, 255, 255, 0.58) !important;
    box-shadow: 0 14px 45px rgba(31, 45, 80, 0.10) !important;
    backdrop-filter: blur(24px) saturate(170%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(170%) !important;
}

.navbar::after {
    content: "";
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(111,159,22,0.34), rgba(209,154,39,0.28), transparent);
    pointer-events: none;
}

.card,
.modern-card,
.glass-card,
.modal-content,
.accordion-item,
.dropdown-menu,
.list-group-item,
.alert,
.rte-wrapper,
.table-responsive,
.offcanvas,
.p-5.bg-light,
.bg-light.rounded-3,
.welcome-banner,
.action-item,
.summary-panel,
.stat-card,
.info-card,
.speaker-card,
.schedule-card,
.sponsor-card,
.gallery-card {
    background: var(--glass-surface) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-soft) !important;
    backdrop-filter: blur(22px) saturate(170%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(170%) !important;
}

.card,
.modern-card,
.action-item,
.modal-content,
.accordion-item {
    position: relative;
}

.card::before,
.modern-card::before,
.action-item::before,
.modal-content::before,
.accordion-item::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.48), transparent 34%, rgba(255,255,255,0.16));
    opacity: 0.7;
}

.card > *,
.modern-card > *,
.action-item > *,
.modal-content > *,
.accordion-item > * {
    position: relative;
    z-index: 1;
}

.card-header,
.modal-header,
.accordion-button,
.table thead th,
.modern-card-header {
    background: rgba(255, 255, 255, 0.52) !important;
    border-color: rgba(111, 159, 22, 0.12) !important;
}

.form-control,
.form-select,
textarea,
input,
select {
    background-color: rgba(255, 255, 255, 0.68) !important;
    border-color: rgba(111, 159, 22, 0.16) !important;
    border-radius: var(--radius-md) !important;
}

.form-control::placeholder,
textarea::placeholder {
    color: rgba(83, 98, 124, 0.66) !important;
}

.form-label,
.small.fw-bold,
.fw-bold {
    letter-spacing: -0.01em;
}

.table,
.table > :not(caption) > * > * {
    background-color: transparent !important;
}

.footer {
    background: linear-gradient(135deg, rgba(35, 31, 32, 0.94), rgba(111, 89, 23, 0.84)) !important;
    backdrop-filter: blur(22px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(160%) !important;
}

h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
}

.page-title-box,
.modern-header,
.card-header {
    letter-spacing: -0.015em;
}

.display-4,
.display-5,
.greeting {
    letter-spacing: -0.045em !important;
}

.table thead th,
.modern-table thead th {
    color: #1C2746 !important;
}

.table tbody tr {
    transition: background 0.16s ease, transform 0.16s ease;
}

.table tbody tr:hover {
    background: rgba(255,255,255,0.42) !important;
}

.icon-box,
.icon-box-lg,
.stat-icon,
.ios-login-icon {
    box-shadow: var(--inner-highlight), 0 16px 34px rgba(28,44,92,0.13) !important;
}

.icon-box-lg.bg-primary,
.stat-icon.bg-primary,
.rounded-circle.bg-primary {
    background: linear-gradient(135deg, #A8D42E, #6F9F16) !important;
}

.stat-icon.bg-white,
.icon-box.bg-white,
.icon-box-lg.bg-white {
    background: rgba(255,255,255,0.68) !important;
}

/* Contrast safety: keep translucent Bootstrap utility combinations readable. */
.bg-primary.bg-opacity-10,
.badge.bg-primary.bg-opacity-10,
.icon-box.bg-primary.bg-opacity-10,
div.bg-primary.bg-opacity-10,
span.bg-primary.bg-opacity-10 {
    background: rgba(168, 212, 46, 0.17) !important;
    border-color: rgba(111, 159, 22, 0.26) !important;
}

.bg-warning.bg-opacity-10,
.badge.bg-warning.bg-opacity-10,
.icon-box.bg-warning.bg-opacity-10,
div.bg-warning.bg-opacity-10,
span.bg-warning.bg-opacity-10 {
    background: rgba(255, 183, 28, 0.22) !important;
    border-color: rgba(177, 108, 0, 0.20) !important;
}

.bg-danger.bg-opacity-10,
.badge.bg-danger.bg-opacity-10,
.icon-box.bg-danger.bg-opacity-10,
div.bg-danger.bg-opacity-10,
span.bg-danger.bg-opacity-10 {
    background: rgba(220, 53, 69, 0.13) !important;
    border-color: rgba(220, 53, 69, 0.24) !important;
}

.bg-success.bg-opacity-10,
.badge.bg-success.bg-opacity-10,
.icon-box.bg-success.bg-opacity-10,
div.bg-success.bg-opacity-10,
span.bg-success.bg-opacity-10 {
    background: rgba(91, 151, 35, 0.15) !important;
    border-color: rgba(91, 151, 35, 0.24) !important;
}

.bg-info.bg-opacity-10,
.badge.bg-info.bg-opacity-10,
.icon-box.bg-info.bg-opacity-10,
div.bg-info.bg-opacity-10,
span.bg-info.bg-opacity-10 {
    background: rgba(209, 154, 39, 0.16) !important;
    border-color: rgba(209, 154, 39, 0.26) !important;
}

.text-primary,
.badge.text-primary,
.bg-primary.bg-opacity-10.text-primary,
.badge.bg-primary.bg-opacity-10.text-primary {
    color: #4D7410 !important;
}

.text-warning,
.badge.text-warning,
.bg-warning.bg-opacity-10.text-warning,
.badge.bg-warning.bg-opacity-10.text-warning {
    color: #8a5200 !important;
}

.text-danger,
.badge.text-danger,
.bg-danger.bg-opacity-10.text-danger,
.badge.bg-danger.bg-opacity-10.text-danger {
    color: #a91f32 !important;
}

.text-success,
.badge.text-success,
.bg-success.bg-opacity-10.text-success,
.badge.bg-success.bg-opacity-10.text-success {
    color: #376e18 !important;
}

.text-info,
.badge.text-info,
.bg-info.bg-opacity-10.text-info,
.badge.bg-info.bg-opacity-10.text-info {
    color: #8A5C0C !important;
}

.badge {
    color: var(--ink) !important;
    text-shadow: none !important;
}

.badge.bg-primary:not(.bg-opacity-10),
.badge.bg-danger:not(.bg-opacity-10),
.badge.bg-dark,
.badge.bg-secondary {
    color: #fff !important;
}

.badge.bg-warning:not(.bg-opacity-10),
.badge.bg-success:not(.bg-opacity-10),
.badge.bg-info:not(.bg-opacity-10) {
    color: #102012 !important;
}

.btn-subtle-warning,
.btn.btn-subtle-warning {
    background: rgba(255, 183, 28, 0.18) !important;
    border: 1px solid rgba(177, 108, 0, 0.16) !important;
    color: #8a5200 !important;
}

.btn-subtle-warning i,
.btn.btn-subtle-warning i {
    color: #c46f00 !important;
}

.btn-subtle-warning:hover,
.btn.btn-subtle-warning:hover {
    background: rgba(255, 183, 28, 0.28) !important;
    color: #6e4100 !important;
}

.table,
.table td,
.table th,
.modern-table tbody td,
.modern-table tbody td strong {
    color: var(--ink) !important;
}

.table .text-muted,
.modern-table .text-muted {
    color: #4f5f79 !important;
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6,
.modern-header h1,
.modern-header h2,
.modern-header h3,
.modern-header h4,
.modern-header h5,
.modern-header h6 {
    color: #27327f !important;
}

.rounded.d-flex[class*="bg-"] i,
.icon-box i,
.badge i {
    opacity: 1 !important;
    filter: none !important;
}

/* Header contrast: preserve readable foregrounds when pages use Bootstrap colored headers. */
.card-header.bg-primary:not(.bg-opacity-10),
.modal-header.bg-primary:not(.bg-opacity-10),
.modern-card-header.bg-primary:not(.bg-opacity-10) {
    background: linear-gradient(135deg, rgba(67, 84, 179, 0.94), rgba(47, 58, 138, 0.92)) !important;
    color: #ffffff !important;
}

.card-header.bg-success:not(.bg-opacity-10),
.modal-header.bg-success:not(.bg-opacity-10),
.modern-card-header.bg-success:not(.bg-opacity-10) {
    background: linear-gradient(135deg, rgba(122, 179, 50, 0.94), rgba(72, 128, 27, 0.92)) !important;
    color: #ffffff !important;
}

.card-header.bg-danger:not(.bg-opacity-10),
.modal-header.bg-danger:not(.bg-opacity-10),
.modern-card-header.bg-danger:not(.bg-opacity-10) {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.94), rgba(150, 29, 45, 0.92)) !important;
    color: #ffffff !important;
}

.card-header.bg-info:not(.bg-opacity-10),
.modal-header.bg-info:not(.bg-opacity-10),
.modern-card-header.bg-info:not(.bg-opacity-10) {
    background: linear-gradient(135deg, rgba(209, 154, 39, 0.94), rgba(139, 92, 12, 0.92)) !important;
    color: #ffffff !important;
}

.card-header.bg-dark,
.modal-header.bg-dark,
.modern-card-header.bg-dark {
    background: linear-gradient(135deg, rgba(23, 32, 51, 0.94), rgba(12, 18, 31, 0.92)) !important;
    color: #ffffff !important;
}

.card-header.bg-warning:not(.bg-opacity-10),
.modal-header.bg-warning:not(.bg-opacity-10),
.modern-card-header.bg-warning:not(.bg-opacity-10) {
    background: linear-gradient(135deg, rgba(255, 205, 81, 0.96), rgba(242, 168, 24, 0.92)) !important;
    color: #302000 !important;
}

.card-header.bg-primary:not(.bg-opacity-10) *,
.modal-header.bg-primary:not(.bg-opacity-10) *,
.modern-card-header.bg-primary:not(.bg-opacity-10) *,
.card-header.bg-success:not(.bg-opacity-10) *,
.modal-header.bg-success:not(.bg-opacity-10) *,
.modern-card-header.bg-success:not(.bg-opacity-10) *,
.card-header.bg-danger:not(.bg-opacity-10) *,
.modal-header.bg-danger:not(.bg-opacity-10) *,
.modern-card-header.bg-danger:not(.bg-opacity-10) *,
.card-header.bg-info:not(.bg-opacity-10) *,
.modal-header.bg-info:not(.bg-opacity-10) *,
.modern-card-header.bg-info:not(.bg-opacity-10) *,
.card-header.bg-dark *,
.modal-header.bg-dark *,
.modern-card-header.bg-dark * {
    color: #ffffff !important;
}

.card-header.bg-warning:not(.bg-opacity-10) *,
.modal-header.bg-warning:not(.bg-opacity-10) *,
.modern-card-header.bg-warning:not(.bg-opacity-10) * {
    color: #302000 !important;
}

.card-header.text-white:not(.bg-primary):not(.bg-success):not(.bg-danger):not(.bg-info):not(.bg-dark),
.modal-header.text-white:not(.bg-primary):not(.bg-success):not(.bg-danger):not(.bg-info):not(.bg-dark),
.modern-card-header.text-white:not(.bg-primary):not(.bg-success):not(.bg-danger):not(.bg-info):not(.bg-dark),
.modern-header.text-white {
    color: var(--ink) !important;
}

.card-header.text-white:not(.bg-primary):not(.bg-success):not(.bg-danger):not(.bg-info):not(.bg-dark) *,
.modal-header.text-white:not(.bg-primary):not(.bg-success):not(.bg-danger):not(.bg-info):not(.bg-dark) *,
.modern-card-header.text-white:not(.bg-primary):not(.bg-success):not(.bg-danger):not(.bg-info):not(.bg-dark) *,
.modern-header.text-white * {
    color: var(--ink) !important;
}

.card-footer.bg-white,
.modal-footer.bg-white,
.accordion-body.bg-white,
.card-body.bg-white,
.bg-white:not(.navbar):not(.navbar-brand) {
    background: rgba(255, 255, 255, 0.64) !important;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.84) !important;
}

@keyframes glassGridPulse {
    0% { opacity: 0.62; transform: translateY(0); }
    100% { opacity: 0.88; transform: translateY(-10px); }
}
