:root {
  --ead-primary: #e31837;
  --ead-primary-dark: #bd102b;
  --ead-primary-soft: #fff0f3;
  --ead-primary-ring: rgba(227, 24, 55, .22);
  --ead-ink: #151a23;
  --ead-sidebar: #121823;
  --ead-sidebar-soft: #1d2532;
  --ead-muted: #667085;
  --ead-border: #e5e9f0;
  --ead-surface: #ffffff;
  --ead-background: #f5f7fb;
  --ead-shadow: 0 8px 24px rgba(17, 24, 39, .06);
  --ead-radius: 14px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ead-primary: #f23851;
  --ead-primary-dark: #ff6a7f;
  --ead-primary-soft: rgba(242, 56, 81, .14);
  --ead-primary-ring: rgba(242, 56, 81, .28);
  --ead-ink: #eef2f8;
  --ead-sidebar: #0a101a;
  --ead-sidebar-soft: #151d2a;
  --ead-muted: #a4adbd;
  --ead-border: #293445;
  --ead-surface: #171f2c;
  --ead-background: #0e1521;
  --ead-shadow: 0 10px 28px rgba(0, 0, 0, .26);
}

body {
  background: var(--ead-background);
  color: var(--ead-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: .94rem;
}

a {
  color: var(--ead-primary-dark);
}

a:hover {
  color: var(--ead-primary);
}

.content-wrapper {
  background: var(--ead-background);
}

.ead-shell .content-wrapper {
  min-height: calc(100vh - 114px) !important;
}

.main-header.navbar {
  min-height: 64px;
  padding: .55rem 1.25rem;
  background: var(--ead-surface);
  border-bottom: 1px solid var(--ead-border);
  box-shadow: 0 1px 5px rgba(16, 24, 40, .04);
}

.main-header .nav-link {
  height: 44px;
  min-width: 44px;
  border-radius: 10px;
  color: var(--ead-ink) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.main-header .nav-link:hover {
  background: var(--ead-primary-soft);
  color: var(--ead-primary) !important;
}

.navbar-workspace {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  margin-left: 1rem;
}

.navbar-workspace strong {
  color: var(--ead-ink);
  font-size: .95rem;
  font-weight: 650;
}

.navbar-workspace span {
  color: var(--ead-muted);
  font-size: .75rem;
}

.theme-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: var(--ead-muted);
  display: inline-flex;
  font-size: 1.05rem;
  height: 44px;
  justify-content: center;
  margin-right: .25rem;
  width: 44px;
}

.theme-toggle:hover,
.theme-toggle:focus {
  background: var(--ead-primary-soft);
  color: var(--ead-primary);
  outline: none;
}

.theme-toggle-standalone {
  background: var(--ead-surface);
  border: 1px solid var(--ead-border);
  box-shadow: var(--ead-shadow);
  margin: 0;
  position: fixed;
  right: 1.35rem;
  top: 1.35rem;
  z-index: 1040;
}

.main-sidebar {
  background: var(--ead-sidebar);
  box-shadow: 3px 0 18px rgba(10, 16, 25, .12) !important;
}

.brand-link {
  align-items: center;
  background: var(--ead-sidebar);
  border-bottom: 1px solid rgba(255, 255, 255, .08) !important;
  display: flex;
  gap: .8rem;
  height: 64px;
  padding: .7rem 1.1rem;
}

.brand-mark {
  align-items: center;
  background: var(--ead-primary);
  border-radius: 9px;
  color: #fff;
  display: inline-flex;
  font-size: 1.12rem;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.brand-copy {
  color: #fff;
  display: flex;
  flex-direction: column;
  line-height: 1.08;
}

.brand-copy strong {
  font-size: 1.15rem;
  letter-spacing: -.02em;
}

.brand-copy small {
  color: #98a2b3;
  font-size: .68rem;
  letter-spacing: .1em;
  margin-top: .2rem;
  text-transform: uppercase;
}

.sidebar {
  padding: 0 .75rem;
}

.user-panel {
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, .09) !important;
  gap: .7rem;
  padding: .85rem .35rem 1rem !important;
}

.user-avatar {
  align-items: center;
  background: rgba(227, 24, 55, .19);
  border: 1px solid rgba(227, 24, 55, .36);
  border-radius: 11px;
  color: #ffbec7;
  display: inline-flex;
  font-weight: 700;
  height: 42px;
  justify-content: center;
  text-transform: uppercase;
  width: 42px;
}

.user-panel .info {
  line-height: 1.2;
  overflow: hidden;
  padding: 0;
}

.user-panel .info a {
  color: #f8fafc;
  font-weight: 600;
  margin-bottom: .28rem;
}

.user-role {
  color: #aeb7c7;
  display: block;
  font-size: .73rem;
  text-transform: capitalize;
}

.nav-sidebar .nav-header {
  color: #7d899d;
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .14em;
  padding: 1.15rem .75rem .55rem;
}

.nav-sidebar .nav-item > .nav-link {
  border-radius: 10px;
  color: #cad1dd;
  margin-bottom: .22rem;
  padding: .7rem .72rem;
}

.nav-sidebar .nav-item > .nav-link:hover,
.nav-sidebar .nav-item.menu-open > .nav-link {
  background: rgba(227, 24, 55, .1);
  color: #fff;
}

.nav-sidebar .nav-item > .nav-link:hover .nav-icon,
.nav-sidebar .nav-item.menu-open > .nav-link .nav-icon {
  color: #ff7287;
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active {
  background: linear-gradient(90deg, rgba(227, 24, 55, .25), rgba(227, 24, 55, .11));
  border: 1px solid rgba(227, 24, 55, .25);
  box-shadow: inset 3px 0 0 var(--ead-primary);
  color: #fff;
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active .nav-icon {
  color: #ff627a;
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active:hover,
.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active:focus {
  background: linear-gradient(90deg, rgba(227, 24, 55, .31), rgba(227, 24, 55, .15));
}

.nav-sidebar .nav-icon {
  color: #8895a8;
  font-size: .93rem !important;
  margin-right: .55rem;
}

.nav-treeview > .nav-item > .nav-link {
  font-size: .89rem;
  padding-left: 1.5rem;
}

@media (min-width: 992px) {
  .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .brand-link {
    gap: 0;
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }

  .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .brand-copy {
    margin: 0;
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    width: 0;
  }

  .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .brand-mark {
    flex: 0 0 38px;
  }

  .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .sidebar {
    padding-left: .55rem;
    padding-right: .55rem;
  }

  .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .user-panel {
    gap: 0;
    justify-content: center;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .user-panel .info,
  .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .nav-sidebar .nav-link p {
    display: none;
    margin-left: 0;
  }

  .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .user-avatar {
    flex: 0 0 40px;
    height: 40px;
    width: 40px;
  }

  .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .nav-sidebar .nav-link {
    align-items: center;
    display: flex;
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }

  .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .nav-sidebar .nav-icon {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

.content-header {
  padding: 1.65rem .75rem .85rem;
}

.content-header h1 {
  color: var(--ead-ink);
  font-size: 1.48rem;
  font-weight: 700;
  letter-spacing: -.03em;
}

.breadcrumb {
  background: transparent;
  font-size: .85rem;
  padding: .45rem 0;
}

.breadcrumb-item.active {
  color: var(--ead-muted);
}

.content {
  padding: 0 .75rem 1.6rem;
}

.card {
  background: var(--ead-surface);
  border: 1px solid var(--ead-border);
  border-radius: var(--ead-radius);
  box-shadow: var(--ead-shadow);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.card-header {
  background: var(--ead-surface);
  border-bottom: 1px solid var(--ead-border);
  padding: 1rem 1.2rem;
}

.card-title,
.card-header h3 {
  font-size: 1.08rem;
  font-weight: 650;
  margin-bottom: 0;
}

.card-body {
  padding: 1.25rem;
}

.card-footer {
  background: var(--ead-background);
  border-top: 1px solid var(--ead-border);
}

.btn {
  border-radius: 9px;
  font-weight: 600;
  padding: .48rem .92rem;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.btn-primary,
.btn-info {
  background: var(--ead-primary);
  border-color: var(--ead-primary);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary.focus,
.btn-info:hover,
.btn-info:focus,
.btn-info.focus {
  background: var(--ead-primary-dark);
  border-color: var(--ead-primary-dark);
  color: #fff;
}

.btn-primary:focus,
.btn-primary.focus,
.btn-info:focus,
.btn-info.focus,
.btn-outline-info:focus,
.btn-outline-info.focus {
  box-shadow: 0 0 0 .2rem var(--ead-primary-ring);
}

.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active,
.show > .btn-primary.dropdown-toggle,
.btn-info:not(:disabled):not(.disabled):active,
.btn-info:not(:disabled):not(.disabled).active,
.show > .btn-info.dropdown-toggle {
  background: var(--ead-primary-dark);
  border-color: var(--ead-primary-dark);
  color: #fff;
}

.btn-primary:not(:disabled):not(.disabled):active:focus,
.btn-primary:not(:disabled):not(.disabled).active:focus,
.show > .btn-primary.dropdown-toggle:focus,
.btn-info:not(:disabled):not(.disabled):active:focus,
.btn-info:not(:disabled):not(.disabled).active:focus,
.show > .btn-info.dropdown-toggle:focus {
  box-shadow: 0 0 0 .2rem var(--ead-primary-ring);
}

.btn-primary.disabled,
.btn-primary:disabled,
.btn-info.disabled,
.btn-info:disabled {
  background: var(--ead-primary);
  border-color: var(--ead-primary);
  color: #fff;
}

.btn-outline-info {
  border-color: var(--ead-primary);
  color: var(--ead-primary);
}

.btn-outline-info:hover,
.btn-outline-info:focus,
.btn-outline-info.focus,
.btn-outline-info:not(:disabled):not(.disabled):active,
.btn-outline-info:not(:disabled):not(.disabled).active,
.show > .btn-outline-info.dropdown-toggle {
  background: var(--ead-primary);
  border-color: var(--ead-primary);
  color: #fff;
}

.btn-outline-info:not(:disabled):not(.disabled):active:focus,
.btn-outline-info:not(:disabled):not(.disabled).active:focus,
.show > .btn-outline-info.dropdown-toggle:focus {
  box-shadow: 0 0 0 .2rem var(--ead-primary-ring);
}

.btn-outline-info.disabled,
.btn-outline-info:disabled {
  border-color: var(--ead-primary);
  color: var(--ead-primary);
}

.btn-tool {
  color: var(--ead-muted);
  padding: .2rem .4rem;
}

.form-control,
.custom-select,
.select2-container--bootstrap4 .select2-selection {
  border: 1px solid #d7dde7;
  border-radius: 9px;
  min-height: 43px;
}

.form-control:focus,
.custom-select:focus,
.select2-container--bootstrap4.select2-container--focus .select2-selection {
  border-color: var(--ead-primary);
  box-shadow: 0 0 0 .2rem rgba(227, 24, 55, .12);
}

.form-group strong,
.form-group label {
  color: #344054;
  display: inline-block;
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: .42rem;
}

.table {
  color: #344054;
}

.table thead th {
  background: #f7f8fb;
  border-bottom-width: 1px;
  border-color: var(--ead-border);
  color: #475467;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .85rem .75rem;
  text-transform: uppercase;
}

.table-bordered,
.table-bordered td,
.table-bordered th {
  border-color: var(--ead-border);
}

.table tbody td {
  padding: .8rem .75rem;
  vertical-align: middle;
}

.table-hover tbody tr:hover {
  background: #fff7f8;
}

.page-link {
  border-color: var(--ead-border);
  color: var(--ead-primary);
}

.page-item.active .page-link {
  background: var(--ead-primary);
  border-color: var(--ead-primary);
}

.alert {
  border: 0;
  border-radius: 10px;
}

.alert-info {
  background: var(--ead-primary-soft);
  color: #981b30;
}

.badge-info,
.bg-info {
  background-color: var(--ead-primary) !important;
}

.info-box {
  background: var(--ead-surface);
  border: 1px solid var(--ead-border);
  border-radius: 13px;
  box-shadow: none;
  min-height: 104px;
  overflow: hidden;
}

.info-box .info-box-icon {
  border-radius: 0;
  font-size: 1.45rem;
  width: 76px;
}

.info-box-icon.bg-red {
  background: var(--ead-primary-soft) !important;
  color: var(--ead-primary);
}

.info-box-content h5 {
  color: var(--ead-ink);
  font-weight: 650;
}

.ead-hero {
  align-items: center;
  background: linear-gradient(110deg, var(--ead-sidebar), #252f3e);
  border-radius: var(--ead-radius);
  color: #fff;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.3rem;
  overflow: hidden;
  padding: 1.55rem 1.7rem;
  position: relative;
}

.ead-hero:after {
  background: var(--ead-primary);
  border-radius: 50%;
  content: "";
  height: 180px;
  opacity: .17;
  position: absolute;
  right: -45px;
  top: -85px;
  width: 180px;
}

.ead-eyebrow {
  color: #ffbbc5;
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .13em;
  margin-bottom: .5rem;
  text-transform: uppercase;
}

.ead-hero h2 {
  font-size: 1.48rem;
  font-weight: 700;
  margin: 0 0 .36rem;
}

.ead-hero p {
  color: #d0d5dd;
  margin: 0;
}

.ead-section-title {
  color: var(--ead-ink);
  font-size: 1.24rem;
  font-weight: 700;
  margin: 1.55rem 0 1rem;
}

.ead-course-card {
  height: calc(100% - 1rem);
  margin-bottom: 1rem;
}

.ead-course-card .info-box-content {
  justify-content: center;
}

.ead-course-link {
  color: var(--ead-primary);
  font-size: .86rem;
  font-weight: 600;
}

.ead-discipline-actions {
  display: grid;
  gap: .8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: .25rem;
}

.ead-discipline-action {
  align-items: center;
  background: var(--ead-surface);
  border: 1px solid var(--ead-border);
  border-radius: 12px;
  color: var(--ead-ink);
  display: flex;
  gap: .8rem;
  min-height: 92px;
  padding: .9rem;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.ead-discipline-action:hover,
.ead-discipline-action:focus {
  background: var(--ead-primary-soft);
  border-color: var(--ead-primary);
  box-shadow: 0 3px 12px rgba(227, 24, 55, .08);
  color: var(--ead-ink);
  outline: none;
  text-decoration: none;
}

.ead-discipline-icon {
  align-items: center;
  background: var(--ead-primary-soft);
  border-radius: 10px;
  color: var(--ead-primary);
  display: inline-flex;
  flex: 0 0 52px;
  font-size: 1.25rem;
  height: 52px;
  justify-content: center;
}

.ead-discipline-copy {
  flex: 1;
  min-width: 0;
}

.ead-discipline-copy strong {
  color: var(--ead-ink);
  display: block;
  font-size: .97rem;
  font-weight: 700;
}

.ead-discipline-copy small {
  color: var(--ead-muted);
  display: block;
  font-size: .78rem;
  margin-top: .15rem;
}

.ead-discipline-arrow {
  color: var(--ead-primary);
  font-size: .82rem;
}

.ead-library-label {
  color: var(--ead-primary);
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  margin-bottom: .42rem;
  text-transform: uppercase;
}

.ead-library-empty {
  align-items: center;
  background: var(--ead-background);
  border: 1px dashed var(--ead-border);
  border-radius: 12px;
  color: var(--ead-muted);
  display: flex;
  gap: .65rem;
  justify-content: center;
  margin-bottom: 1rem;
  padding: 1.25rem;
}

.ead-library-intro {
  align-items: center;
  background: var(--ead-background);
  border: 1px solid var(--ead-border);
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.1rem;
  padding: .9rem 1rem;
}

.ead-library-intro .ead-library-label {
  color: var(--ead-primary);
  margin-bottom: .2rem;
}

.ead-library-intro p {
  color: var(--ead-muted);
  font-size: .87rem;
}

.ead-library-total {
  background: var(--ead-primary-soft);
  border-radius: 999px;
  color: var(--ead-primary);
  flex-shrink: 0;
  font-size: .77rem;
  font-weight: 700;
  padding: .42rem .72rem;
}

.ead-library-columns > section {
  margin-bottom: 1rem;
}

.ead-resource-panel {
  border: 1px solid var(--ead-border);
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.ead-resource-header {
  align-items: center;
  background: var(--ead-background);
  border-bottom: 1px solid var(--ead-border);
  display: flex;
  justify-content: space-between;
  padding: .9rem 1rem;
}

.ead-resource-header h3 {
  color: var(--ead-ink);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 .17rem;
}

.ead-resource-header h3 i {
  color: var(--ead-primary);
  margin-right: .38rem;
}

.ead-resource-header p {
  color: var(--ead-muted);
  font-size: .78rem;
  margin: 0;
}

.ead-resource-header > span {
  align-items: center;
  background: var(--ead-primary-soft);
  border-radius: 9px;
  color: var(--ead-primary);
  display: inline-flex;
  font-size: .85rem;
  font-weight: 700;
  height: 34px;
  justify-content: center;
  min-width: 36px;
}

.ead-resource-list {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  max-height: min(62vh, 590px);
  overflow-y: auto;
  padding: .7rem;
}

.ead-resource-item {
  align-items: center;
  background: var(--ead-surface);
  border: 1px solid var(--ead-border);
  border-radius: 10px;
  color: var(--ead-ink);
  display: flex;
  flex-shrink: 0;
  gap: .7rem;
  min-height: 60px;
  padding: .58rem .7rem;
  text-align: left;
  transition: border-color .15s ease, background-color .15s ease;
  width: 100%;
}

.ead-resource-button:hover,
.ead-resource-button:focus,
.ead-resource-link:hover,
.ead-resource-link:focus {
  background: var(--ead-primary-soft);
  border-color: var(--ead-primary);
  color: var(--ead-ink);
  outline: none;
  text-decoration: none;
}

.ead-resource-icon {
  align-items: center;
  background: var(--ead-primary-soft);
  border-radius: 9px;
  color: var(--ead-primary);
  display: inline-flex;
  flex: 0 0 40px;
  font-size: 1rem;
  height: 40px;
  justify-content: center;
}

.ead-resource-content {
  flex: 1;
  min-width: 0;
}

.ead-resource-content strong {
  color: var(--ead-ink);
  display: block;
  font-size: .88rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ead-resource-content small {
  color: var(--ead-muted);
  display: block;
  font-size: .71rem;
  font-weight: 600;
  margin-top: .12rem;
  text-transform: uppercase;
}

.ead-resource-action {
  color: var(--ead-primary);
  flex-shrink: 0;
  font-size: .78rem;
  margin: 0 .25rem;
}

.ead-resource-disabled {
  opacity: .72;
}

.ead-video-modal .modal-content {
  border: 0;
  border-radius: 14px;
  overflow: hidden;
}

.ead-video-modal .modal-header {
  align-items: center;
  border-bottom: 1px solid var(--ead-border);
  padding: .9rem 1.1rem;
}

.ead-video-modal .modal-title {
  color: var(--ead-ink);
  font-size: 1.05rem;
  font-weight: 700;
}

.ead-video-modal .modal-body {
  background: var(--ead-sidebar);
  padding: 0;
}

.ead-video-modal video {
  background: var(--ead-sidebar);
  display: block;
  max-height: calc(100vh - 160px);
  width: 100%;
}

.main-footer {
  background: var(--ead-surface);
  border-top: 1px solid var(--ead-border);
  color: var(--ead-muted);
  font-size: .84rem;
  padding: 1rem 1.25rem;
}

.main-footer strong {
  color: #344054;
}

/* Authentication and standalone error experiences */
.auth-ui {
  background: var(--ead-background);
  min-height: 100vh;
}

.auth-layout {
  display: flex;
  margin: 0 auto;
  max-width: 1080px;
  min-height: 100vh;
  padding: 3rem 1.5rem;
  align-items: center;
  gap: 4.5rem;
}

.auth-intro {
  flex: 1;
  max-width: 480px;
}

.auth-brand {
  align-items: center;
  color: var(--ead-ink);
  display: inline-flex;
  font-size: 1.5rem;
  font-weight: 700;
  gap: .7rem;
  margin-bottom: 2.5rem;
}

.auth-intro h1 {
  font-size: 2.45rem;
  font-weight: 750;
  letter-spacing: -.055em;
  line-height: 1.14;
  margin-bottom: 1rem;
}

.auth-intro p {
  color: var(--ead-muted);
  font-size: 1.03rem;
  line-height: 1.65;
}

.auth-benefits {
  display: flex;
  gap: 1.3rem;
  margin-top: 2.3rem;
}

.auth-benefits span {
  color: #475467;
  font-size: .84rem;
  font-weight: 600;
}

.auth-benefits i {
  color: var(--ead-primary);
  margin-right: .35rem;
}

.auth-layout .login-box {
  flex: 0 0 388px;
  margin: 0;
  width: auto;
}

.auth-panel-only {
  justify-content: center;
}

.auth-panel-only .login-box {
  flex-basis: 420px;
}

.auth-card-brand {
  align-items: center;
  color: var(--ead-ink);
  display: inline-flex;
  font-size: 1.22rem;
  font-weight: 700;
  gap: .6rem;
  margin-bottom: 1.6rem;
}

.auth-card-brand .brand-mark {
  font-size: .92rem;
  height: 33px;
  width: 33px;
}

.login-box .card {
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .10);
}

.login-card-body {
  border-radius: 18px;
  padding: 2.15rem 2rem;
}

.login-card-title {
  color: var(--ead-ink);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: .35rem;
}

.login-box-msg {
  color: var(--ead-muted);
  padding: 0 0 1.55rem;
  text-align: left;
}

.login-card-body .input-group-text {
  background: #fff;
  border-color: #d7dde7;
  border-radius: 0 9px 9px 0;
  color: #98a2b3;
}

.login-card-body .form-control {
  border-right: 0;
}

.login-card-body .btn-block {
  min-height: 44px;
}

.auth-link {
  border-top: 1px solid var(--ead-border);
  font-size: .86rem;
  margin: 1.25rem 0 0;
  padding-top: 1.1rem;
}

.auth-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.2rem;
}

.minimal-page {
  background: var(--ead-background);
}

.minimal-page .wrapper {
  min-height: calc(100vh - 57px);
}

body.minimal-page .main-footer {
  margin-left: 0 !important;
  width: 100%;
}

.error-page-modern {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 58px);
  padding: 2rem 1rem;
}

.error-panel {
  background: var(--ead-surface);
  border: 1px solid var(--ead-border);
  border-radius: 20px;
  box-shadow: var(--ead-shadow);
  max-width: 540px;
  padding: 3rem;
  text-align: center;
}

.error-mark {
  align-items: center;
  background: var(--ead-primary-soft);
  border-radius: 50%;
  color: var(--ead-primary);
  display: inline-flex;
  font-size: 1.45rem;
  height: 60px;
  justify-content: center;
  margin-bottom: 1.35rem;
  width: 60px;
}

.error-code {
  color: var(--ead-primary);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.error-panel h1 {
  font-size: 1.6rem;
  font-weight: 720;
  letter-spacing: -.025em;
  margin: .6rem 0 .8rem;
}

.error-panel p {
  color: var(--ead-muted);
  line-height: 1.6;
  margin-bottom: 1.8rem;
}

/* Dark theme components and third-party controls */
html[data-theme="dark"] .wrapper,
html[data-theme="dark"] .minimal-page,
html[data-theme="dark"] .auth-ui {
  background: var(--ead-background);
}

html[data-theme="dark"] .main-header.navbar {
  box-shadow: 0 1px 5px rgba(0, 0, 0, .18);
}

html[data-theme="dark"] .content-header h1,
html[data-theme="dark"] .ead-section-title,
html[data-theme="dark"] .card-title,
html[data-theme="dark"] .card-header h3,
html[data-theme="dark"] .info-box-content h5,
html[data-theme="dark"] .main-footer strong,
html[data-theme="dark"] .auth-brand,
html[data-theme="dark"] .auth-card-brand,
html[data-theme="dark"] .auth-intro h1,
html[data-theme="dark"] .login-card-title,
html[data-theme="dark"] .error-panel h1 {
  color: var(--ead-ink);
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .breadcrumb-item.active {
  color: var(--ead-muted) !important;
}

html[data-theme="dark"] hr {
  border-top-color: var(--ead-border);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .info-box,
html[data-theme="dark"] .ead-resource-panel,
html[data-theme="dark"] .ead-resource-item,
html[data-theme="dark"] .error-panel,
html[data-theme="dark"] .login-card-body,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .dropdown-menu {
  background-color: var(--ead-surface);
  color: var(--ead-ink);
}

html[data-theme="dark"] .form-group strong,
html[data-theme="dark"] .form-group label,
html[data-theme="dark"] label,
html[data-theme="dark"] .dataTables_wrapper,
html[data-theme="dark"] .dataTables_info,
html[data-theme="dark"] .dataTables_length,
html[data-theme="dark"] .dataTables_filter {
  color: #d5dbe5;
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .custom-select,
html[data-theme="dark"] .custom-file-label,
html[data-theme="dark"] .login-card-body .input-group-text,
html[data-theme="dark"] .dataTables_wrapper input,
html[data-theme="dark"] .dataTables_wrapper select,
html[data-theme="dark"] .select2-container--bootstrap4 .select2-selection,
html[data-theme="dark"] .select2-container--default .select2-selection,
html[data-theme="dark"] .select2-dropdown,
html[data-theme="dark"] .select2-search__field {
  background-color: #111925;
  border-color: #334054;
  color: var(--ead-ink);
}

html[data-theme="dark"] .form-control::placeholder {
  color: #7f8a9c;
}

html[data-theme="dark"] .form-control:disabled,
html[data-theme="dark"] .form-control[readonly] {
  background-color: #1b2534;
}

html[data-theme="dark"] .select2-container--bootstrap4 .select2-selection__rendered,
html[data-theme="dark"] .select2-container--default .select2-selection__rendered,
html[data-theme="dark"] .select2-results__option {
  color: var(--ead-ink);
}

html[data-theme="dark"] .select2-results__option--highlighted,
html[data-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: rgba(242, 56, 81, .28);
}

html[data-theme="dark"] .table {
  color: #dbe1eb;
}

html[data-theme="dark"] .table thead th {
  background: #1d2635;
  color: #b8c2d2;
}

html[data-theme="dark"] .table-hover tbody tr:hover {
  background: rgba(242, 56, 81, .08);
  color: var(--ead-ink);
}

html[data-theme="dark"] .page-link {
  background: var(--ead-surface);
  border-color: var(--ead-border);
}

html[data-theme="dark"] .page-item.disabled .page-link {
  background: #121925;
  border-color: var(--ead-border);
  color: #758094;
}

html[data-theme="dark"] .alert-info {
  background: rgba(242, 56, 81, .15);
  color: #ffbac4;
}

html[data-theme="dark"] .alert-danger {
  background: rgba(220, 53, 69, .17);
  color: #ffbac1;
}

html[data-theme="dark"] .alert-warning {
  background: rgba(255, 193, 7, .14);
  color: #f4d276;
}

html[data-theme="dark"] .alert-success {
  background: rgba(40, 167, 69, .18);
  color: #92d5a3;
}

html[data-theme="dark"] .note-editor.note-frame,
html[data-theme="dark"] .note-editor.note-airframe,
html[data-theme="dark"] .note-toolbar,
html[data-theme="dark"] .note-statusbar,
html[data-theme="dark"] .note-editable {
  background: #111925;
  border-color: var(--ead-border);
  color: var(--ead-ink);
}

html[data-theme="dark"] .note-btn {
  background: #202a39;
  border-color: #364256;
  color: #d8dee9;
}

html[data-theme="dark"] .dropzone {
  background: #111925;
  border-color: #384557;
  color: var(--ead-muted);
}

html[data-theme="dark"] .swal2-popup {
  background: var(--ead-surface);
  color: var(--ead-ink);
}

html[data-theme="dark"] .swal2-title,
html[data-theme="dark"] .swal2-content,
html[data-theme="dark"] .close {
  color: var(--ead-ink);
}

html[data-theme="dark"] input:-webkit-autofill,
html[data-theme="dark"] input:-webkit-autofill:hover,
html[data-theme="dark"] input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #111925 inset;
  -webkit-text-fill-color: var(--ead-ink);
}

@media (max-width: 991.98px) {
  .auth-layout {
    display: block;
    padding-top: 2rem;
  }

  .auth-intro {
    margin: 0 auto 2rem;
    text-align: center;
  }

  .auth-intro h1 {
    font-size: 1.9rem;
  }

  .auth-benefits {
    justify-content: center;
    margin-top: 1.4rem;
  }

  .auth-layout .login-box {
    margin: 0 auto;
    max-width: 388px;
  }

  .ead-resource-list {
    max-height: 420px;
  }
}

@media (max-width: 575.98px) {
  .navbar-workspace {
    display: none;
  }

  .content-header {
    padding-top: 1.2rem;
  }

  .card-body,
  .card-header {
    padding: 1rem;
  }

  .ead-hero {
    padding: 1.25rem;
  }

  .ead-hero h2 {
    font-size: 1.22rem;
  }

  .ead-library-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: .7rem;
  }

  .ead-library-total {
    align-self: flex-start;
  }

  .ead-discipline-actions {
    grid-template-columns: 1fr;
  }

  .auth-layout {
    padding: 1.5rem .9rem;
  }

  .auth-intro p,
  .auth-benefits {
    display: none;
  }

  .auth-brand {
    margin-bottom: 1rem;
  }

  .login-card-body {
    padding: 1.5rem 1.2rem;
  }

  .error-panel {
    padding: 2rem 1.25rem;
  }
}

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