@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --page-bg: #eef4fb;
  --card-bg: #ffffff;
  --text-main: #1f2937;
  --text-soft: #5f6b7b;
  --accent: #0f6bbd;
  --accent-strong: #0b4f8a;
  --line: #d7e1ee;
  --danger: #b52b34;
  --shadow: 0 16px 42px rgba(15, 39, 68, 0.12);
}

body.efi-page,
body.efi-login-page {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 8% 6%, rgba(64, 132, 193, 0.24), transparent 38%),
    radial-gradient(circle at 92% 0%, rgba(36, 99, 171, 0.2), transparent 31%),
    linear-gradient(180deg, #f6f9fd 0%, var(--page-bg) 100%);
  min-height: 100vh;
}

body.efi-login-page {
  position: relative;
  overflow-x: hidden;
  background: #060d18;
}

.app-shell {
  width: calc(100vw - 24px);
  max-width: none;
  margin: 22px auto 34px;
  padding: 0;
}

.app-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.app-title {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #14304f;
}

.app-subtitle {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
}

.app-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 107, 189, 0.11);
  border: 1px solid rgba(15, 107, 189, 0.24);
  color: #12406d;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}

.app-nav-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #dce6f2;
  border-radius: 14px;
  backdrop-filter: blur(4px);
}

.app-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  color: #194975;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  text-decoration: none;
}

.app-link:hover,
.app-link:focus {
  background: #f4f9ff;
  border-color: rgba(15, 107, 189, 0.5);
  color: #0f4372;
  text-decoration: none;
}

.app-link-danger {
  border-color: rgba(181, 43, 52, 0.36);
  color: #8c2028;
}

.app-link-danger:hover,
.app-link-danger:focus {
  border-color: rgba(181, 43, 52, 0.56);
  background: #fff2f2;
  color: #7a1a21;
}

.app-table-card {
  background: #ffffff;
  border: 1px solid #d4dfed;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(14, 44, 76, 0.08);
  padding: 10px 14px 10px;
}

.app-table-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 8px 10px;
  border-bottom: 1px solid #d8e3f1;
  margin-bottom: 8px;
}

.app-table-kicker {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #bdd4eb;
  background: #eaf4ff;
  color: #1e5f95;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-table-title {
  margin: 7px 0 0;
  color: #153a61;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.app-table-desc {
  margin: 4px 0 0;
  color: #647a90;
  font-size: 12px;
  font-weight: 600;
}

.app-table-card .dataTables_wrapper {
  font-size: 12px;
}

.app-table-card .app-grid-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 2px 10px;
}

.app-table-card .app-toolbar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.app-table-card .app-toolbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.app-table-card .app-grid-toolbar .dt-buttons {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.app-table-card .app-main-actions,
.app-table-card .app-layout-actions {
  position: relative;
  padding-top: 20px;
}

.app-table-card .app-main-actions::before,
.app-table-card .app-layout-actions::before {
  position: absolute;
  top: 0;
  left: 0;
  color: #5e7690;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-table-card .app-main-actions::before {
  content: "Actions";
}

.app-table-card .app-layout-actions::before {
  content: "Layout";
}

.app-table-card .app-grid-toolbar .app-search-box {
  margin: 0;
}

.app-table-card .app-grid-toolbar .dataTables_filter label {
  margin: 0;
  color: #345572;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-table-card .app-grid-toolbar .dataTables_filter input {
  min-width: 240px;
  min-height: 38px;
  margin-left: 8px;
  padding: 8px 12px;
  border: 1px solid #b9cde4;
  border-radius: 12px;
  background: #ffffff;
  color: #1f3f5c;
  font-weight: 600;
}

.app-table-card .app-grid-toolbar .app-search-box input::placeholder {
  color: #8da1b6;
}

.app-table-card .app-grid-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 2px 2px;
}

.app-table-card div.dataTables_length select {
  border: 1px solid #b9cde4;
  border-radius: 10px;
  min-height: 34px;
  padding: 4px 8px;
  background: #fff;
  color: #214566;
  font-weight: 700;
}

.app-table-card .dataTables_length label {
  margin: 0;
  color: #4e667f;
  font-size: 12px;
  font-weight: 700;
}

.app-table-card .dt-button,
.app-table-card .btn {
  border-radius: 10px !important;
  border: 1px solid #bfd2e9 !important;
  background: linear-gradient(180deg, #ffffff 0%, #eaf4ff 100%) !important;
  color: #154b7b !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 2px 0 rgba(20, 71, 114, 0.07) !important;
  text-shadow: none !important;
  padding: 7px 10px !important;
}

.app-table-card .dt-button.app-btn-primary,
.app-table-card .btn.app-btn-primary {
  border-color: #a9c7e6 !important;
  background: linear-gradient(180deg, #ffffff 0%, #e4f2ff 100%) !important;
  color: #0e4a7c !important;
}

.app-table-card .dt-button.app-btn-neutral,
.app-table-card .btn.app-btn-neutral {
  border-color: #c5d4e4 !important;
  background: linear-gradient(180deg, #ffffff 0%, #eef3f9 100%) !important;
  color: #34536f !important;
}

.app-table-card .dt-button.app-btn-danger,
.app-table-card .btn.app-btn-danger {
  border-color: #e2c1c5 !important;
  background: linear-gradient(180deg, #fff8f8 0%, #ffe8ea 100%) !important;
  color: #8d2d34 !important;
}

.app-table-card .dt-button:hover,
.app-table-card .btn:hover,
.app-table-card .dt-button:focus,
.app-table-card .btn:focus {
  background: linear-gradient(180deg, #ffffff 0%, #ddecff 100%) !important;
  border-color: #9fbddd !important;
  color: #0f3e67 !important;
  box-shadow: 0 3px 10px rgba(25, 90, 145, 0.16) !important;
}

.app-table-card .dataTables_info {
  color: #60758d !important;
  font-weight: 700;
}

.app-table-card .dataTables_paginate .paginate_button {
  border-radius: 8px !important;
  border: 1px solid transparent !important;
  margin: 0 2px !important;
  background: transparent !important;
  color: #3a5d7e !important;
  font-weight: 700;
  padding: 8px 14px !important;
  min-width: 36px;
  min-height: 36px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.app-table-card .dataTables_paginate .paginate_button.current,
.app-table-card .dataTables_paginate .paginate_button.current:hover {
  background: #e1efff !important;
  border: 1px solid #b5cfee !important;
  color: #154978 !important;
}

.app-table-card .dataTables_paginate .paginate_button:hover {
  background: #eef6ff !important;
  border: 1px solid #d2e4f7 !important;
  color: #255a8a !important;
}

/* Table structure — border-collapse required for scrollX header alignment */
.app-table-card table.dataTable {
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  margin-top: 0 !important;
  width: 100% !important;
}

/* Column headers */
.app-table-card table.dataTable thead th,
.app-table-card table.dataTable tfoot th {
  background: #f2f7fd !important;
  color: #3f5f7f !important;
  border: none !important;
  border-bottom: 2px solid #c8d8eb !important;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 28px 14px 12px !important;
  white-space: nowrap;
  cursor: pointer;
  vertical-align: middle;
  position: relative;
  user-select: none;
  min-height: 44px;
}

/* Entire header cell is the click target for sorting */
.app-table-card table.dataTable thead th:hover {
  background: #e8f0fa !important;
}

/* Sort arrows — position to the right of text */
.app-table-card table.dataTable thead th.sorting,
.app-table-card table.dataTable thead th.sorting_asc,
.app-table-card table.dataTable thead th.sorting_desc {
  background-image: none !important;
}

.app-table-card table.dataTable thead th.sorting::after,
.app-table-card table.dataTable thead th.sorting_asc::after,
.app-table-card table.dataTable thead th.sorting_desc::after {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
}

.app-table-card table.dataTable thead th.sorting::after {
  content: '\2195';
  opacity: 0.25;
  font-size: 14px;
}

.app-table-card table.dataTable thead th.sorting_asc::after {
  content: '\25B2';
  opacity: 0.85;
  color: #0f6bbd;
}

.app-table-card table.dataTable thead th.sorting_desc::after {
  content: '\25BC';
  opacity: 0.85;
  color: #0f6bbd;
}

/* Sticky header bottom edge */
.app-table-card table.dataTable thead th:first-child {
  padding-left: 6px !important;
  padding-right: 6px !important;
}

/* Data rows */
.app-table-card table.dataTable tbody tr {
  background: #ffffff;
  transition: background 0.12s ease;
}

.app-table-card table.dataTable tbody tr:nth-child(even) {
  background: #f9fbfe;
}

.app-table-card table.dataTable tbody td {
  border: none !important;
  border-bottom: 1px solid #e8eff7 !important;
  color: #1d3550;
  vertical-align: middle;
  padding: 9px 10px !important;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
}

.app-table-card table.dataTable tbody td:first-child {
  padding-left: 6px !important;
  padding-right: 6px !important;
}

/* Row hover */
.app-table-card table.dataTable tbody tr:hover td {
  background: #edf4fc !important;
}

/* Selected rows */
.app-table-card table.dataTable tbody tr.selected td {
  background: #dce9fa !important;
  border-bottom-color: #c4d7ed !important;
}

.app-table-card table.dataTable tbody td.cell-truncate {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-table-card table.dataTable tbody td.cell-wrap {
  max-width: 260px;
  white-space: normal;
  word-break: break-word;
}

.app-table-card .grid-chip {
  display: inline-flex;
  align-items: center;
  max-width: 180px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-table-card .grid-chip-blue {
  background: #e7f2ff;
  border: 1px solid #c7ddf5;
  color: #1f5b92;
}

.app-table-card .grid-chip-teal {
  background: #e8f8f5;
  border: 1px solid #c4e6df;
  color: #1d6c5e;
}

.app-table-card .grid-chip-slate {
  background: #eef2f7;
  border: 1px solid #d7e0ea;
  color: #445d76;
}

.app-table-card .grid-chip-gold {
  background: #fff6df;
  border: 1px solid #f0ddad;
  color: #8a6012;
}

.app-table-card .grid-chip-green {
  background: #e8f8ea;
  border: 1px solid #cae7d0;
  color: #1f6b33;
}

.app-table-card .grid-empty {
  color: #92a3b5;
  font-size: 11px;
  font-weight: 700;
}

.app-table-card .grid-thumb {
  width: 66px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d5e3f2;
  box-shadow: 0 1px 6px rgba(20, 59, 97, 0.16);
}

.app-table-card #example tfoot {
  display: none;
}

/* Column search row in header */
.app-table-card table.dataTable thead tr.column-search-row th {
  padding: 4px 4px !important;
  background: #edf3fb !important;
  border-bottom: 1px solid #d4e2f1 !important;
  border-top: none !important;
}

.app-table-card table.dataTable thead tr.column-search-row th::after {
  display: none !important;
}

.app-table-card .column-search-input {
  width: 100%;
  min-width: 40px;
  box-sizing: border-box;
  padding: 4px 6px;
  border: 1px solid #c2d6ec;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #1d3550;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.app-table-card .column-search-input:focus {
  border-color: #0f6bbd;
  box-shadow: 0 0 0 2px rgba(15, 107, 189, 0.12);
}

.app-table-card .column-search-input::placeholder {
  color: #97adc2;
  font-weight: 500;
}

/* Column reorder drag indicator */
.app-table-card table.dataTable thead th {
  cursor: grab;
}

.app-table-card table.dataTable thead th:active {
  cursor: grabbing;
}

.DTCR_clonedTable {
  opacity: 0.8;
  background: #e4f0ff !important;
  box-shadow: 0 4px 16px rgba(15, 107, 189, 0.25);
  border-radius: 6px;
}

.DTCR_pointer {
  border-left: 2px solid #0f6bbd !important;
  z-index: 100;
}

/* Scroll containers — clean edges, no double borders */
.app-table-card .dataTables_scrollHead {
  border-radius: 10px 10px 0 0;
  border: 1px solid #d7e3f1;
  border-bottom: none;
  overflow: hidden !important;
  background: #f2f7fd;
}

.app-table-card .dataTables_scrollBody {
  border: 1px solid #d7e3f1;
  border-top: none;
  border-radius: 0 0 10px 10px;
}

/* Ensure header and body table widths stay in sync */
.app-table-card .dataTables_scrollHead table.dataTable {
  margin-bottom: 0 !important;
}

.app-table-card .dataTables_scrollBody table.dataTable {
  margin-top: 0 !important;
}

.app-table-card .app-multiword-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 9px;
  border: 1px solid #cadef4;
  border-radius: 10px;
  background: #eff6ff;
  color: #34597a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.app-table-card .app-multiword-toggle input {
  margin: 0;
}

#login-bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
}

.login-frame--single {
  width: min(100%, 400px);
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background: rgba(10, 24, 48, 0.72);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(100, 180, 255, 0.08);
  backdrop-filter: blur(24px);
  overflow: hidden;
  animation: loginFadeUp 0.6s ease-out both;
}

@keyframes loginFadeUp {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo-ring {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 2px solid rgba(100, 180, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: logoSpin 8s linear infinite;
  box-shadow: 0 0 20px rgba(100, 180, 255, 0.15);
}

@keyframes logoSpin {
  from { box-shadow: 0 0 20px rgba(100, 180, 255, 0.15), 0 0 0 0 rgba(100, 180, 255, 0.1); }
  50%  { box-shadow: 0 0 30px rgba(100, 180, 255, 0.3), 0 0 60px rgba(100, 180, 255, 0.08); }
  to   { box-shadow: 0 0 20px rgba(100, 180, 255, 0.15), 0 0 0 0 rgba(100, 180, 255, 0.1); }
}

.login-logo-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #8ac4ff;
}

.login-card {
  padding: 36px 32px 30px;
  text-align: center;
}

.login-form-title {
  margin: 0 0 24px;
  color: #e4f0ff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.login-status {
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 15px;
  border: 1px solid rgba(100, 180, 255, 0.2);
  text-align: left;
}

.login-status.alert-info {
  background: rgba(100, 180, 255, 0.1);
  color: #a8d0f7;
}

.login-status.alert-danger {
  background: rgba(255, 80, 80, 0.12);
  color: #ff9090;
  border-color: rgba(255, 80, 80, 0.25);
}

.login-form .form-group {
  margin-bottom: 16px;
  text-align: left;
}

.login-form label {
  display: block;
  margin-bottom: 6px;
  color: rgba(180, 210, 240, 0.8);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-form .form-control {
  min-height: 44px;
  border: 1px solid rgba(100, 180, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #e4f0ff;
  box-shadow: none;
  padding: 9px 14px;
  font-weight: 600;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-form .form-control::placeholder {
  color: rgba(160, 195, 230, 0.4);
}

.login-form .form-control:focus {
  border-color: rgba(100, 180, 255, 0.55);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 3px rgba(100, 180, 255, 0.12);
  color: #ffffff;
}

.login-submit {
  width: 100%;
  min-height: 46px;
  border-radius: 10px;
  border: 1px solid rgba(100, 180, 255, 0.35);
  background: linear-gradient(180deg, rgba(100, 180, 255, 0.2) 0%, rgba(60, 140, 230, 0.25) 100%);
  color: #b8dcff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
}

.login-submit:hover,
.login-submit:focus {
  background: linear-gradient(180deg, rgba(100, 180, 255, 0.3) 0%, rgba(60, 140, 230, 0.4) 100%);
  border-color: rgba(100, 180, 255, 0.6);
  color: #ffffff;
  box-shadow: 0 0 24px rgba(100, 180, 255, 0.2);
}

@media (max-width: 992px) {
  .app-shell {
    width: calc(100vw - 14px);
    margin: 10px auto 20px;
  }

  .app-title {
    font-size: 24px;
  }

  .app-table-card {
    padding: 10px 8px 6px;
    border-radius: 12px;
  }

  .app-table-head {
    padding: 6px 6px 8px;
    margin-bottom: 6px;
  }

  .app-table-title {
    font-size: 18px;
  }

  .app-table-card .app-grid-toolbar {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .app-table-card .app-toolbar-right {
    justify-content: flex-start;
  }

  .app-table-card .app-grid-toolbar .dataTables_filter {
    margin-left: 0;
    width: 100%;
  }

  .app-table-card .app-grid-toolbar .dataTables_filter input {
    width: 100%;
    min-width: 0;
    margin-left: 0;
    margin-top: 6px;
  }

  .app-table-card .dt-button,
  .app-table-card .btn {
    margin-bottom: 5px !important;
  }
}

@media (max-width: 640px) {
  .login-shell {
    padding: 12px;
  }

  .login-frame--single {
    border-radius: 14px;
  }

  .login-card {
    padding: 28px 20px 24px;
  }

  .app-user-pill {
    width: 100%;
    justify-content: center;
  }

  .app-table-kicker {
    font-size: 9px;
  }

  .app-table-desc {
    font-size: 11px;
  }

  .app-table-card table.dataTable tbody td {
    padding: 8px 8px !important;
  }

  .app-table-card .grid-chip {
    max-width: 140px;
  }

  .app-table-card .app-main-actions,
  .app-table-card .app-layout-actions {
    padding-top: 16px;
  }

  .app-nav-row {
    flex-direction: column;
    gap: 6px;
  }

  .app-view-templates {
    width: 100%;
    flex-wrap: wrap;
  }

  .app-view-select {
    width: 100%;
    min-width: 0;
  }

  .app-topbar {
    flex-direction: column;
    gap: 8px;
  }
}

/* Loading skeleton (shown before JS loads) */
.app-loading-skeleton {
  padding: 20px 16px;
}

.app-skel-bar {
  height: 18px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, #e4edf7 25%, #f0f5fc 50%, #e4edf7 75%);
  background-size: 400% 100%;
  animation: efi-shimmer 1.4s ease infinite;
}

.app-skel-bar--short {
  width: 60%;
}

@keyframes efi-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Server-side processing overlay */
.app-table-card .dataTables_processing {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%);
  width: auto !important;
  margin: 0 !important;
  padding: 14px 28px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid #c2d6ec !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 32px rgba(14, 44, 76, 0.18) !important;
  color: #1a4d7c !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em;
  z-index: 100 !important;
  backdrop-filter: blur(4px);
}

.app-table-card .dataTables_processing::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 10px;
  border: 2.5px solid #c2d6ec;
  border-top-color: #0f6bbd;
  border-radius: 50%;
  vertical-align: middle;
  animation: efi-spin 0.7s linear infinite;
}

@keyframes efi-spin {
  to { transform: rotate(360deg); }
}

/* View Templates */
.app-view-templates {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.app-view-select {
  min-width: 180px;
  min-height: 34px;
  border: 1px solid #bfd2e9;
  border-radius: 9px;
  background: #fff;
  color: #194975;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 10px;
  cursor: pointer;
}

.app-view-select:focus {
  border-color: rgba(15, 107, 189, 0.5);
  outline: none;
  box-shadow: 0 0 0 2px rgba(15, 107, 189, 0.12);
}

.app-link-sm {
  font-size: 12px !important;
  padding: 5px 10px !important;
  min-height: 34px;
}

/* Active nav link */
.app-link.app-link-active,
.app-link[href="/index.php"] {
  background: #e4f0ff;
  border-color: rgba(15, 107, 189, 0.45);
  color: #0c3d6b;
  box-shadow: 0 1px 4px rgba(15, 107, 189, 0.12);
}

/* (row transitions are in the table section above) */

/* ===== Checkbox column ===== */
.app-table-card table.dataTable thead th:first-child,
.app-table-card table.dataTable tbody td.select-checkbox {
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  text-align: center;
  vertical-align: middle;
  padding: 0 !important;
}

.app-table-card table.dataTable td.select-checkbox {
  cursor: pointer;
}

/* Hide DataTables default pseudo-element checkboxes */
.app-table-card table.dataTable td.select-checkbox::before,
.app-table-card table.dataTable td.select-checkbox::after {
  display: none !important;
}

/* Real checkbox styling */
.app-table-card .row-check,
.app-table-card .header-check {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #0f6bbd;
  vertical-align: middle;
  margin: 0;
}

/* (selected row styles are in the table section above) */

/* ===== Lightbox modal overlay ===== */
.DTED_Lightbox_Background {
  background: rgba(10, 25, 47, 0.55) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.DTED_Lightbox_Background > div {
  filter: none !important;
  -ms-filter: none !important;
}

/* ===== Lightbox modal container ===== */
.DTED_Lightbox_Wrapper {
  width: min(680px, 94vw) !important;
  margin-left: calc(-1 * min(340px, 47vw)) !important;
}

.DTED_Lightbox_Wrapper .DTED_Lightbox_Container {
  border-radius: 0;
  overflow: visible;
}

.DTED_Lightbox_Wrapper .DTED_Lightbox_Content {
  border: none !important;
  border-radius: 18px !important;
  box-shadow: 0 24px 64px rgba(10, 30, 60, 0.28), 0 0 0 1px rgba(15, 107, 189, 0.1) !important;
  overflow: visible !important;
}

.DTED_Lightbox_Wrapper .DTED_Lightbox_Content > .DTE {
  border: none !important;
  border-radius: 18px !important;
  box-shadow: none !important;
  overflow: hidden;
}

/* ===== Close button ===== */
.DTED_Lightbox_Wrapper .DTED_Lightbox_Close,
.DTE_Bubble .DTE_Bubble_Close {
  top: -8px !important;
  right: -8px !important;
  width: 28px !important;
  height: 28px !important;
  border: 2px solid #fff !important;
  border-radius: 50% !important;
  background: #1f3a5c !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
  cursor: pointer;
  z-index: 100 !important;
  transition: background 0.2s, transform 0.15s;
}

.DTED_Lightbox_Wrapper .DTED_Lightbox_Close:hover,
.DTE_Bubble .DTE_Bubble_Close:hover {
  background: #0f6bbd !important;
  transform: scale(1.1);
  box-shadow: 0 3px 12px rgba(15, 107, 189, 0.35) !important;
}

.DTED_Lightbox_Wrapper .DTED_Lightbox_Close::after,
.DTE_Bubble .DTE_Bubble_Close::after {
  content: '\00d7' !important;
  color: #fff !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 28px !important;
  font-family: "Manrope", sans-serif !important;
  padding-left: 0 !important;
  display: block;
  text-align: center;
}

/* ===== Editor header ===== */
.DTE .DTE_Header {
  position: relative;
  height: auto !important;
  min-height: 52px;
  padding: 16px 20px !important;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%) !important;
  border-bottom: 1px solid #d4e2f1 !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  color: #153a61 !important;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
}

/* ===== Editor body ===== */
.DTE .DTE_Body {
  padding: 52px 0 56px !important;
}

.DTE .DTE_Body .DTE_Body_Content {
  padding: 12px 8px !important;
}

.DTE .DTE_Body .DTE_Body_Content .DTE_Field {
  padding: 6px 16px !important;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: background 0.15s;
}

.DTE .DTE_Body .DTE_Body_Content .DTE_Field:hover {
  background: #f4f9ff !important;
  border-color: #e8f0fa !important;
}

.DTE .DTE_Body .DTE_Body_Content .DTE_Field > label {
  color: #2d4a6a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ===== Editor form inputs ===== */
.DTE .DTE_Field input[type="text"],
.DTE .DTE_Field input[type="number"],
.DTE .DTE_Field input[type="email"],
.DTE .DTE_Field input[type="date"],
.DTE .DTE_Field input[type="tel"],
.DTE .DTE_Field input[type="search"],
.DTE .DTE_Field input[type="url"],
.DTE .DTE_Field input[type="password"],
.DTE .DTE_Field textarea,
.DTE .DTE_Field select {
  min-height: 38px;
  border: 1px solid #c2d6ec;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #1d3550;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.DTE .DTE_Field input:focus,
.DTE .DTE_Field textarea:focus,
.DTE .DTE_Field select:focus {
  border-color: #0f6bbd !important;
  box-shadow: 0 0 0 3px rgba(15, 107, 189, 0.12) !important;
  background: #fff !important;
  outline: none;
}

/* ===== Editor footer ===== */
.DTE .DTE_Footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: auto !important;
  min-height: 56px;
  padding: 12px 20px !important;
  background: #f4f9ff !important;
  border-top: 1px solid #d4e2f1 !important;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.DTE .DTE_Footer .DTE_Form_Buttons {
  float: none !important;
  display: flex;
  gap: 8px;
}

.DTE .DTE_Footer .DTE_Form_Buttons button,
.DTE button.btn {
  float: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  min-width: 90px;
  padding: 8px 18px !important;
  border-radius: 10px !important;
  border: 1px solid #bfd2e9 !important;
  background: linear-gradient(180deg, #fff 0%, #eaf4ff 100%) !important;
  color: #154b7b !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  text-shadow: none !important;
  box-shadow: 0 1px 3px rgba(20, 71, 114, 0.08) !important;
  cursor: pointer;
  transition: all 0.2s;
  margin: 0 !important;
}

.DTE .DTE_Footer .DTE_Form_Buttons button:hover,
.DTE button.btn:hover {
  background: linear-gradient(180deg, #fff 0%, #ddecff 100%) !important;
  border-color: #9fbddd !important;
  box-shadow: 0 3px 10px rgba(25, 90, 145, 0.16) !important;
}

.DTE .DTE_Footer .DTE_Form_Buttons button:focus,
.DTE button.btn:focus {
  border-color: #0f6bbd !important;
  box-shadow: 0 0 0 3px rgba(15, 107, 189, 0.18) !important;
  background: linear-gradient(180deg, #fff 0%, #e4f2ff 100%) !important;
}

.DTE .DTE_Footer .DTE_Form_Buttons button:focus::after,
.DTE button.btn:focus::after {
  display: none !important;
}

/* ===== Multi-value indicator ===== */
.DTE .DTE_Field div.multi-value {
  border: 1px dashed #b0c4de;
  border-radius: 8px;
  padding: 8px 12px;
  background: #f8fbff;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.DTE .DTE_Field div.multi-value:hover {
  background: #eef5ff;
  border-color: #7da7cc;
}

.DTE .DTE_Field div.multi-value span {
  font-size: 12px;
  font-weight: 600;
  color: #4a6a8a;
}

.DTE .DTE_Field div.multi-restore {
  font-size: 12px;
  font-weight: 600;
  color: #0f6bbd;
}

/* ===== Form error ===== */
.DTE .DTE_Form_Error,
.DTE .DTE_Field_Error {
  color: #b52b34 !important;
  font-size: 12px;
  font-weight: 600;
}

/* ===== Bubble editor ===== */
.DTE_Bubble .DTE_Bubble_Liner {
  border: none !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 40px rgba(10, 30, 60, 0.22), 0 0 0 1px rgba(15, 107, 189, 0.1) !important;
  padding: 14px !important;
  background: #fff !important;
}

.DTE_Bubble .DTE_Bubble_Triangle {
  border-color: transparent !important;
  background: #fff !important;
  box-shadow: -1px 1px 2px rgba(0, 0, 0, 0.08);
}

.DTE_Bubble_Background {
  background: rgba(10, 25, 47, 0.35) !important;
  backdrop-filter: blur(2px);
}

/* ===== Inline editor ===== */
.DTE_Inline .DTE_Field input {
  border-radius: 6px !important;
  border: 1px solid #b0c4de !important;
  padding: 4px 8px !important;
  font-size: 12px;
  min-height: 30px;
}

.DTE_Inline .DTE_Field input:focus {
  border-color: #0f6bbd !important;
  box-shadow: 0 0 0 2px rgba(15, 107, 189, 0.15) !important;
  outline: none;
}

.DTE_Inline .DTE_Form_Buttons button {
  border-radius: 6px !important;
  padding: 4px 10px !important;
  min-height: 30px;
  font-size: 11px !important;
  font-weight: 700 !important;
}

/* ===== Select2 in editor ===== */
.select2-container .select2-choice {
  min-height: 38px !important;
  border-radius: 8px !important;
  border-color: #c2d6ec !important;
  padding: 5px 10px;
  display: flex;
  align-items: center;
}

.select2-container.select2-container-active .select2-choice {
  border-color: #0f6bbd !important;
  box-shadow: 0 0 0 3px rgba(15, 107, 189, 0.12);
}

.select2-drop {
  border-radius: 10px !important;
  border: 1px solid #c2d6ec !important;
  box-shadow: 0 8px 24px rgba(10, 30, 60, 0.16) !important;
  overflow: hidden;
  margin-top: 4px;
}

.select2-results .select2-result-label {
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #1d3550;
}

.select2-results .select2-highlighted {
  background: #e4f0ff !important;
  color: #0c3d6b !important;
  border-radius: 6px;
}

/* ===== Processing spinner in editor ===== */
.DTE .DTE_Processing_Indicator span,
.DTE .DTE_Processing_Indicator::before,
.DTE .DTE_Processing_Indicator::after {
  background: #0f6bbd !important;
  border-color: rgba(15, 107, 189, 0.3) !important;
  background-color: rgba(15, 107, 189, 0.2) !important;
}

/* ===== Delete confirmation ===== */
.DTE.DTE_Action_Remove .DTE_Body_Content {
  text-align: center;
  padding: 28px 20px !important;
  font-size: 15px;
  font-weight: 600;
  color: #3a1a1d;
}

/* ===== DateTime picker ===== */
div.editor-datetime {
  border: 1px solid #c2d6ec !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(10, 30, 60, 0.16) !important;
  overflow: hidden;
}

/* ===== DataTables footer bar ===== */
.app-table-card .app-grid-footer {
  padding: 10px 4px 4px;
}

.app-table-card .dataTables_length,
.app-table-card .dataTables_info,
.app-table-card .dataTables_paginate {
  margin: 4px 0;
}

/* ===== Mobile lightbox ===== */
@media only screen and (max-width: 700px) {
  .DTED_Lightbox_Wrapper {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    margin-left: 0 !important;
  }

  .DTED_Lightbox_Wrapper .DTED_Lightbox_Content {
    border-radius: 0 !important;
  }

  .DTED_Lightbox_Wrapper .DTED_Lightbox_Content > .DTE {
    border-radius: 0 !important;
  }

  .DTED_Lightbox_Wrapper .DTED_Lightbox_Close {
    top: 10px !important;
    right: 10px !important;
  }

  .DTE .DTE_Body .DTE_Body_Content .DTE_Field {
    padding: 6px 8px !important;
  }

  .DTE .DTE_Body .DTE_Body_Content .DTE_Field > label {
    float: none !important;
    width: 100% !important;
    padding-bottom: 4px;
  }

  .DTE .DTE_Body .DTE_Body_Content .DTE_Field > .DTE_Field_Input {
    float: none !important;
    width: 100% !important;
  }
}
