@import url("base/variables.css");
@import url("themes/theme-light.css");
@import url("themes/theme-blue.css");
@import url("themes/theme-dark.css");
@import url("base/reset.css");
@import url("base/typography.css");
@import url("base/utilities.css");
@import url("layout/app-shell.css");
@import url("layout/header.css");
@import url("layout/sidebar.css");
@import url("layout/content.css");
@import url("layout/right-panel.css");
@import url("layout/footer.css");
@import url("components/buttons.css");
@import url("components/forms.css");
@import url("components/tables.css");
@import url("components/drawers.css");
@import url("components/modals.css");
@import url("components/badges.css");
@import url("components/cards.css");
@import url("components/filters.css");
@import url("components/pagination.css");
@import url("components/toast.css");
@import url("components/empty-state.css");
@import url("components/smart-select.css");
@import url("components/date-picker.css");
@import url("components/advanced-search.css");
@import url("components/column-chooser.css");
@import url("components/form-action-bar.css");
@import url("components/phone-dialer.css");
@import url("../../pages/dashboard/assets/css/dashboard.css");
@import url("../../pages/master/assets/css/master.css");
@import url("../../pages/branch/assets/css/branch.css");
@import url("../../pages/user/assets/css/user.css");
@import url("../../pages/profile/assets/css/profile.css");
@import url("../../pages/resource/assets/css/resource.css");
@import url("../../pages/contact/assets/css/contact.css");
@import url("../../pages/lead/assets/css/lead.css");
@import url("../../pages/campaign/assets/css/campaign.css");
@import url("../../pages/master-manager/modules/assets/css/modules-builder.css");
@import url("../../pages/master-manager/menu/assets/css/menu-builder.css");
@import url("../../pages/master-manager/package/assets/css/package-builder.css");

body,
.app-content {
  background: var(--app-bg);
}

.text-muted {
  color: var(--app-muted) !important;
}

@media (max-width: 767.98px) {
  .context-select {
    max-width: none;
    flex: 1 1 140px;
  }

  .context-control {
    width: 100%;
    flex: 1 1 160px;
  }
}
.activity-timeline {
  position: relative;
  display: grid;
  gap: 1rem;
  padding-left: 1rem;
}

.activity-timeline::before {
  content: "";
  position: absolute;
  top: 0.35rem;
  bottom: 0.35rem;
  left: 0.45rem;
  width: 2px;
  background: #d7e1ef;
}

.timeline-item {
  position: relative;
  padding-left: 1rem;
}

.timeline-dot {
  position: absolute;
  top: 0.35rem;
  left: -0.94rem;
  width: 0.8rem;
  height: 0.8rem;
  border: 2px solid #2672ea;
  border-radius: 50%;
  background: #fff;
}

.timeline-content {
  border: 1px solid #d7e1ef;
  border-radius: 8px;
  padding: 0.85rem;
  background: #fff;
}

.app-table tbody tr:last-child td {
  border-bottom-width: 0;
}

.entity-label-row,
.contact-point-label {
  padding-bottom: 10px;
}

.contact-point-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.contact-input-row {
  display: grid;
  align-items: stretch;
  border: 1px solid #c8d6e8;
  border-radius: 8px;
  background: #fff;
  overflow: visible;
  min-height: 2.375rem;
}

.contact-input-row-email {
  grid-template-columns: 4rem minmax(0, 1fr) 4rem;
}

.contact-input-row-phone {
  grid-template-columns: 5.5rem minmax(0, 1fr) 4rem 4rem;
}

.contact-input-row > .form-control,
.contact-input-row > .smart-select .smart-select-control {
  min-height: 2.375rem;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
}

.module-users .contact-input-row > .form-control,
.module-users .contact-input-row > .smart-select .smart-select-control {
  gap: 0.25rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.contact-input-row > .form-control:focus,
.contact-input-row > .smart-select .smart-select-control:focus {
  position: relative;
  z-index: 1;
}

.contact-input-row > .form-control:not(:last-child),
.contact-input-row > .smart-select:not(:last-child) .smart-select-control {
  border-right: 1px solid #c8d6e8;
}

.contact-input-row > .form-control::placeholder {
  color: #94a3b8;
}

.contact-point-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid #c8d6e8;
  border-radius: 8px;
  background: #eef5ff;
  color: #17233a;
  font-size: 0.9rem;
}

.contact-point-tag.is-default {
  border-color: #0d6efd;
  background: #0d6efd;
  color: #fff;
}

.contact-point-tag button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #66768f;
}

.contact-point-tag .contact-point-edit {
  width: auto;
  max-width: 24rem;
  height: auto;
  min-width: 0;
  justify-content: flex-start;
  padding: 0;
  border-radius: 0;
  color: inherit;
  text-align: left;
}

.contact-point-tag button:hover {
  background: #dbe8fb;
  color: #17233a;
}

.contact-point-tag.is-default button {
  color: #fff;
}

.contact-point-tag.is-default button:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.contact-point-tag .contact-point-edit:hover {
  background: transparent;
  color: #0d6efd;
}

.contact-point-tag.is-default .contact-point-edit:hover {
  color: #fff;
}

.entity-label-row {
  padding-bottom: 10px;
}

.entity-combo-row {
  display: grid;
  width: 100%;
  overflow: visible;
  border: 1px solid #c8d6e8;
  border-radius: 8px;
  background: #fff;
  min-height: 2.375rem;
}

.module-tasks .task-context-row > [class*="col-"],
.module-tasks .task-assignment-row > [class*="col-"] {
  min-width: 0;
}

.module-tasks .task-context-row .entity-label-row,
.module-tasks .task-assignment-row .entity-label-row {
  min-height: 1.7rem;
  padding-bottom: 10px;
}

@media (min-width: 768px) {
  .module-tasks .task-context-row,
  .module-tasks .task-assignment-row {
    display: grid;
    align-items: start;
  }

  .module-tasks .task-context-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .module-tasks .task-assignment-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .module-tasks .task-context-row > [class*="col-"],
  .module-tasks .task-assignment-row > [class*="col-"] {
    width: auto;
  }
}

.entity-combo-row .form-control,
.entity-combo-row .form-select,
.entity-combo-row .smart-select .smart-select-control {
  min-height: 2.375rem;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0.375rem 0.5rem;
  gap: 0.25rem;
}

.entity-combo-row .form-control:not(:last-child),
.entity-combo-row .form-select:not(:last-child),
.entity-combo-row .smart-select:not(:last-child) .smart-select-control {
  border-right: 1px solid #c8d6e8;
}

.phone-combo-row {
  grid-template-columns: 5.5rem minmax(0, 1fr) 4rem 4rem;
}

.email-combo-row {
  grid-template-columns: 4rem minmax(0, 1fr) 4rem;
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .module-users .contact-input-row-phone {
    grid-template-columns: 5.25rem minmax(0, 1fr) 3.75rem 3.75rem;
  }
}

.entity-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.entity-chip,
.entity-file-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid #c8d6e8;
  border-radius: 8px;
  background: #eef5ff;
  color: #17233a;
}

.entity-chip.is-default {
  border-color: #0d6efd;
  background: #0d6efd;
  color: #fff;
}

.entity-chip .entity-chip-edit {
  width: auto;
  max-width: 24rem;
  height: auto;
  min-width: 0;
  justify-content: flex-start;
  padding: 0;
  border-radius: 0;
  color: inherit;
  text-align: left;
}

.entity-chip-address {
  max-width: 100%;
}

.entity-chip button,
.entity-file-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #66768f;
}

.entity-chip button:hover,
.entity-file-row button:hover {
  background: #dbe8fb;
  color: #17233a;
}

.entity-chip.is-default button {
  color: #fff;
}

.entity-chip.is-default button:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.entity-chip .entity-chip-edit:hover {
  background: transparent;
  color: #0d6efd;
}

.entity-chip.is-default .entity-chip-edit:hover {
  color: #fff;
}

.entity-file-list {
  display: grid;
  gap: 1rem;
}

.contact-list-avatar,
.contact-avatar-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: #eef5ff;
  color: #0b5cab;
  font-weight: 700;
}

.contact-list-avatar {
  width: 2.25rem;
  height: 2.25rem;
  font-size: 0.8rem;
}

.contact-avatar-preview {
  width: 7rem;
  height: 7rem;
  border: 1px solid #c8d6e8;
  font-size: 2rem;
}

.contact-profile-image {
  min-width: 8rem;
}

.contact-profile-image .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.contact-list-avatar img,
.contact-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.resource-file-toggle,
.resource-file-hide {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-weight: 700;
  padding: 0;
}

.resource-file-hide {
  color: #c62828;
  margin-bottom: 0.75rem;
}

.resource-file-panel {
  margin-top: 1rem;
}

.resource-file-dropzone {
  display: grid;
  place-items: center;
  min-height: 10rem;
  border: 2px dashed #6f778b;
  color: #6f778b;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  background: #fff;
}

.resource-file-dropzone.is-dragging {
  border-color: #2563eb;
  background: #eef5ff;
  color: #17233a;
}

.resource-file-row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.85rem 0;
  border: 0;
  border-bottom: 1px solid #e1e8f2;
  background: transparent;
}

.resource-file-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.resource-file-row.is-editing .resource-file-actions {
  display: none;
}

.resource-file-main {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.resource-file-display {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.resource-file-main strong,
.resource-file-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-file-main span {
  color: #66768f;
  font-size: 0.9rem;
}

.resource-file-main small {
  color: #51627d;
}

.resource-file-edit {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid #c8d6e8;
  border-radius: 8px;
  background: #f8fbff;
}

.resource-file-edit-field {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  color: #17233a;
  font-weight: 600;
}

.resource-file-edit-field span {
  font-size: 0.85rem;
  color: #51627d;
}

.resource-file-edit-field .form-control {
  border-color: #c8d6e8;
  background: #fff;
  min-height: 2.75rem;
}

.resource-file-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.resource-file-inline-action {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #c8d6e8;
  border-radius: 8px;
  background: #fff;
  color: #17233a;
  line-height: 1;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.resource-file-edit-save:hover,
.resource-file-edit-save:focus {
  border-color: #198754;
  color: #198754;
  background: #ecfdf3;
}

.resource-file-edit-cancel:hover,
.resource-file-edit-cancel:focus {
  border-color: #dc3545;
  color: #dc3545;
  background: #fff1f2;
}

.resource-file-preview-modal .modal-content {
  border: 1px solid #c8d6e8;
  border-radius: 8px;
  overflow: hidden;
}

.resource-file-preview-modal .modal-header {
  border-bottom: 1px solid #d7e0ec;
  background: #f8fbff;
}

.resource-file-preview-modal .modal-body {
  min-height: 60vh;
  padding: 1rem;
  background: #f5f7fb;
}

.resource-file-preview-loading,
.resource-file-preview-empty {
  min-height: 55vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1rem;
  color: #66768f;
  text-align: center;
}

.resource-file-preview-empty h1 {
  margin: 0;
  color: #17233a;
  font-size: 1.35rem;
}

.resource-file-preview-empty p {
  margin: 0;
}

.resource-file-preview-mark {
  width: 4rem;
  height: 4rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e8eef7;
  color: #51627d;
  font-size: 1.6rem;
}

.resource-file-preview-media {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.resource-file-preview-frame {
  width: 100%;
  min-height: 72vh;
  border: 1px solid #d7e0ec;
  border-radius: 8px;
  background: #fff;
}

.resource-pdf-preview {
  display: grid;
  gap: 1rem;
}

.resource-pdf-preview-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #d7e0ec;
  border-radius: 8px;
  background: #fff;
  color: #52647e;
  font-weight: 700;
}

.resource-pdf-preview-pages {
  display: grid;
  gap: 1.25rem;
  justify-items: center;
}

.resource-pdf-preview-page {
  max-width: 100%;
  padding: 0.85rem;
  border: 1px solid #d7e0ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 34, 64, 0.08);
}

.resource-pdf-preview-page-number {
  margin-bottom: 0.65rem;
  color: #66768f;
  font-size: 0.85rem;
  font-weight: 700;
}

.resource-pdf-preview-page canvas {
  display: block;
  max-width: 100%;
  height: auto !important;
}

@media (max-width: 767.98px) {
  .contact-input-row,
  .contact-input-row-email,
  .contact-input-row-phone,
  .entity-combo-row,
  .phone-combo-row,
  .email-combo-row {
    grid-template-columns: 1fr;
  }

  .contact-input-row > .form-control:not(:last-child),
  .contact-input-row > .smart-select:not(:last-child) .smart-select-control,
  .entity-combo-row .form-control:not(:last-child),
  .entity-combo-row .form-select:not(:last-child),
  .entity-combo-row .smart-select:not(:last-child) .smart-select-control {
    border-right: 0;
    border-bottom: 1px solid #c8d6e8;
  }

  .resource-file-row {
    grid-template-columns: 2rem minmax(0, 1fr);
  }

  .resource-file-actions {
    grid-column: 2;
    justify-content: flex-end;
  }
}
