:root{
  --ec-pro-bg: #f4f7fb;
  --ec-pro-bg-2: #edf3ff;
  --ec-pro-surface: rgba(255,255,255,.92);
  --ec-pro-surface-strong: #ffffff;
  --ec-pro-text: #0f172a;
  --ec-pro-muted: #64748b;
  --ec-pro-border: rgba(148,163,184,.24);
  --ec-pro-border-strong: rgba(148,163,184,.34);
  --ec-pro-shadow: 0 18px 48px rgba(15,23,42,.08);
  --ec-pro-shadow-lg: 0 26px 70px rgba(15,23,42,.12);
  --ec-pro-radius: 22px;
  --ec-pro-radius-sm: 16px;
  --ec-pro-primary: #0f766e;
  --ec-pro-primary-2: #2563eb;
  --ec-pro-primary-soft: rgba(37,99,235,.12);
  --ec-pro-sidebar: linear-gradient(180deg, #0f172a 0%, #111827 38%, #0b1220 100%);
}

html{
  scroll-behavior: smooth;
}

body,
body.auth-bg,
body.ec-app-body{
  min-height: 100vh;
  color: var(--ec-pro-text);
  background:
    radial-gradient(900px circle at 0% 0%, rgba(37,99,235,.10), transparent 42%),
    radial-gradient(900px circle at 100% 0%, rgba(15,118,110,.10), transparent 38%),
    linear-gradient(180deg, var(--ec-pro-bg-2), var(--ec-pro-bg));
}

body.ec-app-body::before,
body.bg-slate-50::before{
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(650px circle at 10% 18%, rgba(37,99,235,.08), transparent 46%),
    radial-gradient(700px circle at 90% 12%, rgba(20,184,166,.10), transparent 44%);
  pointer-events: none;
  z-index: -1;
}

#ecSidebar{
  background: var(--ec-pro-sidebar) !important;
  border-right: 1px solid rgba(148,163,184,.12) !important;
  box-shadow: 18px 0 50px rgba(2,6,23,.18);
}

#ecSidebar .ec-surface,
#ecSidebar .bg-slate-100{
  background: rgba(255,255,255,.06) !important;
}

#ecSidebar .text-slate-900,
#ecSidebar .text-slate-700,
#ecSidebar .text-slate-600,
#ecSidebar .text-slate-500{
  color: #e2e8f0 !important;
}

#ecSidebar .border-slate-200,
#ecSidebar .border-slate-100,
#ecSidebar .ring-1,
#ecSidebar .ec-ring{
  border-color: rgba(148,163,184,.18) !important;
  box-shadow: inset 0 0 0 1px rgba(148,163,184,.12) !important;
}

#ecSidebar .hover\:bg-slate-100:hover,
#ecSidebar .hover\:bg-slate-100:focus,
#ecSidebar .group:hover .group-hover\:bg-white,
#ecSidebar .group:hover .group-hover\:shadow{
  background: rgba(255,255,255,.10) !important;
  box-shadow: none !important;
}

#ecSidebar .bg-blue-50,
#ecSidebar .text-blue-700,
#ecSidebar .ring-blue-100{
  background: linear-gradient(135deg, rgba(37,99,235,.20), rgba(20,184,166,.18)) !important;
  color: #ffffff !important;
  border-color: rgba(96,165,250,.24) !important;
}

#ecSidebar .bg-blue-600,
#ecSidebar .bg-slate-900,
#ecSidebar .bg-gradient-to-br{
  background: linear-gradient(135deg, #2563eb, #0f766e) !important;
}

#ecSidebar .ec-sidebar-item{
  border: 1px solid transparent;
}

#ecSidebar .ec-sidebar-item:hover{
  border-color: rgba(255,255,255,.10);
  transform: translateX(2px);
}

#ecSidebar .ec-sidebar-section{
  color: rgba(226,232,240,.58) !important;
  letter-spacing: .14em;
}

#ecSidebar .ec-sidebar-footer-text{ color: rgba(226,232,240,.52) !important; }

#ecMain{
  background: transparent;
}

header.sticky{
  background: rgba(255,255,255,.80) !important;
  backdrop-filter: blur(18px);
  border-bottom-color: rgba(148,163,184,.18) !important;
  box-shadow: 0 8px 24px rgba(15,23,42,.04);
}

main.mx-auto{
  position: relative;
}

footer{
  background: rgba(255,255,255,.72) !important;
  backdrop-filter: blur(14px);
}

.ec-input,
.form-control,
.form-select,
.input-group-text,
.form-floating > .form-control,
.form-floating > .form-select{
  min-height: 48px;
  border-radius: 16px !important;
  border: 1px solid var(--ec-pro-border) !important;
  background: rgba(248,250,252,.94) !important;
  color: var(--ec-pro-text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}

.form-control::placeholder,
.ec-input::placeholder{
  color: #94a3b8;
}

.form-control:focus,
.form-select:focus,
.ec-input:focus,
.form-floating > .form-control:focus,
.form-floating > .form-select:focus{
  background: #ffffff !important;
  border-color: rgba(37,99,235,.42) !important;
  box-shadow: 0 0 0 4px rgba(37,99,235,.12) !important;
}

textarea.form-control{
  min-height: 110px;
}

.btn{
  border-radius: 16px !important;
  font-weight: 700 !important;
  letter-spacing: .01em;
  min-height: 44px;
  padding-left: 1rem;
  padding-right: 1rem;
  border-color: transparent;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease;
}

.btn:hover,
.btn:focus{
  transform: translateY(-1px);
}

.btn-primary,
.btn-success{
  background: linear-gradient(135deg, var(--ec-pro-primary-2), var(--ec-pro-primary)) !important;
  border: 0 !important;
  box-shadow: 0 12px 26px rgba(37,99,235,.18);
}

.btn-primary:hover,
.btn-success:hover,
.btn-primary:focus,
.btn-success:focus{
  box-shadow: 0 16px 28px rgba(37,99,235,.22) !important;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-light,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info{
  background: rgba(255,255,255,.85) !important;
  border: 1px solid var(--ec-pro-border) !important;
  color: #334155 !important;
}

.btn-light:hover,
.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-danger:hover,
.btn-outline-warning:hover,
.btn-outline-info:hover{
  background: #ffffff !important;
  border-color: var(--ec-pro-border-strong) !important;
  box-shadow: 0 10px 22px rgba(15,23,42,.08);
}

.btn-danger{
  box-shadow: 0 12px 24px rgba(239,68,68,.16);
}

.badge,
.ec-badge,
.ec-status,
.ec-perm-status-badge{
  border-radius: 999px !important;
  padding: .42rem .72rem !important;
  font-weight: 800 !important;
  letter-spacing: .01em;
}

.bg-light,
.bg-white,
.bg-body,
.bg-primary-subtle,
.bg-secondary-subtle,
.bg-success-subtle,
.bg-warning-subtle,
.bg-info-subtle,
.bg-danger-subtle{
  background-color: rgba(248,250,252,.92) !important;
}

.card,
.modal-content,
.auth-shell,
.ec-card,
.ec-table-shell,
.alert,
.dropdown-menu,
.offcanvas,
.table-responsive,
.ec-emoji-pop{
  background: var(--ec-pro-surface) !important;
  border: 1px solid var(--ec-pro-border) !important;
  border-radius: var(--ec-pro-radius) !important;
  box-shadow: var(--ec-pro-shadow) !important;
  backdrop-filter: blur(14px);
}

.card-header,
.card-footer,
.modal-header,
.modal-footer{
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,250,252,.84)) !important;
  border-color: rgba(148,163,184,.16) !important;
}

.alert{
  border-left-width: 4px !important;
}

.table-responsive{
  overflow: auto;
}

.table{
  --bs-table-bg: transparent;
  margin-bottom: 0;
}

.table thead th,
.ec-table thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(241,245,249,.96) !important;
  color: #475569 !important;
  border-bottom: 1px solid rgba(148,163,184,.18) !important;
  font-size: .74rem !important;
  font-weight: 800 !important;
  letter-spacing: .08em;
}

.table tbody td,
.table tbody th,
.ec-table tbody td{
  background: transparent;
  border-color: rgba(148,163,184,.12) !important;
  padding-top: .92rem;
  padding-bottom: .92rem;
  vertical-align: middle;
}

.table tbody tr:hover,
.ec-table tbody tr:hover{
  background: rgba(37,99,235,.04) !important;
}

.table tbody tr:last-child td,
.table tbody tr:last-child th{
  border-bottom: 0;
}

.pagination .page-link{
  border: 1px solid var(--ec-pro-border);
  background: rgba(255,255,255,.92);
  color: #334155;
  border-radius: 14px !important;
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(15,23,42,.04);
}

.pagination .page-item.active .page-link,
.pagination .page-link:hover{
  background: linear-gradient(135deg, var(--ec-pro-primary-2), var(--ec-pro-primary));
  border-color: transparent;
  color: #fff;
}

.modal-backdrop.show{
  opacity: .36;
}

.dropdown-menu{
  padding: .5rem;
}

.app-page-header,
.ec-page-head{
  padding: 1rem 0 1.15rem;
  margin-bottom: 1.5rem !important;
  border-bottom: 1px solid rgba(148,163,184,.18) !important;
}

.app-page-header h1,
.app-page-header .h4,
.ec-page-head h1,
.ec-page-head .h4{
  font-weight: 800 !important;
  letter-spacing: -.02em;
}

.search-box-modern .form-control,
.input-group-sm > .form-control,
.input-group-sm > .form-select,
.input-group-sm > .input-group-text{
  min-height: 42px;
}

#ecProfileMenu{
  border-radius: 20px !important;
}

#ecGlobalSearchForm{
  max-width: 700px !important;
}

#ecGlobalSearch{
  box-shadow: 0 10px 26px rgba(15,23,42,.05);
}

.ec-support .ec-chat-bubble,
.ec-file-card,
.ec-attach-item,
.ec-attach-box{
  border-radius: 18px !important;
}

.ec-support .ec-chat-item.is-mine .ec-chat-bubble{
  background: linear-gradient(180deg, rgba(37,99,235,.14), rgba(15,118,110,.08)) !important;
}

.auth-shell{
  overflow: hidden;
}

.auth-form,
.auth-shell .bg-white{
  background: rgba(255,255,255,.96) !important;
}

.auth-hero{
  background:
    radial-gradient(500px circle at 15% 15%, rgba(255,255,255,.12), transparent 42%),
    linear-gradient(145deg, #0f766e 0%, #1d4ed8 100%) !important;
}

.auth-hero-feature{
  border-radius: 18px !important;
  box-shadow: 0 12px 28px rgba(2,6,23,.10);
}

.auth-logo,
.auth-logo-sm,
.auth-brand-badge{
  box-shadow: 0 16px 30px rgba(2,6,23,.16);
}

.table .btn-group .btn,
.btn-sm{
  min-height: 36px;
  border-radius: 12px !important;
}

.card .text-muted,
.small.text-muted,
.text-muted{
  color: var(--ec-pro-muted) !important;
}

@media (max-width: 991.98px){
  #ecGlobalSearchForm{
    max-width: none !important;
  }

  header.sticky .h-16,
  header.sticky .h-16 > .flex,
  header.sticky .h-16{
    height: auto !important;
    min-height: 4rem;
    padding-top: .7rem;
    padding-bottom: .7rem;
  }
}

@media (max-width: 767.98px){
  main.mx-auto{
    padding-left: .85rem !important;
    padding-right: .85rem !important;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }

  .card,
  .modal-content,
  .table-responsive,
  .alert,
  .auth-shell{
    border-radius: 18px !important;
  }

  .card-header,
  .card-body,
  .card-footer,
  .modal-header,
  .modal-body,
  .modal-footer{
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .app-page-header,
  .ec-page-head{
    padding-top: .35rem;
    padding-bottom: .85rem;
  }

  .app-page-header .d-flex,
  .card-header .d-flex,
  .card-footer .d-flex,
  .row .d-flex.flex-wrap{
    gap: .75rem !important;
  }

  .btn-group{
    flex-wrap: wrap;
  }

  .btn,
  .form-control,
  .form-select,
  .input-group-text,
  .ec-input{
    font-size: .95rem;
  }

  .table thead th,
  .ec-table thead th{
    font-size: .68rem !important;
    letter-spacing: .06em;
  }

  .ec-chat-bubble{
    max-width: calc(100vw - 92px) !important;
  }
}

@media (max-width: 575.98px){
  .auth-shell{
    border-radius: 22px !important;
  }

  .app-page-header > div:last-child,
  .app-page-header .btn,
  .card-header .btn,
  .card-footer .btn{
    width: 100%;
  }

  .table-responsive{
    border-radius: 16px !important;
  }

  .ec-support .ec-attach-row,
  .ec-support .ec-attach-actions{
    align-items: stretch;
  }

  .ec-support .ec-attach-actions > *{
    width: 100%;
  }
}
