:root {
  --color-teal-900: #004d52;
  --color-teal-700: #007a82;
  --color-teal-500: #00a8b4;
  --color-teal-400: #00c5cc;
  --color-teal-200: #7fdfdf;
  --color-teal-50: #d9f5f5;

  --color-yellow-900: #7a6e00;
  --color-yellow-600: #b8a700;
  --color-yellow-400: #ffe536;
  --color-yellow-200: #ffee7a;
  --color-yellow-50: #fff9cc;

  --color-gray-900: #111827;
  --color-gray-700: #374151;
  --color-gray-500: #6b7280;
  --color-gray-300: #d1d5db;
  --color-gray-100: #f3f4f6;
  --color-white: #ffffff;

  --color-success: #16a34a;
  --color-warning: #f59e0b;
  --color-danger: #dc2626;
  --color-info: #00a8b4;

  --color-primary: var(--color-teal-400);
  --color-primary-dark: var(--color-teal-700);
  --color-accent: var(--color-yellow-400);
  --color-sidebar-bg: var(--color-teal-900);
  --color-sidebar-text: var(--color-white);
  --color-page-bg: var(--color-gray-100);
  --color-card-bg: var(--color-white);
  --color-text-primary: var(--color-gray-900);
  --color-text-muted: var(--color-gray-500);
  --color-border: var(--color-gray-300);

  --tmc-shadow-soft: 0 12px 30px rgba(17, 24, 39, 0.08);
  --tmc-shadow-card: 0 16px 38px rgba(0, 77, 82, 0.14);
  --tmc-radius-lg: 1.05rem;
  --tmc-radius-md: 0.8rem;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

html.light-style,
html.dark-style {
  color-scheme: light;
}

body {
  background:
    radial-gradient(circle at 12% -8%, rgba(0, 197, 204, 0.22), transparent 40%),
    radial-gradient(circle at 92% -12%, rgba(255, 229, 54, 0.26), transparent 42%),
    var(--color-page-bg);
  color: var(--color-text-primary);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

.tools-shell {
  min-height: 100vh;
}

.tools-shell .layout-page,
.tools-shell .content-wrapper {
  background: transparent;
}

.tmc-tools-navbar {
  margin-top: 1rem;
  border: 1px solid rgba(0, 122, 130, 0.2);
  border-radius: 1.1rem;
  background: linear-gradient(128deg, #005d63 0%, #008892 52%, #00a8b4 100%);
  box-shadow: 0 16px 42px rgba(0, 77, 82, 0.26);
  padding: 0.95rem 1rem;
}

.tmc-tools-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--color-white);
  text-decoration: none;
}

.tmc-tools-brand:hover {
  color: var(--color-white);
}

.app-brand-logo.demo {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  width: auto;
  min-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
}

.app-brand-logo.demo svg {
  width: 12rem;
  height: 2.7rem;
  display: block;
}

.tmc-tools-brand-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 9.5rem;
  min-height: 2.2rem;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-white);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.25rem 0.65rem;
}

.tmc-tools-brand-meta {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tmc-tools-user-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  border-radius: 0.8rem;
  border: 0;
  background: transparent;
  color: var(--color-white);
  padding: 0.45rem 0.72rem;
  min-width: 11rem;
}

.tmc-tools-user-chip__label {
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.78;
}

.tmc-tools-btn.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  border-radius: 0.78rem;
  font-weight: 700;
  padding: 0.5rem 0.85rem;
}

.tmc-tools-btn.btn i {
  font-size: 0.98rem;
  line-height: 1;
}

.tmc-tools-btn.btn-outline-primary {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

.tmc-tools-btn.btn-outline-primary:hover {
  color: var(--color-teal-900);
  background: var(--color-white);
  border-color: var(--color-white);
}

.tmc-tools-btn.btn-primary {
  color: var(--color-teal-900);
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.tmc-tools-btn.btn-primary:hover {
  color: var(--color-teal-900);
  background: var(--color-yellow-200);
  border-color: var(--color-yellow-200);
}

.tmc-tools-menu-wrap {
  margin-top: 0.95rem;
}

.tmc-tools-menu {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--color-white);
  border: 1px solid rgba(0, 122, 130, 0.16);
  border-radius: 999px;
  padding: 0.38rem;
  box-shadow: var(--tmc-shadow-soft);
}

.tmc-tools-menu__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  color: var(--color-gray-700);
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1;
  text-decoration: none;
  padding: 0.6rem 0.9rem;
}

.tmc-tools-menu__link:hover {
  color: var(--color-teal-700);
  background: rgba(0, 197, 204, 0.12);
}

.tmc-tools-menu__link.is-active {
  color: var(--color-teal-900);
  background: linear-gradient(145deg, rgba(0, 197, 204, 0.28), rgba(127, 223, 223, 0.22));
}

.container-p-y {
  padding-top: 1.25rem !important;
}

.card {
  border: 1px solid rgba(0, 122, 130, 0.12);
  border-radius: var(--tmc-radius-lg);
  box-shadow: var(--tmc-shadow-soft);
  background: var(--color-card-bg);
}

.card .card-header {
  border-bottom: 1px solid rgba(0, 122, 130, 0.12);
  background: transparent;
  padding-top: 1rem;
  padding-bottom: 0.9rem;
}

.card-title {
  color: var(--color-text-primary);
  font-weight: 700;
}

.tmc-tools-hero {
  position: relative;
  overflow: hidden;
  border-radius: 1.2rem;
  border: 1px solid rgba(0, 122, 130, 0.14);
  background: linear-gradient(125deg, #005961 0%, #008b96 54%, #00b0bc 100%);
  color: var(--color-white);
  box-shadow: var(--tmc-shadow-card);
}

.tmc-tools-hero::before {
  content: "";
  position: absolute;
  top: -28%;
  right: -9%;
  width: 17rem;
  height: 17rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 229, 54, 0.45) 0%, transparent 66%);
  pointer-events: none;
}

.tmc-tools-hero .card-body {
  position: relative;
  z-index: 1;
}

.tmc-tools-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  padding: 0.38rem 0.72rem;
  margin-bottom: 0.85rem;
}

.tmc-tools-hero h2,
.tmc-tools-hero h4 {
  color: var(--color-white);
  font-weight: 700;
}

.tmc-tools-hero p,
.tmc-tools-hero .text-muted {
  color: rgba(255, 255, 255, 0.9) !important;
}

.tmc-tools-hero .btn-outline-primary {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.08);
}

.tmc-tools-hero .btn-outline-primary:hover,
.tmc-tools-hero .btn-outline-primary:focus {
  color: var(--color-teal-900);
  border-color: var(--color-white);
  background: var(--color-white);
}

.tmc-tools-kpi-card {
  border-radius: 0.95rem;
  border: 1px solid rgba(0, 122, 130, 0.12);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.96), rgba(217, 245, 245, 0.5));
  box-shadow: var(--tmc-shadow-soft);
}

.tmc-tools-kpi-label {
  color: var(--color-text-muted);
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.tmc-tools-kpi-value {
  color: var(--color-text-primary);
  font-size: 1.86rem;
  font-weight: 800;
  line-height: 1.1;
}

.tmc-tools-kpi-value--accent {
  color: var(--color-teal-700);
}

.tmc-tools-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.tmc-tools-section-head h5 {
  margin: 0;
  font-weight: 700;
  color: var(--color-text-primary);
}

.tmc-tools-section-head p {
  margin: 0;
  color: var(--color-text-muted);
}

.tmc-tools-tool-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tmc-tools-tool-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tmc-tools-tool-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-teal-700);
  font-size: 1.2rem;
  background: linear-gradient(155deg, rgba(0, 197, 204, 0.24), rgba(127, 223, 223, 0.4));
  border: 1px solid rgba(0, 122, 130, 0.2);
}

.tmc-tools-tool-description {
  color: var(--color-text-muted);
  min-height: 3rem;
}

.tmc-tools-tool-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--color-teal-900);
  font-weight: 700;
  font-size: 0.82rem;
  border-radius: 999px;
  background: rgba(0, 197, 204, 0.12);
  border: 1px solid rgba(0, 122, 130, 0.18);
  padding: 0.35rem 0.62rem;
}

.tmc-tools-history-card .table {
  margin-bottom: 0;
}

.tmc-tools-history-card .table thead th {
  color: var(--color-gray-700);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-bottom-width: 1px;
  border-color: rgba(0, 122, 130, 0.16);
  white-space: nowrap;
}

.tmc-tools-history-card .table tbody td {
  vertical-align: middle;
  border-color: rgba(0, 122, 130, 0.08);
}

.tmc-tools-history-card .table-striped > tbody > tr:nth-of-type(odd) > * {
  background: rgba(0, 197, 204, 0.04);
}

.tmc-tools-guide-list {
  margin: 0;
  padding-left: 1.08rem;
}

.tmc-tools-guide-list li {
  margin-bottom: 0.56rem;
  color: var(--color-gray-700);
}

.tmc-tools-form-card .form-control,
.tmc-tools-form-card .form-select {
  border-color: rgba(0, 122, 130, 0.24);
  border-radius: 0.7rem;
  min-height: 2.75rem;
}

.tmc-tools-form-card .form-control:focus,
.tmc-tools-form-card .form-select:focus {
  border-color: rgba(0, 168, 180, 0.75);
  box-shadow: 0 0 0 0.22rem rgba(0, 168, 180, 0.16);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-teal-500), var(--color-teal-400));
  border-color: transparent;
  color: var(--color-white);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, var(--color-teal-700), var(--color-teal-500));
  border-color: transparent;
  color: var(--color-white);
}

.btn-outline-primary {
  border-color: rgba(0, 122, 130, 0.45);
  color: var(--color-teal-700);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  color: var(--color-white);
  border-color: var(--color-teal-700);
  background: var(--color-teal-700);
}

.badge.bg-label-primary {
  color: var(--color-teal-900);
  background: rgba(0, 197, 204, 0.2) !important;
  border: 1px solid rgba(0, 122, 130, 0.18);
}

.badge.bg-label-secondary {
  color: var(--color-gray-700);
  background: rgba(107, 114, 128, 0.12) !important;
  border: 1px solid rgba(107, 114, 128, 0.22);
}

.tmc-page-loader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 48, 52, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.tmc-page-loader.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.tmc-page-loader__content {
  position: relative;
  width: 152px;
  height: 152px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at 35% 30%,
    rgba(255, 255, 255, 0.28),
    rgba(0, 77, 82, 0.55)
  );
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 18px 36px rgba(0, 53, 58, 0.45);
}

.tmc-page-loader__pulse,
.tmc-page-loader__ring {
  position: absolute;
  border-radius: 50%;
}

.tmc-page-loader__pulse {
  width: 100%;
  height: 100%;
  border: 2px solid rgba(0, 197, 204, 0.6);
  animation: tmcLoaderPulse 1.3s ease-out infinite;
}

.tmc-page-loader__ring {
  width: 122px;
  height: 122px;
  border: 2px solid rgba(255, 229, 54, 0.7);
  animation: tmcLoaderSpin 1.9s linear infinite;
}

.tmc-page-loader__icon {
  width: 72px;
  height: 72px;
  z-index: 2;
}

.tmc-page-loader__icon svg,
.tmc-page-loader__icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.tmc-page-loader__label {
  position: absolute;
  bottom: -2.1rem;
  left: 50%;
  transform: translateX(-50%);
  color: #ffffff;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

@keyframes tmcLoaderSpin {
  from {
    transform: rotate(0);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes tmcLoaderPulse {
  0% {
    transform: scale(0.86);
    opacity: 0.78;
  }
  70% {
    transform: scale(1.08);
    opacity: 0.16;
  }
  100% {
    transform: scale(1.15);
    opacity: 0;
  }
}

.alert {
  border-radius: 0.8rem;
}

.tools-slide-container {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.tools-tmc-slide-shell {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(0, 122, 130, 0.18);
  box-shadow: var(--tmc-shadow-soft);
}

.tools-tmc-slide-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1920 / 600;
  object-fit: cover;
  object-position: center;
}

.tools-tmc-slide-caption {
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1rem;
  text-align: left;
  background: rgba(0, 77, 82, 0.78);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
}

.tools-tmc-slide-caption h5 {
  color: #fff;
  margin-bottom: 0.25rem;
}

.tools-tmc-slide-caption p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0;
}

.tmc-image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
}

.tmc-image-item {
  position: relative;
  background: #fff;
  border: 1px dashed rgba(0, 122, 130, 0.45);
  border-radius: 0.6rem;
  padding: 0.35rem;
  cursor: grab;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tmc-image-item-over {
  border-color: rgba(0, 168, 180, 0.8);
  box-shadow: 0 0.35rem 0.75rem rgba(0, 168, 180, 0.2);
}

.tmc-image-item-dragging {
  opacity: 0.6;
  cursor: grabbing;
}

.tmc-image-thumb {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 0.45rem;
  display: block;
}

.tmc-image-meta {
  font-size: 0.72rem;
  margin-top: 0.35rem;
  text-align: center;
  color: #56606c;
  word-break: break-word;
}

.tmc-image-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.95);
  color: #b42318;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

.tmc-image-remove:hover {
  background: #fff;
}

.tmc-pdf-editor-page {
  border: 1px solid rgba(0, 122, 130, 0.22);
  border-radius: 0.8rem;
  background: #fff;
  padding: 0.85rem;
  overflow-x: auto;
}

.tmc-pdf-editor-page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  color: #455163;
  font-size: 0.82rem;
}

.tmc-pdf-editor-stage {
  position: relative;
  border: 1px solid #dbe3ec;
  border-radius: 0.55rem;
  overflow: hidden;
  background: #fff;
  display: inline-block;
}

.tmc-pdf-editor-canvas {
  display: block;
  width: auto;
  height: auto;
}

.tmc-pdf-editor-overlay {
  position: absolute;
  top: 0;
  left: 0;
}

.tmc-pdf-line-input {
  position: absolute;
  border: 1px dashed transparent;
  background: transparent;
  color: transparent;
  line-height: 1.08;
  padding: 1px 2px;
  border-radius: 3px;
  min-width: 8px;
  caret-color: #111827;
  text-shadow: none;
  outline: 0;
  cursor: text;
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.tmc-pdf-line-input:hover {
  border-color: rgba(0, 122, 130, 0.26);
}

.tmc-pdf-line-input.is-active,
.tmc-pdf-line-input.is-edited {
  background: rgba(255, 255, 255, 0.97);
  color: #111827;
  border-color: rgba(0, 122, 130, 0.38);
}

.tmc-pdf-line-input:focus {
  background: rgba(255, 255, 255, 0.98);
  color: #111827;
  border-color: rgba(0, 122, 130, 0.46);
  box-shadow: 0 0 0 2px rgba(0, 168, 180, 0.2);
}

@media (max-width: 991.98px) {
  .tools-slide-container {
    margin-top: 0.8rem;
  }

  .tmc-tools-navbar {
    padding: 0.8rem;
  }

  .app-brand-logo.demo svg {
    width: 10.9rem;
    height: 2.45rem;
  }

  .tmc-tools-brand-meta,
  .tmc-tools-user-chip {
    display: none;
  }

  .tmc-tools-menu {
    width: 100%;
    justify-content: center;
  }

  .tools-tmc-slide-caption {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  .tmc-tools-navbar {
    margin-top: 0.75rem;
    padding: 0.74rem;
    border-radius: 0.9rem;
  }

  .tmc-tools-btn.btn {
    padding: 0.46rem 0.72rem;
    font-size: 0.76rem;
  }

  .tmc-tools-menu {
    border-radius: 0.8rem;
  }

  .tmc-tools-menu__link {
    font-size: 0.8rem;
    padding: 0.52rem 0.72rem;
  }

  .tmc-tools-kpi-value {
    font-size: 1.55rem;
  }

  .tmc-page-loader__content {
    width: 128px;
    height: 128px;
  }

  .tmc-page-loader__ring {
    width: 102px;
    height: 102px;
  }

  .tmc-page-loader__icon {
    width: 58px;
    height: 58px;
  }

  .tmc-page-loader__label {
    bottom: -1.9rem;
    font-size: 0.76rem;
  }
}
