/* modern-ui.css - Modern UI Overlay for Transfer.360 */
/* Adds modern visual enhancements while keeping custom-colors.css intact */

/* ============================================
   CSS VARIABLES - Modern Enhancements
   ============================================ */
:root {
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 50px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);
  --shadow-glow: 0 0 20px rgba(0, 145, 173, 0.15);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-blur: blur(10px);
}

/* ============================================
   GLOBAL STYLES
   ============================================ */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Better selection color */
::selection {
  background: rgba(0, 145, 173, 0.2);
  color: inherit;
}

/* ============================================
   CARDS - Modern Style
   ============================================ */
.card {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1.25rem 1.5rem;
  font-weight: 600;
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  background: rgba(0, 0, 0, 0.02);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1rem 1.5rem;
}

.card-title {
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Stat cards with gradient accent */
.mini-stats-wid .card {
  position: relative;
  overflow: hidden;
}

.mini-stats-wid .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-secondary), var(--color-primary));
}

/* ============================================
   BUTTONS - Modern Style
   ============================================ */
.btn {
  border-radius: var(--radius-md);
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  transition: all var(--transition-normal);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::after {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

/* Primary button with gradient */
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  box-shadow: 0 4px 15px rgba(10, 37, 64, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  box-shadow: 0 6px 20px rgba(10, 37, 64, 0.4);
}

/* Secondary button with gradient */
.btn-secondary {
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
  box-shadow: 0 4px 15px rgba(0, 145, 173, 0.3);
}

.btn-secondary:hover {
  box-shadow: 0 6px 20px rgba(0, 145, 173, 0.4);
}

/* Success button */
.btn-success {
  background: linear-gradient(135deg, var(--color-success) 0%, var(--color-success-dark) 100%);
  box-shadow: 0 4px 15px rgba(54, 179, 126, 0.3);
}

/* Outline buttons */
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-info,
.btn-outline-warning,
.btn-outline-danger {
  border-width: 2px;
  background: transparent;
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover {
  transform: translateY(-1px);
}

/* Soft buttons */
.btn-soft-primary {
  background: rgba(10, 37, 64, 0.1);
  color: var(--color-primary);
  border: none;
}

.btn-soft-primary:hover {
  background: rgba(10, 37, 64, 0.2);
}

/* Small buttons */
.btn-sm {
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
}

/* Large buttons */
.btn-lg {
  border-radius: var(--radius-lg);
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
}

/* Icon buttons */
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}

/* ============================================
   FORMS - Modern Style
   ============================================ */
.form-control,
.form-select {
  border-radius: var(--radius-md);
  border: 2px solid #e9ecef;
  padding: 0.6rem 1rem;
  transition: all var(--transition-fast);
  background-color: #fafbfc;
}

.form-control:hover,
.form-select:hover {
  border-color: #d1d5db;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 4px rgba(0, 145, 173, 0.1);
  background-color: #fff;
}

.form-control::placeholder {
  color: #9ca3af;
}

/* Floating labels enhancement */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: var(--color-secondary);
}

/* Input groups */
.input-group {
  border-radius: var(--radius-md);
}

.input-group .form-control {
  border-radius: var(--radius-md);
}

.input-group-text {
  border-radius: var(--radius-md);
  border: 2px solid #e9ecef;
  background: #f8f9fa;
  border-right: none;
}

.input-group .form-control {
  border-left: none;
}

/* Checkboxes and radios */
.form-check-input {
  width: 1.2em;
  height: 1.2em;
  border-radius: 4px;
  border: 2px solid #d1d5db;
  transition: all var(--transition-fast);
}

.form-check-input:checked {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
}

.form-check-input:focus {
  box-shadow: 0 0 0 4px rgba(0, 145, 173, 0.1);
}

/* Switch */
.form-switch .form-check-input {
  border-radius: var(--radius-pill);
  width: 2.5em;
  height: 1.4em;
}

/* ============================================
   TABLES - Modern Style
   ============================================ */
.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table thead th {
  background: linear-gradient(180deg, #f8f9fa 0%, #f1f3f4 100%);
  border: none;
  padding: 1rem;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5e6c84;
}

.table thead th:first-child {
  border-radius: var(--radius-md) 0 0 0;
}

.table thead th:last-child {
  border-radius: 0 var(--radius-md) 0 0;
}

.table tbody tr {
  transition: all var(--transition-fast);
}

.table tbody tr:hover {
  background-color: rgba(0, 145, 173, 0.04);
}

.table tbody td {
  padding: 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f3f4;
}

.table-bordered {
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-bordered th,
.table-bordered td {
  border: none;
  border-bottom: 1px solid #f1f3f4;
}

/* Striped tables */
.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.015);
}

/* DataTables integration */
.dataTables_wrapper {
  padding: 0;
}

.dataTables_wrapper .dataTables_filter input {
  border-radius: var(--radius-md);
  border: 2px solid #e9ecef;
  padding: 0.5rem 1rem;
}

.dataTables_wrapper .dataTables_length select {
  border-radius: var(--radius-sm);
  border: 2px solid #e9ecef;
  padding: 0.3rem 2rem 0.3rem 0.5rem;
}

/* ============================================
   BADGES - Modern Style
   ============================================ */
.badge {
  border-radius: var(--radius-pill);
  padding: 0.4em 0.8em;
  font-weight: 500;
  font-size: 0.75em;
  letter-spacing: 0.02em;
}

/* Soft badges */
.badge.bg-soft-primary {
  background: rgba(10, 37, 64, 0.1) !important;
  color: var(--color-primary) !important;
}

.badge.bg-soft-secondary {
  background: rgba(0, 145, 173, 0.1) !important;
  color: var(--color-secondary) !important;
}

.badge.bg-soft-success {
  background: rgba(54, 179, 126, 0.1) !important;
  color: var(--color-success) !important;
}

.badge.bg-soft-warning {
  background: rgba(255, 171, 0, 0.15) !important;
  color: #b77800 !important;
}

.badge.bg-soft-danger {
  background: rgba(255, 86, 48, 0.1) !important;
  color: var(--color-danger) !important;
}

.badge.bg-soft-info {
  background: rgba(0, 145, 173, 0.1) !important;
  color: var(--color-info) !important;
}

/* Status badges with dot indicator */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ============================================
   SIDEBAR - Modern Compact Style
   ============================================ */
.vertical-menu {
  box-shadow: var(--shadow-lg);
  border-right: none;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

/* Simplebar scrollbar override */
.vertical-menu [data-simplebar] {
  padding-top: 8px;
}

/* Menu title / section headers */
#sidebar-menu .menu-title {
  padding: 8px 16px 6px !important;
  margin-top: 8px !important;
  font-size: 0.65rem !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8492a6 !important;
  font-weight: 600;
}

/* Main menu container */
#sidebar-menu ul.metismenu {
  padding: 0 6px;
}

/* Menu items - compact spacing */
#sidebar-menu ul li {
  margin: -5px 0;
}

#sidebar-menu ul li a {
  border-radius: var(--radius-sm);
  margin: 0 6px;
  padding: 9px 12px;
  transition: all var(--transition-fast);
  font-size: 0.875rem;
  color: #4a5568;
  display: flex;
  align-items: center;
  gap: 10px;
}

#sidebar-menu ul li a i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  transition: transform var(--transition-fast);
  color: #718096;
}

#sidebar-menu ul li a span {
  flex: 1;
}

#sidebar-menu ul li a:hover {
  background: rgba(0, 145, 173, 0.08);
  color: var(--color-secondary);
}

#sidebar-menu ul li a:hover i {
  color: var(--color-secondary);
  transform: scale(1.05);
}

#sidebar-menu ul li a.mm-active,
#sidebar-menu ul li a.active {
  background: linear-gradient(135deg, rgba(0, 145, 173, 0.12) 0%, rgba(10, 37, 64, 0.08) 100%);
  color: var(--color-primary);
  font-weight: 500;
}

#sidebar-menu ul li a.mm-active i,
#sidebar-menu ul li a.active i {
  color: var(--color-secondary);
}

/* Badge in sidebar - compact */
#sidebar-menu ul li a .badge {
  padding: 0.2em 0.5em;
  font-size: 0.7rem;
  margin-left: auto;
}

/* Submenu - compact */
#sidebar-menu ul li ul.sub-menu {
  padding: 2px 0 2px 20px;
}

#sidebar-menu ul li ul.sub-menu li a {
  padding: 7px 12px 7px 24px;
  font-size: 0.82rem;
  margin: 0 6px;
}

/* Sidebar HR divider */
#sidebar-menu hr {
  margin: 10px 16px;
  border-color: #e2e8f0;
  opacity: 0.6;
}

/* Mobile apps link at bottom - compact */
.vertical-menu hr + div,
#sidebar-menu + hr + div {
  padding: 8px 0 !important;
}

.vertical-menu hr + div a,
#sidebar-menu ~ hr ~ div a {
  font-size: 0.8rem !important;
}

.vertical-menu hr + div i,
#sidebar-menu ~ hr ~ div i {
  font-size: 16px !important;
}

.vertical-menu hr + div span,
#sidebar-menu ~ hr ~ div span {
  font-size: 0.75rem !important;
  margin-top: 2px !important;
}

/* Collapsed sidebar icon-only mode */
body.sidebar-enable .vertical-menu #sidebar-menu ul li a,
html.sidebar-collapsed-early .vertical-menu #sidebar-menu ul li a {
  justify-content: center;
  padding: 10px;
}

body.sidebar-enable .vertical-menu #sidebar-menu ul li a span,
body.sidebar-enable .vertical-menu #sidebar-menu .menu-title,
body.sidebar-enable .vertical-menu hr,
body.sidebar-enable .vertical-menu hr + div,
html.sidebar-collapsed-early .vertical-menu #sidebar-menu ul li a span,
html.sidebar-collapsed-early .vertical-menu #sidebar-menu .menu-title,
html.sidebar-collapsed-early .vertical-menu hr,
html.sidebar-collapsed-early .vertical-menu hr + div {
  display: none;
}

body.sidebar-enable .vertical-menu #sidebar-menu ul li a i,
html.sidebar-collapsed-early .vertical-menu #sidebar-menu ul li a i {
  margin: 0;
  font-size: 1.2rem;
}

/* Fix main content margin for LTR layout with left sidebar */
.main-content {
  margin-left: 250px;
  margin-right: 0;
}

/* Early sidebar collapse - applied to html element before body loads */
html[data-sidebar-size=sm] .main-content,
body[data-sidebar-size=sm] .main-content {
  margin-left: 70px;
  margin-right: 0;
}

html[data-sidebar-size=sm] .vertical-menu,
body[data-sidebar-size=sm] .vertical-menu {
  width: 70px !important;
}

html[data-sidebar-size=sm] .navbar-brand-box,
body[data-sidebar-size=sm] .navbar-brand-box {
  width: 70px !important;
}

html[data-sidebar-size=sm] .logo span.logo-lg,
body[data-sidebar-size=sm] .logo span.logo-lg {
  display: none;
}

html[data-sidebar-size=sm] .logo span.logo-sm,
body[data-sidebar-size=sm] .logo span.logo-sm {
  display: block;
}

/* ============================================
   HEADER - Modern Style
   ============================================ */
.navbar-header {
  box-shadow: var(--shadow-sm);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.header-item {
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.header-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* ============================================
   DROPDOWNS - Modern Style
   ============================================ */
.dropdown-menu {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 0.5rem;
  margin-top: 0 !important;
  animation: dropdownFade 0.15s ease-out;
  transform-origin: top center;
}

/* Prevent dropdown jump in header - fix for 72px offset bug */
.navbar-header .dropdown-menu {
  top: 100% !important;
  margin-top: 2px !important;
  transform: none !important;
}

/* Fix for dropdown positioning in fixed header */
#page-topbar .dropdown-menu {
  position: absolute !important;
  inset: auto !important;
  top: 100% !important;
  transform: none !important;
}

#page-topbar .dropdown-menu.dropdown-menu-start {
  left: 0 !important;
  right: auto !important;
}

#page-topbar .dropdown-menu.dropdown-menu-end {
  left: auto !important;
  right: 0 !important;
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.dropdown-item {
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  transition: all var(--transition-fast);
}

.dropdown-item:hover {
  background: rgba(0, 145, 173, 0.08);
  color: var(--color-primary);
}

.dropdown-item:active,
.dropdown-item.active {
  background: var(--color-secondary);
  color: white;
}

.dropdown-divider {
  margin: 0.5rem 0;
  border-color: #f1f3f4;
}

/* ============================================
   MODALS - Modern Style
   ============================================ */
.modal-content {
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  border: none;
  padding: 1.5rem;
}

.modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.modal-header .btn-close:hover {
  opacity: 1;
}

.modal-title {
  font-weight: 600;
  color: #f1f3f4;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid #f1f3f4;
  padding: 1rem 1.5rem;
  background: #fafbfc;
}

/* Modal animation */
.modal.fade .modal-dialog {
  transform: scale(0.9) translateY(-20px);
  transition: transform 0.3s ease;
}

.modal.show .modal-dialog {
  transform: scale(1) translateY(0);
}

/* ============================================
   ALERTS - Modern Style
   ============================================ */
.alert {
  border: none;
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  border-left: 4px solid;
}

.alert-primary {
  background: rgba(10, 37, 64, 0.08);
  border-left-color: var(--color-primary);
  color: var(--color-primary);
}

.alert-secondary {
  background: rgba(0, 145, 173, 0.08);
  border-left-color: var(--color-secondary);
  color: var(--color-secondary-dark);
}

.alert-success {
  background: rgba(54, 179, 126, 0.08);
  border-left-color: var(--color-success);
  color: var(--color-success-dark);
}

.alert-warning {
  background: rgba(255, 171, 0, 0.1);
  border-left-color: var(--color-warning);
  color: #b77800;
}

.alert-danger {
  background: rgba(255, 86, 48, 0.08);
  border-left-color: var(--color-danger);
  color: var(--color-danger-dark);
}

.alert-info {
  background: rgba(0, 145, 173, 0.08);
  border-left-color: var(--color-info);
  color: var(--color-info-dark);
}

/* ============================================
   PAGINATION - Modern Style
   ============================================ */
.pagination {
  gap: 4px;
}

.page-item .page-link {
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  color: #6c757d;
  transition: all var(--transition-fast);
}

.page-item .page-link:hover {
  background: rgba(0, 145, 173, 0.1);
  color: var(--color-secondary);
}

.page-item.active .page-link {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(10, 37, 64, 0.3);
}

.page-item.disabled .page-link {
  background: #f8f9fa;
  color: #adb5bd;
}

/* ============================================
   TABS & NAVS - Modern Style
   ============================================ */
.nav-tabs {
  border: none;
  gap: 4px;
}

.nav-tabs .nav-link {
  border: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: 0.75rem 1.5rem;
  color: #6c757d;
  font-weight: 500;
  transition: all var(--transition-fast);
  background: #f8f9fa;
}

.nav-tabs .nav-link:hover {
  color: var(--color-primary);
  background: #f1f3f4;
}

.nav-tabs .nav-link.active {
  background: white;
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.nav-pills {
  gap: 8px;
}

.nav-pills .nav-link {
  border-radius: var(--radius-pill);
  padding: 0.5rem 1.25rem;
  color: #6c757d;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.nav-pills .nav-link:hover {
  background: rgba(0, 145, 173, 0.1);
  color: var(--color-secondary);
}

.nav-pills .nav-link.active {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(10, 37, 64, 0.3);
}

/* ============================================
   PROGRESS BARS - Modern Style
   ============================================ */
.progress {
  height: 8px;
  border-radius: var(--radius-pill);
  background: #e9ecef;
  overflow: hidden;
}

.progress-bar {
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--color-secondary) 0%, var(--color-primary) 100%);
  transition: width 0.6s ease;
}

/* ============================================
   TOOLTIPS - Modern Style
   ============================================ */
.tooltip-inner {
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  box-shadow: var(--shadow-md);
}

/* ============================================
   BREADCRUMBS - Modern Style
   ============================================ */
.breadcrumb {
  background: transparent;
  padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  font-size: 1.2em;
  color: #adb5bd;
}

.breadcrumb-item a {
  color: #6c757d;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.breadcrumb-item.active {
  color: var(--color-primary);
  font-weight: 500;
}

/* ============================================
   PAGE TITLE - Modern Style
   ============================================ */
.page-title-box {
  padding: 1.25rem 0;
}

.page-title-box h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ============================================
   AVATAR - Modern Style
   ============================================ */
.avatar-xs {
  width: 32px;
  height: 32px;
}

.avatar-sm {
  width: 40px;
  height: 40px;
}

.avatar-md {
  width: 48px;
  height: 48px;
}

.avatar-lg {
  width: 64px;
  height: 64px;
}

.avatar-title {
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.avatar-circle {
  border-radius: 50%;
}

/* ============================================
   LOADING & SPINNERS - Modern Style
   ============================================ */
.spinner-border {
  border-width: 3px;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ============================================
   SCROLLBAR - Modern Style
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f3f4;
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb {
  background: #c1c9d2;
  border-radius: var(--radius-pill);
  transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: #a8b0b9;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.rounded-modern {
  border-radius: var(--radius-lg) !important;
}

.rounded-modern-sm {
  border-radius: var(--radius-sm) !important;
}

.rounded-modern-xl {
  border-radius: var(--radius-xl) !important;
}

.shadow-modern {
  box-shadow: var(--shadow-md) !important;
}

.shadow-modern-lg {
  box-shadow: var(--shadow-lg) !important;
}

.glass-effect {
  background: var(--glass-bg) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border: 1px solid var(--glass-border) !important;
}

.hover-lift {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease;
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

.animate-bounce {
  animation: bounce 1s infinite;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
  .card {
    border-radius: var(--radius-md);
  }

  .modal-content {
    border-radius: var(--radius-lg);
    margin: 1rem;
  }

  .btn {
    padding: 0.5rem 1rem;
  }
}

/* ============================================
   DARK MODE SUPPORT (if enabled)
   ============================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --glass-bg: rgba(30, 30, 30, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .card {
    box-shadow: none;
    border: 1px solid #dee2e6;
  }

  .btn {
    box-shadow: none;
  }
}

/* ============================================
   SweetAlert2 — pin to viewport, above layout chrome
   ============================================
   The sidebar variants in app.min.css use z-index up to 9999 (sub-menus when
   collapsed). SweetAlert2's default container z-index is 1060, so on some
   pages the popup was rendering visually behind the sidebar.
   We only touch `position`, `inset` and `z-index` — touching `display`,
   `width` or `height` clobbers SweetAlert's internal grid template (set via
   `:where()` rules with zero specificity) and the popup loses all its
   styling (full-screen text instead of a centered card). */
.swal2-container {
  position: fixed !important;
  inset: 0 !important;
  z-index: 100000 !important;
}

/* ============================================
   App toast (custom, framework-free)
   ============================================
   Lightweight notification used in place of SweetAlert toasts. Triggered via
   window.showToast(message, type) — see the showToast helper definition in
   each page (currently views/areas.ejs).
   Stacks in #app-toast-host top-right, auto-dismisses after ~3s. */
#app-toast-host {
  position: fixed;
  top: 80px;            /* clear the topbar */
  right: 20px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.app-toast {
  pointer-events: auto;
  background: #fff;
  color: #212529;
  border-left: 4px solid #198754;
  padding: 12px 14px 12px 12px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  min-width: 260px;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  line-height: 1.35;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.app-toast.show {
  opacity: 1;
  transform: translateX(0);
}
.app-toast.app-toast-error   { border-left-color: #dc3545; }
.app-toast.app-toast-info    { border-left-color: #0dcaf0; }
.app-toast.app-toast-warning { border-left-color: #ffc107; }
.app-toast .app-toast-icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #198754;
  font-weight: 700;
  font-size: 0.78rem;
}
.app-toast.app-toast-error   .app-toast-icon { background: #dc3545; }
.app-toast.app-toast-info    .app-toast-icon { background: #0dcaf0; color: #002a31; }
.app-toast.app-toast-warning .app-toast-icon { background: #ffc107; color: #533f03; }
.app-toast .app-toast-msg {
  flex: 1 1 auto;
  word-wrap: break-word;
}

