.modal.fade .modal-dialog {
  transform: scale(0.8);
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.modal.show .modal-dialog {
  transform: scale(1);
}

.modal-content {
  border: 1px solid var(--db-primary) !important;
  animation: modalGlow 1.5s ease-out;
  background: rgba(30, 41, 59, 0.95) !important;
  backdrop-filter: blur(10px);
}

@keyframes modalGlow {
  0% {
    box-shadow: 0 0 0 rgba(99, 102, 241, 0);
  }

  50% {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
  }

  100% {
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
  }
}

#editServiceModalBody form {
  animation: fadeInUp 0.4s ease-out forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.focus-neon:focus {
  background-color: #1e293b !important;
  border-color: #6366f1 !important;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
  color: white;
}

.form-control {
  transition: all 0.3s ease;
}

.form-control::placeholder {
  color: #a0a0a0 !important;
  opacity: 1 !important;
}

.focus-neon::placeholder {
  color: #adb5bd !important;
}

.icon-grid {
  max-height: 200px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 5px;
  padding: 10px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #0f172a;
}

.icon-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  font-size: 1.2rem;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 4px;
}

.icon-item:hover {
  background: var(--db-primary);
  color: white;
  transform: scale(1.1);
}

.icon-item.selected {
  background: var(--db-primary);
  color: white;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.search-icons {
  margin-bottom: 10px;
}

.db-activity-feed {
  background: var(--db-bg-card);
  border: 1px solid var(--db-border-color);
  border-radius: 16px;
  padding: 1.5rem;
  animation: db-fadeInUp 0.6s ease-out 0.6s;
  animation-fill-mode: both;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Syne:wght@700;800&display=swap');

:root {
  --bg: #0f1117;
  --surface: #161822;
  --surface-alt: #1e2130;
  --border: #2a2d3a;
  --text: #e2e4ea;
  --text-dim: #6b7080;
  --accent: #5b7fff;
  --accent-glow: rgba(91, 127, 255, .22);
  --danger: #f25c5c;
  --danger-glow: rgba(242, 92, 92, .18);
  --radius: 10px;
  --radius-sm: 6px;
  --ease: .22s cubic-bezier(.4, 0, .2, 1);
}

.cat-page {
  font-family: 'Inter', sans-serif;
  background: var(--db-bg-card);
  color: var(--text);
  padding: 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

.cat-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.cat-header h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.9rem;
  letter-spacing: -.025em;
  color: #fff;
  margin: 0;
}

.cat-header h1 .grad {
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-new-cat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: .58rem 1.15rem;
  font-family: inherit;
  font-size: .81rem;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  transition: var(--ease);
  box-shadow: 0 3px 14px var(--accent-glow);
}

.btn-new-cat:hover {
  background: #4a6fe0;
  box-shadow: 0 5px 22px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-new-cat svg {
  width: 13px;
  height: 13px;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 720px) {
  .cat-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .cat-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-new-cat {
    width: 100%;
    justify-content: center;
  }
}

.cat-section {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp .32s cubic-bezier(.4, 0, .2, 1) forwards;
}

.cat-section:nth-child(1) {
  animation-delay: .04s;
}

.cat-section:nth-child(2) {
  animation-delay: .10s;
}

.cat-section:nth-child(3) {
  animation-delay: .16s;
}

.cat-section:nth-child(4) {
  animation-delay: .22s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cat-sec-head {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .6rem;
  padding-left: .1rem;
}

.cat-sec-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.cat-sec-icon svg {
  width: 15px;
  height: 15px;
}

.cat-sec-head h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  color: #fff;
  margin: 0;
}

.cat-sec-badge {
  font-size: .67rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-glow);
  border-radius: 20px;
  padding: 2px 8px;
}

.cat-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cat-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 300px;
}

.cat-table thead th:nth-child(1) {
  width: 50px;
}

.cat-table thead th:nth-child(3) {
  width: 80px;
}

.cat-table td,
.cat-table th {
  padding: .75rem;
  font-size: 0.85rem;
}

.cat-table thead th {
  text-align: left;
  padding: .6rem .75rem;
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-dim);
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.cat-table thead th:last-child {
  text-align: right;
}

.cat-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .22s cubic-bezier(.4, 0, .2, 1);
}

.cat-table tbody tr:last-child {
  border-bottom: none;
}

.cat-table tbody tr:hover {
  background: var(--surface-alt);
}

.cat-table td:last-child {
  text-align: right;
}

@media (max-width: 400px) {

  .cat-table thead th:nth-child(1),
  .cat-table td:nth-child(1) {
    display: none;
  }
}

.image-preview-wrapper {
  transition: all 0.3s ease;
}

.image-preview-wrapper.marked-for-delete {
  opacity: 0.3;
  filter: grayscale(1);
  pointer-events: none;
}

.img-thumbnail:hover {
  border-color: var(--bs-primary) !important;
}

.id-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 6px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.cat-name {
  white-space: normal;
  word-break: break-word;
  line-height: 1.2;
}

.cat-actions {
  display: inline-flex;
  gap: 5px;
}

.btn-act {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .22s cubic-bezier(.4, 0, .2, 1);
  flex-shrink: 0;
}

.btn-act {
  width: 34px;
  height: 34px;
}

.btn-act.edit:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
}

.btn-act.del:hover {
  border-color: var(--danger);
  background: var(--danger-glow);
  color: var(--danger);
}

.cat-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-dim);
  font-size: .84rem;
}

.cat-empty svg {
  width: 40px;
  height: 40px;
  opacity: .3;
  margin: 0 auto .9rem;
  display: block;
}

.btn-act.info:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
}

.btn-act svg {
  width: 15px;
  height: 15px;
}

.cat-detail-header {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  align-items: center;
}

.cat-detail-title-wrap {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.cat-detail-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.cat-detail-icon svg {
  width: 17px;
  height: 17px;
}

.cat-detail-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.cat-detail-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cat-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--border);
}

.cat-detail-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cat-detail-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-dim);
}

.cat-detail-value {
  font-size: .88rem;
  color: var(--text);
  font-weight: 500;
}

.cat-detail-id {
  font-variant-numeric: tabular-nums;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 10px;
  font-size: .75rem;
  color: var(--text-dim);
}

.cat-detail-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
}

.cat-detail-footer {
  border-top: 1px solid var(--border);
  padding: .85rem 1.5rem;
  justify-content: flex-end;
}


.cat-header .d-flex {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn-new-cat,
.cat-header .btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.25rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  margin: 0;
  min-height: 44px;
}

.btn-new-cat {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 3px 14px var(--accent-glow);
}

.btn-new-cat:hover {
  background: #4a6fe0;
  box-shadow: 0 5px 22px var(--accent-glow);
  transform: translateY(-1px);
}

.cat-header .btn-success {
  background: #10b981;
  color: #fff;
  box-shadow: 0 3px 14px rgba(16, 185, 129, 0.3);
}

.cat-header .btn-success:hover {
  background: #059669;
  box-shadow: 0 5px 22px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.btn-new-cat i,
.cat-header .btn-success i {
  font-size: 0.9rem;
  flex-shrink: 0;
}


@media (max-width: 450px) {
  .cat-header {
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.75rem;
  }

  .cat-header h1 {
    text-align: center;
    width: 100%;
  }

  .cat-header .d-flex {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }

  .btn-new-cat,
  .cat-header .btn-success {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 768px) and (min-width: 451px) {
  .cat-header .d-flex {
    gap: 0.5rem;
  }

  .btn-new-cat,
  .cat-header .btn-success {
    font-size: 0.8rem;
    padding: 0.6rem 1rem;
  }
}

.profile-glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 1.5rem;
}

.profile-item {
  display: flex;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}

.icon-box {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-right: 1.25rem;
}

.bg-grad {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
}

.bg-glass {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-info label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 2px;
}

.profile-info .value {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 500;
}

.btn-change-pass {
  margin-left: auto;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.pdf-cat-header {
  flex-direction: column;
  align-items: stretch;
  gap: 1.25rem;
}

.cat-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.pdf-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pdf-card {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}

.pdf-card:hover {
  border-color: rgba(91, 127, 255, 0.3);
  box-shadow: 0 4px 24px rgba(91, 127, 255, 0.08);
}

.pdf-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pdf-card-number {
  background: rgba(91, 127, 255, 0.15);
  border: 1px solid rgba(91, 127, 255, 0.25);
  color: #a5b4fc;
  font-size: 0.7rem;
  font-weight: 700;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pdf-card-title {
  flex: 1;
  font-weight: 600;
  font-size: 0.9rem;
  color: #e2e8f0;
  letter-spacing: 0.01em;
}

.pdf-card-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.pdf-card-files {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-left: 0.25rem;
}

.pdf-file-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(242, 92, 92, 0.06);
  border: 1px solid rgba(242, 92, 92, 0.12);
  color: #fc8181;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.pdf-file-row:hover {
  background: rgba(242, 92, 92, 0.14);
  border-color: rgba(242, 92, 92, 0.35);
  color: #feb2b2;
  transform: translateX(3px);
}

.pdf-icon {
  color: #fc8181;
  font-size: 0.85rem;
  flex-shrink: 0;
  opacity: 0.85;
}

.pdf-url-text {
  font-size: 0.78rem;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'Inter', monospace;
}

.pdf-open-icon {
  font-size: 0.62rem;
  opacity: 0.4;
  flex-shrink: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.pdf-file-row:hover .pdf-open-icon {
  opacity: 1;
  transform: translate(2px, -2px);
}

.db-nav-dropdown {
  cursor: pointer;
  user-select: none;
}

.db-chevron {
  font-size: 0.68rem;
  margin-left: auto !important;
  flex-shrink: 0;
  transition: transform 0.22s cubic-bezier(.4, 0, .2, 1);
  transform: rotate(0deg);
}

.db-nav-dropdown.open .db-chevron {
  transform: rotate(-180deg);
}

.db-nav-submenu {
  display: none;
  flex-direction: column;
  padding: 2px 0 4px 0;
  overflow: hidden;
}

.db-nav-submenu.open {
  display: flex;
}

.db-nav-subitem {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.52rem 0.75rem 0.52rem 2.75rem;
  border-radius: 8px;
  color: var(--text-dim, #6b7080);
  font-family: 'Inter', sans-serif;
  font-size: 0.81rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  margin: 1px 0;
}

.db-nav-subitem i {
  font-size: 0.85rem;
  flex-shrink: 0;
  opacity: 0.75;
  transition: opacity 0.18s ease;
}

.db-nav-subitem:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text, #e2e4ea);
}

.db-nav-subitem:hover i {
  opacity: 1;
}

.db-nav-subitem.db-active {
  background: var(--accent-glow, rgba(91, 127, 255, 0.22));
  color: var(--accent, #5b7fff);
}

.db-nav-subitem.db-active i {
  color: var(--accent, #5b7fff);
  opacity: 1;
}

.tox-dialog input,
.tox-dialog select,
.tox-dialog textarea {
    pointer-events: all !important;
}