/**
 * Hi5 Office - shared UI components (company profile & other JSP pages).
 * Use ho-* classes together with Tailwind utilities where needed.
 */

/* ---- Page shell ---- */
.ho-page-shell {
  min-height: 100vh;
  background-color: #f3f4f6;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ho-layout-with-sidebar {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: calc(100vh - 4rem);
}

@media (min-width: 1024px) {
  .ho-layout-with-sidebar {
    flex-direction: row;
  }
}

/* ---- Header ---- */
.ho-page-header {
  background: linear-gradient(90deg, #4338ca 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 60;
}

.ho-page-header-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.ho-page-header-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  min-width: 0;
  flex: 1 1 auto;
}

.ho-page-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.35;
  word-break: break-word;
  text-align: left;
  margin: 0;
  padding: 0;
}

@media (min-width: 640px) {
  .ho-page-header-inner {
    padding: 0.875rem 1.5rem;
  }

  .ho-page-title {
    font-size: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .ho-page-title {
    font-size: 1.5rem;
  }
}

/* ---- Sidebar ---- */
.ho-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 899;
}

.ho-sidebar-backdrop.is-open {
  display: block;
}

.ho-sidebar {
  background: #eef2ff;
  border-right: 1px solid #e5e7eb;
  padding: 1rem;
  transition: transform 0.3s ease, width 0.3s ease;
  z-index: 1;
}

@media (max-width: 1023px) {
  .ho-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 16rem;
    max-width: 85vw;
    transform: translateX(-100%);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding-top: 4.5rem;
    z-index: 900;
  }

  .ho-sidebar.is-open {
    transform: translateX(0);
  }
}

@media (min-width: 1024px) {
  .ho-sidebar {
    position: relative;
    min-height: calc(100vh - 4rem);
    width: 16rem;
    flex-shrink: 0;
    z-index: 1;
  }

  .ho-sidebar.is-collapsed {
    width: 5rem;
  }

  .ho-sidebar.is-collapsed .ho-sidebar-title,
  .ho-sidebar.is-collapsed .sidebar-text {
    display: none;
  }
}

.ho-sidebar-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #4338ca;
  margin-bottom: 1rem;
}

.ho-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ho-sidebar-link,
.ho-sidebar-nav .submenu-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  color: #374151;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color 0.2s, color 0.2s;
}

.ho-sidebar-link:hover,
.ho-sidebar-nav .submenu-link:hover {
  background: #e0e7ff;
}

.ho-sidebar-link-active,
.ho-sidebar-nav .submenu-link.font-medium.text-indigo-700.bg-indigo-100 {
  background: #e0e7ff !important;
  color: #4338ca !important;
  font-weight: 600;
}

/* ---- Main content ---- */
.ho-main-content {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 1rem;
  transition: padding 0.3s ease;
}

@media (min-width: 640px) {
  .ho-main-content {
    padding: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .ho-main-content {
    padding: 2rem;
  }
}

/* ---- Cards ---- */
.ho-card {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid #f3f4f6;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .ho-card {
    padding: 1.5rem;
  }
}

.ho-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .ho-card-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.ho-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1f2937;
}

@media (min-width: 640px) {
  .ho-card-title {
    font-size: 1.35rem;
  }
}

.ho-card-subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.75rem;
}

/* ---- Tables ---- */
.ho-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid #e5e7eb;
}

.ho-info-table {
  width: 100%;
  border-collapse: collapse;
}

.ho-info-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
}

.ho-info-table td,
.ho-info-table th {
  padding: 0.75rem 0.5rem;
  vertical-align: top;
  text-align: left;
}

.ho-info-table td:first-child,
.ho-info-table th:first-child {
  font-weight: 600;
  color: #374151;
  width: 33%;
}

.ho-info-table td:last-child,
.ho-info-table th:last-child {
  color: #4b5563;
}

@media (max-width: 639px) {
  .ho-info-table thead {
    display: none;
  }

  .ho-info-table tr {
    display: block;
    margin-bottom: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #fafafa;
  }

  .ho-info-table td {
    display: block;
    width: 100% !important;
    padding: 0.35rem 0;
    border: none;
  }

  .ho-info-table td:first-child {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
    padding-bottom: 0.15rem;
  }

  .ho-info-table td:last-child {
    padding-bottom: 0.5rem;
  }
}

/* Data tables inside company profile main area */
#surveyProDatas table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

#surveyProDatas .ho-info-table {
  width: 100%;
}

#surveyProDatas .overflow-x-auto,
.ho-data-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0.5rem;
}

.ho-data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.ho-data-table th,
.ho-data-table td {
  word-break: break-word;
}

#surveyProDatas .overflow-x-auto > table,
#surveyProDatas .ho-data-table-wrap > table,
#surveyProDatas table.min-w-full,
#surveyProDatas table.ho-data-table {
  width: 100%;
  min-width: 100%;
}

@media (max-width: 639px) {
  #surveyProDatas .overflow-x-auto > table,
  #surveyProDatas .ho-data-table-wrap > table,
  #surveyProDatas table.min-w-full,
  #surveyProDatas table.ho-data-table {
    min-width: 36rem;
    width: max-content;
  }
}

/* ---- Buttons ---- */
.ho-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.ho-btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.ho-btn-primary {
  background: #4f46e5;
  color: #fff;
}

.ho-btn-primary:hover {
  background: #4338ca;
}

.ho-btn-success {
  background: #16a34a;
  color: #fff;
}

.ho-btn-success:hover {
  background: #15803d;
}

.ho-btn-danger {
  background: #dc2626;
  color: #fff;
}

.ho-btn-danger:hover {
  background: #b91c1c;
}

.ho-btn-secondary {
  background: #e5e7eb;
  color: #1f2937;
}

.ho-btn-secondary:hover {
  background: #d1d5db;
}

.ho-btn-icon {
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
  cursor: pointer;
}

.ho-btn-icon:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Legacy bootstrap buttons inside company profile */
#root_company .btn,
#surveyProDatas .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

#root_company .btn-primary,
#surveyProDatas .btn-primary {
  background: #4f46e5;
  color: #fff;
}

#root_company .btn-success,
#surveyProDatas .btn-success {
  background: #16a34a;
  color: #fff;
}

#root_company .btn-info,
#surveyProDatas .btn-info {
  background: #2563eb;
  color: #fff;
}

#root_company .form-control,
#surveyProDatas .form-control,
#surveyProDatas .inTextBorder {
  width: 100%;
  max-width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

/* ---- Forms ---- */
.ho-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .ho-form-row {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .ho-form-row .ho-form-label {
    width: 33.333%;
    flex-shrink: 0;
    margin-bottom: 0;
  }

  .ho-form-row .ho-form-control-wrap {
    flex: 1;
    min-width: 0;
  }
}

.ho-form-label {
  font-weight: 500;
  color: #374151;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.ho-form-input,
.ho-form-select,
.ho-form-textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
}

.ho-form-input:focus,
.ho-form-select:focus,
.ho-form-textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.ho-form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 1rem;
}

/* ---- Modals ---- */
.ho-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.ho-modal-overlay.is-open,
.ho-modal-overlay:not(.hidden) {
  display: flex;
}

.ho-modal-box {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 28rem;
  max-height: calc(100vh - 2rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ho-modal-box-lg {
  max-width: 48rem;
}

.ho-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}

.ho-modal-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #374151;
}

.ho-modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
}

.ho-modal-close:hover {
  color: #111827;
}

.ho-modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.ho-modal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid #e5e7eb;
}

/* ---- Alerts & empty states ---- */
.ho-alert {
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

.ho-alert-warning {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  color: #92400e;
}

.ho-alert-info {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  color: #1e40af;
}

.ho-empty-state {
  text-align: center;
  color: #6b7280;
  padding: 1.5rem 1rem;
  font-size: 0.9rem;
}

/* ---- List cards (notice, news, etc.) ---- */
.ho-list-card {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #f3f4f6;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .ho-list-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ---- Validation (shared with company.css patterns) ---- */
#root_company label.error,
#surveyProDatas label.error,
.companyVal label.error {
  color: #dc2626;
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: block;
}

#root_company input.error,
#surveyProDatas input.error,
.companyVal input.error {
  border: 1px solid #f97316 !important;
}

/* ---- Utility ---- */
.ho-hide {
  display: none !important;
}

/* Align legacy Tailwind card markup inside company profile content */
#surveyProDatas .bg-white.rounded-xl.shadow-md,
#surveyProDatas .bg-white.rounded-xl.shadow-md.p-4,
#surveyProDatas .bg-white.rounded-xl.shadow-md.p-6 {
  border: 1px solid #f3f4f6;
}

#surveyProDatas .flex.justify-between.items-center.mb-4 {
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 639px) {
  #surveyProDatas .flex.justify-between.items-center,
  #surveyProDatas .ho-list-card {
    align-items: flex-start;
  }

  #surveyProDatas .overflow-x-auto.bg-white.rounded-xl.shadow-md .flex.items-center.gap-4 {
    flex-direction: column;
    align-items: stretch;
  }

  #surveyProDatas .overflow-x-auto.bg-white.rounded-xl.shadow-md .flex.items-center.gap-4 select,
  #surveyProDatas .overflow-x-auto.bg-white.rounded-xl.shadow-md .flex.items-center.gap-4 button {
    width: 100%;
  }
}

/* Hi5 Office brand logo — consistent size on internal app pages */
img[src*="hi5logo.png"],
img[src*="hi5OfficeNewLogo"] {
  height: 44px;
  width: auto;
  object-fit: contain;
}

/* ---- Subscription Plan Notification (spn-*) — new rules only ---- */
#root_spn_profile {
  margin-top: 0;
}

#root_spn_profile .ho-page-header {
  background: linear-gradient(90deg, #05053d 0%, #1a1a7a 55%, #5b1a62 100%);
}

#root_spn_profile .spn-page-eyebrow {
  margin: 0 0 0.15rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

#root_spn_profile .spn-header-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

#root_spn_profile .spn-header-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

#root_spn_profile .spn-panel {
  display: none;
}

#root_spn_profile .spn-panel.is-active {
  display: block;
}

#root_spn_profile .spn-section-desc {
  margin: 0;
  font-size: 0.875rem;
  color: #4b5563;
}

#root_spn_profile .spn-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  #root_spn_profile .spn-form-grid {
    grid-template-columns: 1fr 1fr;
  }

  #root_spn_profile .spn-form-grid .spn-form-full {
    grid-column: 1 / -1;
  }
}

#root_spn_profile .spn-info-banner {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid #e8e0ec;
  background: #f8f5fa;
  color: #5b1a62;
  font-size: 0.875rem;
}

#root_spn_profile .spn-action-btns {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

#root_spn_profile .ho-data-table tbody tr:hover {
  background: #f8f5fa;
}

/* SPN modals must sit above sticky page header (60) and app navbar (~1030) */
#root_spn_profile .ho-modal-overlay {
  z-index: 10050;
}

/* Notification Master table — company_list style (scoped, new only) */
#root_spn_profile .spn-table-card {
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 12px 40px rgba(91, 26, 98, 0.12);
}

#root_spn_profile .spn-table-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
  background: linear-gradient(90deg, #05053d 0%, #1a1a7a 55%, #5b1a62 100%);
}

@media (min-width: 640px) {
  #root_spn_profile .spn-table-card-header {
    flex-direction: row;
    align-items: center;
  }
}

#root_spn_profile .spn-table-card-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

#root_spn_profile .spn-table-card-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
}

#root_spn_profile .spn-table-empty {
  padding: 3.5rem 1.5rem;
  text-align: center;
}

#root_spn_profile .spn-table-empty-icon {
  margin: 0 auto 1rem;
  display: flex;
  height: 3.5rem;
  width: 3.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: #f3eef5;
  color: #5b1a62;
  font-size: 1.25rem;
}

#root_spn_profile .spn-table-empty-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
}

#root_spn_profile .spn-table-empty-text {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: #6b7280;
}

#root_spn_profile .spn-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#root_spn_profile .spn-data-table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  border-spacing: 0;
}

#root_spn_profile .spn-data-table thead {
  background: #f9fafb;
}

#root_spn_profile .spn-data-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

#root_spn_profile .spn-data-table .spn-th-sno,
#root_spn_profile .spn-data-table .spn-td-sno {
  width: 4.5rem;
  text-align: left;
}

#root_spn_profile .spn-data-table .spn-th-action,
#root_spn_profile .spn-data-table .spn-td-action {
  text-align: center;
  white-space: nowrap;
}

#root_spn_profile .spn-data-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.15s ease;
}

#root_spn_profile .spn-data-table tbody tr:last-child {
  border-bottom: none;
}

#root_spn_profile .spn-data-table tbody tr:hover {
  background: rgba(248, 245, 250, 0.85);
}

#root_spn_profile .spn-data-table td {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #374151;
  vertical-align: middle;
}

#root_spn_profile .spn-td-sno {
  color: #6b7280;
  white-space: nowrap;
}

#root_spn_profile .spn-td-code {
  font-weight: 600;
  color: #111827;
}

#root_spn_profile .spn-td-name {
  font-weight: 500;
  color: #111827;
}

#root_spn_profile .spn-category-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  background: #f3eef5;
  color: #5b1a62;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

#root_spn_profile .spn-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.25rem;
  width: 2.25rem;
  border: none;
  border-radius: 0.5rem;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

#root_spn_profile .spn-icon-btn-edit {
  background: linear-gradient(90deg, #5b1a62 0%, #1a1a7a 100%);
}

#root_spn_profile .spn-icon-btn-edit:hover {
  opacity: 0.92;
}

#root_spn_profile .spn-icon-btn-delete {
  background: #dc2626;
}

#root_spn_profile .spn-icon-btn-delete:hover {
  background: #b91c1c;
}

#root_spn_profile .spn-td-loading {
  padding: 2.5rem 1rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
}

#root_spn_profile .spn-status-active {
  background: #ecfdf5;
  color: #047857;
}

#root_spn_profile .spn-status-inactive {
  background: #f3f4f6;
  color: #6b7280;
}

#root_spn_profile .spn-send-action-btns {
  gap: 0.35rem;
}

#root_spn_profile .spn-icon-btn-whatsapp {
  background: #22c55e;
}

#root_spn_profile .spn-icon-btn-whatsapp:hover {
  background: #16a34a;
}

#root_spn_profile .spn-icon-btn-email {
  background: #2563eb;
}

#root_spn_profile .spn-icon-btn-email:hover {
  background: #1d4ed8;
}

#root_spn_profile .spn-icon-btn-sms {
  background: #7c3aed;
}

#root_spn_profile .spn-icon-btn-sms:hover {
  background: #6d28d9;
}

#root_spn_profile .spn-template-filter-bar {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
  background: #fafafa;
}

#root_spn_profile .spn-template-filter-group {
  max-width: 28rem;
  margin: 0;
}

/* ---- Visitor profile (scoped, new rules only) ---- */
#visitorProfileDivId {
  margin-top: 0;
}

#visitorProfileMainId .ho-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #4338ca;
}

#visitorProfileDivId .ho-modal-overlay {
  z-index: 10050;
}

#visitorProfileMainId .ho-data-table-wrap > table,
#visitorProfileMainId table.ho-data-table,
#visitorProfileMainId .vtr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

#visitorProfileMainId .ho-data-table th,
#visitorProfileMainId .vtr-table th {
  background: #eef2ff;
  color: #4338ca;
  text-align: left;
  padding: 0.65rem 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

#visitorProfileMainId .ho-data-table td,
#visitorProfileMainId .vtr-table td {
  padding: 0.65rem 0.75rem;
  border-top: 1px solid #eef2f7;
  vertical-align: top;
  color: #374151;
}

#visitorProfileMainId .ho-data-table tbody tr:hover td,
#visitorProfileMainId .vtr-table tbody tr:hover td {
  background: #f9fafb;
}

#visitorProfileMainId .norecFount {
  text-align: center;
  color: #dc2626;
  font-weight: 600;
  padding: 1rem 0;
}

#visitorProfileMainId .editIcon {
  margin-left: 0.35rem;
  color: #4f46e5;
  cursor: pointer;
}

#visitorProfileMainId .editIcon:hover {
  color: #4338ca;
}

#visitorProfileDivId .btn,
#visitorProfileMainId .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

#visitorProfileMainId .btn-primary {
  background: #4f46e5;
  color: #fff;
}

#visitorProfileMainId .form-control {
  width: 100%;
  max-width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

#visitorProfileDivId .ui-helper-hidden-accessible {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

#visitorProfileDivId .ui-datepicker {
  display: none;
  position: absolute;
  z-index: 10000;
  width: 18em;
  padding: 0.4em;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  font-size: 13px;
}

#visitorProfileDivId .ui-datepicker .ui-datepicker-header {
  position: relative;
  padding: 0.3em 0;
  margin-bottom: 0.2em;
}

#visitorProfileDivId .ui-datepicker .ui-datepicker-prev,
#visitorProfileDivId .ui-datepicker .ui-datepicker-next {
  position: absolute;
  top: 0.2em;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 6px;
  color: #4f46e5;
  font-weight: 600;
}

#visitorProfileDivId .ui-datepicker .ui-datepicker-prev:hover,
#visitorProfileDivId .ui-datepicker .ui-datepicker-next:hover {
  background: #eef2ff;
}

#visitorProfileDivId .ui-datepicker .ui-datepicker-prev {
  left: 0.2em;
}

#visitorProfileDivId .ui-datepicker .ui-datepicker-next {
  right: 0.2em;
}

#visitorProfileDivId .ui-datepicker .ui-datepicker-prev span,
#visitorProfileDivId .ui-datepicker .ui-datepicker-next span {
  display: none;
}

#visitorProfileDivId .ui-datepicker .ui-datepicker-prev::after {
  content: "‹";
}

#visitorProfileDivId .ui-datepicker .ui-datepicker-next::after {
  content: "›";
}

#visitorProfileDivId .ui-datepicker .ui-datepicker-title {
  text-align: center;
  font-weight: 600;
  margin: 0 2.5em;
}

#visitorProfileDivId .ui-datepicker .ui-datepicker-title select {
  margin: 0.1em;
  padding: 2px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
}

#visitorProfileDivId .ui-datepicker table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

#visitorProfileDivId .ui-datepicker th {
  padding: 0.4em;
  text-align: center;
  font-weight: 600;
  border: 0;
  background: transparent;
  color: #6b7280;
}

#visitorProfileDivId .ui-datepicker td {
  padding: 1px;
  border: 0;
}

#visitorProfileDivId .ui-datepicker td a,
#visitorProfileDivId .ui-datepicker td span {
  display: block;
  padding: 0.35em;
  text-align: center;
  text-decoration: none;
  border-radius: 6px;
  color: #374151;
}

#visitorProfileDivId .ui-datepicker td a:hover {
  background: #eef2ff;
}

#visitorProfileDivId .ui-datepicker td a.ui-state-active {
  background: #4f46e5;
  color: #fff;
}

#visitorProfileDivId .ui-autocomplete {
  position: absolute;
  z-index: 10001;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  max-height: 220px;
  overflow-y: auto;
  font-size: 13px;
}

#visitorProfileDivId .ui-autocomplete .ui-menu-item {
  padding: 0;
  list-style: none;
}

#visitorProfileDivId .ui-autocomplete .ui-menu-item a,
#visitorProfileDivId .ui-autocomplete .ui-menu-item div {
  display: block;
  padding: 6px 12px;
  cursor: pointer;
  color: #374151;
  text-decoration: none;
}

#visitorProfileDivId .ui-autocomplete .ui-menu-item a.ui-state-focus,
#visitorProfileDivId .ui-autocomplete .ui-menu-item a:hover,
#visitorProfileDivId .ui-autocomplete .ui-menu-item div.ui-state-focus,
#visitorProfileDivId .ui-autocomplete .ui-menu-item div:hover {
  background: #eef2ff;
  color: #4338ca;
}

@media print {
  .header,
  .no-print,
  .printBtn {
    display: none !important;
  }

  #printVtrSlipModal.ho-modal-overlay {
    position: static;
    display: block;
    background: none;
    padding: 0;
    backdrop-filter: none;
  }

  #printVtrSlipModal .ho-modal-box {
    box-shadow: none;
    max-width: 100%;
    max-height: none;
  }
}

/* ---- Expense profile (scoped, new rules only) ---- */
#expenseProfileDivId {
  margin-top: 0;
}

#expenseProfileMainId .ho-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #4338ca;
}

#expenseProfileDivId .ho-modal-overlay {
  z-index: 10050;
}

#expenseProfileMainId .exp-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  #expenseProfileMainId .exp-form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  #expenseProfileMainId .exp-form-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

#expenseProfileMainId .norecFount {
  text-align: center;
  color: #dc2626;
  font-weight: 600;
  padding: 1rem 0;
}

#expenseProfileMainId .ho-data-table-wrap > table,
#expenseProfileMainId table.ho-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

#expenseProfileMainId .ho-data-table th {
  background: #eef2ff;
  color: #4338ca;
  text-align: left;
  padding: 0.65rem 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

#expenseProfileMainId .ho-data-table td {
  padding: 0.65rem 0.75rem;
  border-top: 1px solid #eef2f7;
  vertical-align: top;
  color: #374151;
}

#expenseProfileMainId .box {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #fff;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06);
}

#expenseProfileMainId .box-header {
  padding: 1rem 1.25rem;
}

#expenseProfileMainId .box .paddingClas {
  padding: 0.25rem 0;
}

#expenseProfileMainId .box .pClass {
  margin: 0.25rem 0;
  font-size: 0.875rem;
  color: #374151;
}

#expenseProfileMainId .box .labelClass {
  font-weight: 600;
  color: #4338ca;
  margin-right: 0.35rem;
}

#expenseProfileMainId .box .head_title {
  font-weight: 700;
  color: #4f46e5;
  font-size: 0.9rem;
}

#expenseProfileMainId .box .hrClass {
  border-top: 1px solid #e5e7eb;
  margin: 0.75rem 0;
  clear: both;
}

#expenseProfileMainId .box [class*="col-md-"] {
  float: left;
  width: 100%;
  box-sizing: border-box;
  padding: 0 0.5rem;
}

@media (min-width: 768px) {
  #expenseProfileMainId .box .col-md-2 { width: 16.666%; }
  #expenseProfileMainId .box .col-md-3 { width: 25%; }
  #expenseProfileMainId .box .col-md-5 { width: 41.666%; }
  #expenseProfileMainId .box .col-md-12 { width: 100%; }
}

#expenseProfileMainId .box::after {
  content: "";
  display: table;
  clear: both;
}

#expenseProfileMainId .redText {
  color: #dc2626;
  font-weight: 600;
}

#expenseProfileDivId .btn,
#expenseProfileMainId .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

#expenseProfileMainId .btn-primary { background: #4f46e5; color: #fff; }
#expenseProfileMainId .btn-success { background: #16a34a; color: #fff; }
#expenseProfileMainId .btn-danger { background: #dc2626; color: #fff; }

#expenseProfileMainId .pull-right { float: right; }
#expenseProfileMainId .marginBottom10px { margin-bottom: 0.625rem; }
#expenseProfileMainId .marginRight10px { margin-right: 0.625rem; }

#expenseProfileDivId .ui-helper-hidden-accessible {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

#expenseProfileDivId .ui-datepicker,
#expenseProfileDivId .ui-autocomplete {
  z-index: 10060;
}

#expenseProfileDivId .ui-datepicker {
  display: none;
  position: absolute;
  width: 18em;
  padding: 0.4em;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  font-size: 13px;
}

#expenseProfileDivId .ui-autocomplete {
  position: absolute;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  max-height: 220px;
  overflow-y: auto;
  font-size: 13px;
}

#expenseProfileDivId .ui-autocomplete .ui-menu-item a,
#expenseProfileDivId .ui-autocomplete .ui-menu-item div {
  display: block;
  padding: 6px 12px;
  cursor: pointer;
  color: #374151;
  text-decoration: none;
}

#expenseProfileDivId .ui-autocomplete .ui-menu-item a:hover,
#expenseProfileDivId .ui-autocomplete .ui-menu-item a.ui-state-focus,
#expenseProfileDivId .ui-autocomplete .ui-menu-item div:hover,
#expenseProfileDivId .ui-autocomplete .ui-menu-item div.ui-state-focus {
  background: #eef2ff;
  color: #4338ca;
}

/* ---- Payroll profile (scoped, new rules only) ---- */
#payrollProfileDivId {
  margin-top: 0;
}

#payrollProfileMainId .ho-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #4338ca;
}

#payrollProfileDivId .ho-modal-overlay {
  z-index: 10050;
}

#payrollProfileMainId .payroll-filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  #payrollProfileMainId .payroll-filter-grid {
    grid-template-columns: 1fr 1fr;
  }
}

#payrollProfileMainId .payroll-filter-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 24rem;
  margin-bottom: 1rem;
}

#payrollProfileMainId .ho-data-table-wrap > table,
#payrollProfileMainId table.ho-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

#payrollProfileMainId .ho-data-table th {
  background: #eef2ff;
  color: #4338ca;
  text-align: left;
  padding: 0.65rem 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

#payrollProfileMainId .ho-data-table td {
  padding: 0.65rem 0.75rem;
  border-top: 1px solid #eef2f7;
  vertical-align: top;
  color: #374151;
}

#payrollProfileMainId .ho-data-table tbody tr:hover td {
  background: #f9fafb;
}

#payrollProfileMainId #salaryMonthTableId h4 {
  margin: 0.75rem 0 0.35rem;
  color: #4338ca;
  font-size: 1rem;
  font-weight: 600;
}

#payrollProfileMainId #salaryMonthTableId table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

#payrollProfileMainId #salaryMonthTableId table th {
  background: #eef2ff;
  color: #4338ca;
  padding: 0.65rem 0.75rem;
  text-align: left;
}

#payrollProfileMainId #salaryMonthTableId table td {
  padding: 0.65rem 0.75rem;
  border-top: 1px solid #eef2f7;
}

#payrollProfileDivId .btn,
#payrollProfileMainId .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

#payrollProfileMainId .btn-primary { background: #4f46e5; color: #fff; }
#payrollProfileMainId .btn-success { background: #16a34a; color: #fff; }
#payrollProfileMainId .btn-danger { background: #dc2626; color: #fff; }
#payrollProfileMainId .btn-info { background: #2563eb; color: #fff; }

#payrollProfileMainId .pull-right { float: right; }

#payrollProfileMainId .form-control,
#payrollProfileDivId .form-control {
  width: 100%;
  max-width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

#payrollProfileMainId .box [class*="col-md-"] {
  box-sizing: border-box;
}

/* ---- Rules and Regulations (rr-*) — new rules only ---- */
#root_rules_profile {
  margin-top: 0;
}

#root_rules_profile .rr-page-header {
  background: linear-gradient(90deg, #05053d 0%, #1a1a7a 55%, #5b1a62 100%);
}

#root_rules_profile .rr-page-eyebrow {
  margin: 0 0 0.15rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

#root_rules_profile .rr-main-content {
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  #root_rules_profile .rr-main-content {
    padding: 1.25rem 1.5rem 2rem;
  }
}

#root_rules_profile #rulesHeadID {
  margin-bottom: 0;
}

#root_rules_profile .rr-rules-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#root_rules_profile .rr-section-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fafbff;
}

#root_rules_profile .rr-heading-wrap {
  margin-bottom: 0;
}

#root_rules_profile .rr-heading-table th,
#root_rules_profile .rr-heading-table td,
#root_rules_profile .rr-rules-table th,
#root_rules_profile .rr-rules-table td {
  vertical-align: middle;
}

#root_rules_profile .rr-heading-cell {
  text-align: left;
  width: 100%;
  min-width: 12rem;
}

#root_rules_profile .rr-rule-desc-cell {
  text-align: left;
  min-width: 14rem;
}

#root_rules_profile .rr-field-text {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.5;
  word-break: break-word;
}

#root_rules_profile .editIcon {
  color: #4f46e5;
  cursor: pointer;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

#root_rules_profile .editIcon:hover {
  color: #3730a3;
}

#root_rules_profile .hideInfo {
  display: none;
}

#root_rules_profile .showInfo {
  display: block;
}

#root_rules_profile .rr-action-cell {
  text-align: center;
  white-space: nowrap;
  width: 3.25rem;
}

#root_rules_profile .rr-action-cell-wide {
  width: auto;
  min-width: 7rem;
}

#root_rules_profile .rr-btn-text {
  margin-left: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
}

#root_rules_profile .rr-btn-disabled,
#root_rules_profile .rr-btn-disabled:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#root_rules_profile .rr-rules-table-wrap {
  border-top: 1px solid #e5e7eb;
  background: #fff;
  padding: 0.25rem 0 0.5rem;
}

#root_rules_profile .rulesHeadId {
  padding: 0;
}

#root_rules_profile .rr-empty-wrap {
  padding: 0.5rem 0;
}

#root_rules_profile .empty_rule {
  margin: 0;
}

#root_rules_profile .rr-empty-inline {
  padding: 1rem;
}

#root_rules_profile .rr-inline-form {
  width: 100%;
}

#root_rules_profile .rr-inline-edit-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

#root_rules_profile .rr-inline-edit-row .ho-form-textarea {
  flex: 1;
  min-width: 0;
}

#root_rules_profile .rr-inline-save {
  flex-shrink: 0;
  margin-top: 0.15rem;
}

#root_rules_profile .ho-data-table-wrap {
  overflow-x: auto;
}

@media (max-width: 639px) {
  #root_rules_profile .ho-card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  #root_rules_profile .ho-card-header .ho-btn {
    width: 100%;
    justify-content: center;
  }

  #root_rules_profile .rr-btn-text {
    display: inline;
  }
}

#root_rules_profile .ho-modal-overlay {
  z-index: 1200;
}

/* ---- View Task charge confirm modal (vt-charge-*) — new rules only ---- */
#chargeServiceConfirmModalId .vt-charge-confirm-header {
  background: linear-gradient(90deg, #05053d 0%, #1a1a7a 55%, #5b1a62 100%);
}

#chargeServiceConfirmModalId .vt-charge-confirm-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}

#chargeServiceConfirmModalId .vt-charge-confirm-panel {
  border: 1px solid #e5e7eb;
}

/* ========== AMC Master Default Service page (amds-*) ========== */
.amds-page {
  max-width: 72rem;
  margin: 1.25rem auto 2.5rem;
  padding: 0 1rem 1.5rem;
}

@media (min-width: 640px) {
  .amds-page {
    margin-top: 1.75rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.amds-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  box-shadow: 0 10px 28px -18px rgba(15, 23, 42, 0.35);
  overflow: hidden;
}

.amds-card-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 55%, #ffffff 100%);
  border-bottom: 1px solid #e5e7eb;
}

@media (min-width: 640px) {
  .amds-card-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
  }
}

.amds-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e1b4b;
  letter-spacing: -0.01em;
}

.amds-subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: #64748b;
}

.amds-amc-name {
  font-weight: 600;
  color: #4338ca;
}

.amds-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
}

@media (min-width: 640px) {
  .amds-actions {
    flex-direction: row;
    width: auto;
  }
}

.amds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 0.65rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

@media (min-width: 640px) {
  .amds-btn {
    width: auto;
  }
}

.amds-btn:hover {
  transform: translateY(-1px);
}

.amds-btn-primary {
  color: #fff;
  background: #16a34a;
  box-shadow: 0 8px 18px -10px rgba(22, 163, 74, 0.7);
}

.amds-btn-primary:hover {
  background: #15803d;
}

.amds-btn-secondary {
  color: #fff;
  background: #475569;
  box-shadow: 0 8px 18px -10px rgba(71, 85, 105, 0.65);
}

.amds-btn-secondary:hover {
  background: #334155;
}

.amds-btn-danger {
  color: #fff;
  background: #dc2626;
  box-shadow: 0 8px 18px -10px rgba(220, 38, 38, 0.65);
}

.amds-btn-danger:hover {
  background: #b91c1c;
}

.amds-btn-muted {
  color: #1f2937;
  background: #e5e7eb;
}

.amds-btn-muted:hover {
  background: #d1d5db;
}

.amds-btn-icon {
  width: 2.25rem;
  min-height: 2.25rem;
  padding: 0.35rem;
  border-radius: 9999px;
}

.amds-card-body {
  padding: 1rem 1.15rem 1.35rem;
}

@media (min-width: 640px) {
  .amds-card-body {
    padding: 1.15rem 1.5rem 1.5rem;
  }
}

.amds-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
}

.amds-table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
  background: #fff;
}

.amds-table thead {
  background: #eef2ff;
}

.amds-table th {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid #e5e7eb;
  color: #312e81;
  font-weight: 700;
  white-space: nowrap;
}

.amds-table td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

.amds-table tbody tr:hover {
  background: #f8fafc;
}

.amds-table .amds-col-center {
  text-align: center;
}

.amds-table .amds-col-right {
  text-align: right;
}

.amds-empty {
  margin-top: 0.75rem;
  padding: 1rem 1.1rem;
  border-left: 4px solid #f59e0b;
  border-radius: 0.5rem;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.875rem;
}

.amds-error {
  padding: 1.25rem 1.35rem;
  border-radius: 0.85rem;
  background: #fff;
  border: 1px solid #fecaca;
  color: #b91c1c;
  box-shadow: 0 10px 28px -18px rgba(15, 23, 42, 0.35);
  font-weight: 600;
}

.amds-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0.85rem;
  background: rgba(15, 23, 42, 0.5);
}

.amds-modal-overlay.amds-open {
  display: flex;
}

.amds-modal {
  width: 100%;
  max-width: 32rem;
  background: #fff;
  border-radius: 0.9rem;
  box-shadow: 0 24px 48px -20px rgba(15, 23, 42, 0.45);
  overflow: hidden;
}

.amds-modal-sm {
  max-width: 24rem;
}

.amds-modal-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.75rem 1rem 1.15rem;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.amds-modal-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
}

.amds-modal-close {
  position: absolute;
  right: 0.85rem;
  top: 0.7rem;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.4rem;
}

.amds-modal-close:hover {
  color: #0f172a;
}

.amds-modal-body {
  padding: 1.15rem 1.25rem 1.35rem;
}

.amds-form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .amds-form-row {
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
  }
}

.amds-form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

@media (min-width: 640px) {
  .amds-form-label {
    width: 42%;
    flex-shrink: 0;
  }
}

.amds-form-control {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.65rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.875rem;
}

.amds-form-control:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.amds-form-error {
  margin-top: -0.35rem;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  color: #dc2626;
}

.amds-modal-footer {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.55rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

@media (min-width: 640px) {
  .amds-modal-footer {
    flex-direction: row;
    justify-content: flex-end;
  }
}

.amds-confirm-text {
  margin: 0 0 1.15rem;
  color: #475569;
  font-size: 0.95rem;
}

.amds-hidden {
  display: none !important;
}

/* =========================================================
   staff_task_point.jsp — unique styles (stp- prefix)
   Matches company_list brand theme
   ========================================================= */

#staffTaskPointRoot {
  width: 100%;
}

.stp-page {
  font-family: 'Inter', 'Plus Jakarta Sans', system-ui, sans-serif;
}

.stp-modal.hidden {
  display: none !important;
}

.stp-modal.flex {
  display: flex !important;
}

.stp-point-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 9999px;
  padding: 0.2rem 0.65rem;
  background: linear-gradient(90deg, #5b1a62 0%, #1a1a7a 100%);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
  box-shadow: 0 4px 12px rgba(91, 26, 98, 0.25);
  white-space: nowrap;
}

.stp-point-badge i {
  font-size: 0.7rem;
  opacity: 0.9;
}

.stp-point-badge-total {
  font-size: 0.875rem;
  padding: 0.35rem 0.8rem;
  box-shadow: 0 6px 16px rgba(91, 26, 98, 0.3);
}

.stp-point-input {
  letter-spacing: 0.02em;
}

.stp-summary-card {
  position: relative;
  overflow: hidden;
}

.stp-summary-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 9999px 0 0 9999px;
}

.stp-summary-card-today::before {
  background: linear-gradient(180deg, #d0153f 0%, #5b1a62 100%);
}

.stp-summary-card-week::before {
  background: linear-gradient(180deg, #5b1a62 0%, #1a1a7a 100%);
}

.stp-summary-card-month::before {
  background: linear-gradient(180deg, #1a1a7a 0%, #05053d 100%);
}

.stp-summary-value {
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stp-summary-icon {
  box-shadow: inset 0 0 0 1px rgba(91, 26, 98, 0.08);
}

/* =========================================================
   change_password.jsp — unique styles (cpwd- prefix)
   ========================================================= */

#changePasswordRoot {
  width: 100%;
}

.cpwd-page {
  font-family: 'Inter', 'Plus Jakarta Sans', system-ui, sans-serif;
}

#editPass label.error {
  display: block;
  margin-top: 0.35rem;
  color: #dc2626;
  font-size: 0.75rem;
  font-weight: 500;
}

#editPass input.error {
  border-color: #f97316 !important;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.15);
}

.cpwd-password-wrap {
  position: relative;
}

.cpwd-toggle-btn {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
}

.cpwd-toggle-btn:hover {
  color: #5b1a62;
  background: #f8f5fa;
}

.cpwd-rules {
  line-height: 1.35;
}

.cpwd-rule-valid {
  color: #15803d;
  font-weight: 500;
}

.cpwd-rule-invalid {
  color: #dc2626;
  font-weight: 500;
}

.cpwd-input-ok {
  border-color: #16a34a !important;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15);
}

.cpwd-input-bad {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12);
}


/* =========================================================
   officeDetails.jsp — unique styles (od- prefix)
   ========================================================= */

.od-page {
  font-family: 'Inter', 'Plus Jakarta Sans', system-ui, sans-serif;
}

.od-layout {
  width: 100%;
}

.od-sidebar {
  z-index: 40;
}

.od-main {
  padding: 1rem;
}

@media (min-width: 640px) {
  .od-main {
    padding: 1.25rem 1.5rem;
  }
}

.od-admin-menu {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.od-admin-menu .od-nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  color: #374151;
  text-decoration: none;
  font-size: 0.875rem;
}

.od-admin-menu .od-nav-link:hover {
  background: #eef2ff;
}

.od-admin-menu li.active .od-nav-link,
.od-admin-menu li.od-nav-active .od-nav-link {
  background: #e0e7ff;
  color: #3730a3;
  font-weight: 600;
}

.od-admin-content {
  display: none;
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  border: 1px solid #e5e7eb;
  padding: 1rem 1.25rem 1.25rem;
  margin-bottom: 1rem;
}

/* panes shown via jQuery .show() */

.od-section-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.od-field-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #4b5563;
}

.od-field-value {
  font-size: 0.875rem;
  color: #111827;
}

.od-table {
  width: 100%;
  border-collapse: collapse;
}

.od-table th,
.od-table td {
  padding: 0.625rem 0.75rem;
  border: 1px solid #e5e7eb;
  font-size: 0.875rem;
  vertical-align: middle;
}

.od-table-head,
.od-table thead {
  background: #f3f4f6;
}

.od-text-center {
  text-align: center;
}

.od-ml-auto {
  margin-left: auto;
}

.od-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.od-form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.od-col-12 { width: 100%; }
.od-col-10 { width: 100%; }
.od-col-8 { width: 100%; }
.od-col-7 { width: 100%; }
.od-col-5 { width: 100%; }
.od-col-4 { width: 100%; }
.od-col-3 { width: 100%; }
.od-col-2 { width: 100%; }
.od-col-1 { width: 100%; }

@media (min-width: 768px) {
  .od-col-10 { width: 83.333%; }
  .od-col-8 { width: 66.666%; }
  .od-col-7 { width: 58.333%; }
  .od-col-5 { width: 41.666%; }
  .od-col-4 { width: 33.333%; }
  .od-col-3 { width: 25%; }
  .od-col-2 { width: 16.666%; }
  .od-col-1 { width: 8.333%; }
}

.od-modal.ho-modal-overlay {
  align-items: flex-start;
  padding-top: 3vh;
  overflow-y: auto;
}

.od-modal .ho-modal-box {
  margin: 1rem auto;
  max-width: 42rem;
  width: calc(100% - 1.5rem);
}

.od-modal .od-modal-content {
  width: 100%;
}

.od-w-full { width: 100%; }
.od-mt-2 { margin-top: 0.5rem; }
.od-container { width: 100%; }

.od-page label.error {
  color: #dc2626;
  font-size: 0.75rem;
  font-weight: 500;
  display: block;
  margin-top: 0.25rem;
}

/* Ensure migrated buttons keep base + variant styles */
.od-page .ho-btn-success,
.od-page .ho-btn-primary,
.od-page .ho-btn-danger,
.od-page .ho-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

#root_office_details {
  width: 100%;
}

/* =========================================================
   anniversary_list.jsp — unique styles (annl- prefix)
   ========================================================= */

#root_anniversary_list {
  width: 100%;
}

.annl-page {
  min-height: calc(100vh - 4rem);
  padding: 1rem;
  background: linear-gradient(180deg, #f8f5fa 0%, #f3f4f6 40%, #ffffff 100%);
  font-family: 'Inter', 'Plus Jakarta Sans', system-ui, sans-serif;
}

@media (min-width: 640px) {
  .annl-page {
    padding: 1.5rem 1.75rem;
  }
}

.annl-card {
  max-width: 72rem;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  box-shadow: 0 12px 40px rgba(91, 26, 98, 0.08);
  padding: 1.25rem;
}

@media (min-width: 640px) {
  .annl-card {
    padding: 1.5rem 1.75rem;
  }
}

.annl-header {
  margin-bottom: 1.25rem;
}

.annl-eyebrow {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5b1a62;
}

.annl-title {
  margin: 0.25rem 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #05053d;
}

@media (min-width: 640px) {
  .annl-title {
    font-size: 1.75rem;
  }
}

.annl-subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: #6b7280;
}

.annl-search-form {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: 0.75rem;
  background: #f8f5fa;
  border: 1px solid #efe7f2;
}

.annl-search-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  align-items: end;
}

@media (min-width: 768px) {
  .annl-search-grid {
    grid-template-columns: 1fr 1fr auto;
  }
}

.annl-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.annl-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

.annl-label-spacer {
  display: none;
}

@media (min-width: 768px) {
  .annl-label-spacer {
    display: block;
  }
}

.annl-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.625rem;
  background: #ffffff url("/web/view/images/calendar.png") right 0.75rem center no-repeat;
  padding: 0.625rem 2.25rem 0.625rem 0.85rem;
  font-size: 0.875rem;
  color: #111827;
}

.annl-input:focus {
  outline: none;
  border-color: #5b1a62;
  box-shadow: 0 0 0 3px rgba(91, 26, 98, 0.12);
}

.annl-search-btn {
  width: 100%;
}

@media (min-width: 768px) {
  .annl-search-btn {
    width: auto;
    white-space: nowrap;
  }
}

.annl-section {
  margin-top: 1.5rem;
}

.annl-section-title {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  background: linear-gradient(90deg, #f3eef5 0%, #eef2ff 100%);
  color: #1f2937;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}

.annl-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
}

.annl-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.annl-table th,
.annl-table td,
.annl-th,
.annl-td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.875rem;
  text-align: center;
  vertical-align: middle;
}

.annl-table thead th,
.annl-th {
  background: #f9fafb;
  color: #374151;
  font-weight: 700;
  white-space: nowrap;
}

.annl-table tbody tr:hover {
  background: #f8f5fa;
}

.annl-empty {
  display: none;
  margin: 1rem 0 0;
  color: #dc2626;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
}

/* =========================================================
   birthday_list.jsp — unique styles (bdl- prefix)
   ========================================================= */

#root_birthday_list {
  width: 100%;
}

.bdl-page {
  min-height: calc(100vh - 4rem);
  padding: 1rem;
  background: linear-gradient(180deg, #f8f5fa 0%, #f3f4f6 40%, #ffffff 100%);
  font-family: 'Inter', 'Plus Jakarta Sans', system-ui, sans-serif;
}

@media (min-width: 640px) {
  .bdl-page {
    padding: 1.5rem 1.75rem;
  }
}

.bdl-card {
  max-width: 72rem;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  box-shadow: 0 12px 40px rgba(91, 26, 98, 0.08);
  padding: 1.25rem;
}

@media (min-width: 640px) {
  .bdl-card {
    padding: 1.5rem 1.75rem;
  }
}

.bdl-header {
  margin-bottom: 1.25rem;
}

.bdl-eyebrow {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5b1a62;
}

.bdl-title {
  margin: 0.25rem 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #05053d;
}

@media (min-width: 640px) {
  .bdl-title {
    font-size: 1.75rem;
  }
}

.bdl-subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: #6b7280;
}

.bdl-search-form {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: 0.75rem;
  background: #f8f5fa;
  border: 1px solid #efe7f2;
}

.bdl-search-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  align-items: end;
}

@media (min-width: 768px) {
  .bdl-search-grid {
    grid-template-columns: 1fr 1fr auto;
  }
}

.bdl-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bdl-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

.bdl-label-spacer {
  display: none;
}

@media (min-width: 768px) {
  .bdl-label-spacer {
    display: block;
  }
}

.bdl-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.625rem;
  background: #ffffff url("/web/view/images/calendar.png") right 0.75rem center no-repeat;
  padding: 0.625rem 2.25rem 0.625rem 0.85rem;
  font-size: 0.875rem;
  color: #111827;
}

.bdl-input:focus {
  outline: none;
  border-color: #5b1a62;
  box-shadow: 0 0 0 3px rgba(91, 26, 98, 0.12);
}

.bdl-search-btn {
  width: 100%;
}

@media (min-width: 768px) {
  .bdl-search-btn {
    width: auto;
    white-space: nowrap;
  }
}

.bdl-section {
  margin-top: 1.5rem;
}

.bdl-section-title {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  background: linear-gradient(90deg, #f3eef5 0%, #eef2ff 100%);
  color: #1f2937;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}

.bdl-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
}

.bdl-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.bdl-table th,
.bdl-table td,
.bdl-th,
.bdl-td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.875rem;
  text-align: center;
  vertical-align: middle;
}

.bdl-table thead th,
.bdl-th {
  background: #f9fafb;
  color: #374151;
  font-weight: 700;
  white-space: nowrap;
}

.bdl-table tbody tr:hover {
  background: #f8f5fa;
}

.bdl-empty {
  display: none;
  margin: 1rem 0 0;
  color: #dc2626;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
}

#searchBirthday label.error {
  color: #dc2626;
}

#searchBirthday input.error {
  border: 1px solid orange;
}

/* ================= edit_company_contact (ecc) page ================= */
.ecc-page {
  max-width: 960px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

.ecc-card {
  background: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: 1.25rem;
  box-shadow: 0 12px 40px rgba(91, 26, 98, 0.10);
  overflow: hidden;
}

.ecc-card-head {
  background: linear-gradient(90deg, #5b1a62, #1a1a7a);
  color: #ffffff;
  padding: 1.1rem 1.4rem;
}

.ecc-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.ecc-card-sub {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
}

.ecc-card-body {
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.ecc-card-foot {
  padding: 1rem 1.4rem 1.4rem;
  text-align: center;
}

.ecc-section {
  border: 1px solid #eef2f7;
  border-radius: 0.9rem;
  overflow: hidden;
}

.ecc-section-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  background: #faf7fb;
  border-bottom: 1px solid #eef2f7;
}

.ecc-section-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  background: #ede9fe;
  color: #5b1a62;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.ecc-section-title {
  flex: 1 1 auto;
  margin: 0;
  padding: 0;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f2937;
}

.ecc-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ecc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.ecc-table td {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
  color: #334155;
}

.ecc-table tr:last-child td {
  border-bottom: none;
}

.ecc-table tr:hover td {
  background: #faf7fb;
}

.ecc-table .ecc-td-action {
  width: 1%;
  white-space: nowrap;
  text-align: center;
}

.ecc-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 0.55rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ecc-icon-danger { background: #fee2e2; color: #dc2626; }
.ecc-icon-danger:hover { background: #dc2626; color: #ffffff; }
.ecc-icon-primary { background: #ede9fe; color: #5b1a62; }
.ecc-icon-primary:hover { background: #5b1a62; color: #ffffff; }

.ecc-btn-add,
.ecc-btn-save,
.ecc-btn-close,
.ecc-btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border: none;
  border-radius: 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease, background 0.15s ease;
}

.ecc-btn-add { background: #16a34a; color: #ffffff; }
.ecc-btn-add:hover { filter: brightness(0.95); }
.ecc-btn-save { background: #16a34a; color: #ffffff; }
.ecc-btn-save:hover { filter: brightness(0.95); }
.ecc-btn-close { background: #ef4444; color: #ffffff; }
.ecc-btn-close:hover { filter: brightness(0.95); }
.ecc-btn-back { background: #5b1a62; color: #ffffff; padding: 0.55rem 1.4rem; font-size: 0.85rem; }
.ecc-btn-back:hover { filter: brightness(1.1); }

/* ecc modals */
.ecc-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  background: rgba(5, 5, 61, 0.5);
  overflow-y: auto;
}

.ecc-modal.flex { display: flex; }

.ecc-modal-panel {
  width: 100%;
  max-width: 32rem;
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 25px 60px rgba(5, 5, 61, 0.35);
  overflow: hidden;
  animation: eccModalIn 0.15s ease-out;
}

.ecc-modal-lg { max-width: 46rem; }
.ecc-modal-sm { max-width: 24rem; }

.ecc-confirm-msg {
  font-size: 0.95rem;
  color: #334155;
  text-align: center;
  margin: 0.5rem 0 0;
}

@keyframes eccModalIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.ecc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  background: linear-gradient(90deg, #5b1a62, #1a1a7a);
  color: #ffffff;
}

.ecc-modal-head h5 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ecc-modal-x {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
}

.ecc-modal-x:hover { opacity: 1; }

.ecc-modal-body { padding: 1.2rem; }

.ecc-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.ecc-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

.ecc-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 0.3rem;
}

.ecc-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.55rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #1f2937;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ecc-input:focus {
  outline: none;
  border-color: #5b1a62;
  box-shadow: 0 0 0 2px rgba(91, 26, 98, 0.18);
}

#root_edit_company_contact label.error {
  color: #dc2626;
  font-size: 0.75rem;
  font-weight: 500;
  display: block;
  margin-top: 0.25rem;
}

#root_edit_company_contact input.error,
#root_edit_company_contact select.error {
  border-color: #f97316;
}

@media (max-width: 640px) {
  .ecc-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .ecc-section-head { flex-wrap: wrap; }
}

/* ================= staff_report_product (srp) page ================= */
.srp-page {
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

.srp-card {
  background: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: 1.25rem;
  box-shadow: 0 12px 40px rgba(91, 26, 98, 0.10);
  overflow: hidden;
}

.srp-card-head {
  background: linear-gradient(90deg, #5b1a62, #1a1a7a);
  color: #ffffff;
  padding: 1.1rem 1.4rem;
}

.srp-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.srp-card-sub {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
}

.srp-filter {
  padding: 1.25rem 1.4rem;
  border-bottom: 1px solid #eef2f7;
  background: #faf7fb;
}

.srp-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: end;
}

.srp-field {
  display: flex;
  flex-direction: column;
}

.srp-field-btn {
  justify-content: flex-end;
}

.srp-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 0.3rem;
}

.srp-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.55rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #1f2937;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.srp-input:focus {
  outline: none;
  border-color: #5b1a62;
  box-shadow: 0 0 0 2px rgba(91, 26, 98, 0.18);
}

.srp-btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 0.55rem;
  background: #16a34a;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.srp-btn-submit:hover { filter: brightness(0.95); }

.srp-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 1.4rem 1.4rem;
}

.srp-table {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
}

.srp-table thead th {
  background: #05053d;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.7rem 0.8rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 2px solid #1a1a7a;
}

.srp-table thead th.aCenter {
  text-align: center;
}

.srp-table thead th:first-child { border-top-left-radius: 0.6rem; }
.srp-table thead th:last-child { border-top-right-radius: 0.6rem; }

.srp-table .srp-td {
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

.srp-table .srp-td.aCenter { text-align: center; }

.srp-row:nth-child(even) td { background: #faf9fc; }
.srp-row:hover td { background: #f3eef5; }

.srp-staff {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 180px;
}

.srp-staff-img {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid #ede9fe;
  background: #ffffff;
  flex: 0 0 auto;
}

.srp-staff-link {
  font-weight: 600;
  color: #5b1a62;
  text-decoration: none;
  font-size: 0.85rem;
}

.srp-staff-link:hover { text-decoration: underline; }

.srp-link {
  color: #1a1a7a;
  font-weight: 600;
  text-decoration: none;
}

.srp-link:hover { text-decoration: underline; }

.srp-empty {
  text-align: center;
  padding: 1.5rem;
  color: #94a3b8;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .srp-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .srp-filter-grid { grid-template-columns: minmax(0, 1fr); }
}

/* srp datepicker — menu_new does not load jquery-ui.css, so without these rules
   #ui-datepicker-div sits in document flow at the bottom of the page. */
body > #ui-datepicker-div.srp-datepicker {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10050 !important;
}

#ui-datepicker-div.srp-datepicker.ui-datepicker,
#ui-datepicker-div.srp-datepicker {
  width: 300px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 12px;
  border-radius: 14px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 13px;
  max-width: calc(100vw - 1rem);
}

#ui-datepicker-div.srp-datepicker .ui-datepicker-header {
  position: relative;
  background: transparent;
  border: none;
  padding: 2px 0 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

#ui-datepicker-div.srp-datepicker .ui-datepicker-title {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 34px;
  line-height: 1.6;
  font-weight: 600;
  color: #1e293b;
}

#ui-datepicker-div.srp-datepicker .ui-datepicker-title select {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  background: #f8fafc;
  cursor: pointer;
}

#ui-datepicker-div.srp-datepicker .ui-datepicker-title select:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.18);
}

#ui-datepicker-div.srp-datepicker .ui-datepicker-prev,
#ui-datepicker-div.srp-datepicker .ui-datepicker-next {
  position: absolute;
  top: 2px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #f1f5f9;
  cursor: pointer;
  overflow: hidden;
  text-indent: -9999px;
}

#ui-datepicker-div.srp-datepicker .ui-datepicker-prev { left: 0; }
#ui-datepicker-div.srp-datepicker .ui-datepicker-next { right: 0; }

#ui-datepicker-div.srp-datepicker .ui-datepicker-prev:hover,
#ui-datepicker-div.srp-datepicker .ui-datepicker-next:hover {
  background: #ede9fe;
}

#ui-datepicker-div.srp-datepicker .ui-datepicker-prev span,
#ui-datepicker-div.srp-datepicker .ui-datepicker-next span {
  display: none !important;
}

#ui-datepicker-div.srp-datepicker .ui-datepicker-prev::after,
#ui-datepicker-div.srp-datepicker .ui-datepicker-next::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-top: 2px solid #6d28d9;
  border-right: 2px solid #6d28d9;
  text-indent: 0;
}

#ui-datepicker-div.srp-datepicker .ui-datepicker-prev::after {
  transform: translate(-30%, -50%) rotate(-135deg);
}

#ui-datepicker-div.srp-datepicker .ui-datepicker-next::after {
  transform: translate(-70%, -50%) rotate(45deg);
}

#ui-datepicker-div.srp-datepicker table {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 0;
}

#ui-datepicker-div.srp-datepicker th {
  padding: 6px 0;
  color: #94a3b8;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  text-align: center;
  border: 0;
  background: transparent;
}

#ui-datepicker-div.srp-datepicker td {
  padding: 2px;
  text-align: center;
  border: 0;
}

#ui-datepicker-div.srp-datepicker td a,
#ui-datepicker-div.srp-datepicker td span {
  display: block;
  padding: 7px 0;
  border-radius: 9px;
  text-decoration: none;
  color: #334155;
  font-weight: 500;
  text-align: center;
}

#ui-datepicker-div.srp-datepicker td a:hover {
  background: #ede9fe;
  color: #5b1a62;
}

#ui-datepicker-div.srp-datepicker td .ui-state-active,
#ui-datepicker-div.srp-datepicker td a.ui-state-active {
  background: #5b1a62 !important;
  color: #ffffff !important;
}

#ui-datepicker-div.srp-datepicker td .ui-state-highlight {
  background: #f1f5f9;
  color: #05053d;
}

#ui-datepicker-div.srp-datepicker td span.ui-state-disabled {
  color: #cbd5e1;
  opacity: 0.7;
}

/* ================= staff_report (sr) page ================= */
.sr-page {
  max-width: 1100px;
  margin: 1.5rem auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sr-tabs {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem;
  width: fit-content;
  max-width: 100%;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.85rem;
  box-shadow: 0 6px 20px rgba(91, 26, 98, 0.08);
}

.sr-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 0.65rem;
  background: transparent;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.sr-tab:hover {
  background: #f3eef5;
  color: #5b1a62;
}

.sr-tab-active,
.sr-tab-active:hover {
  background: linear-gradient(90deg, #5b1a62, #1a1a7a);
  color: #ffffff;
}

.sr-panel-hidden {
  display: none !important;
}

.sr-card {
  background: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: 1.25rem;
  box-shadow: 0 12px 40px rgba(91, 26, 98, 0.10);
  overflow: hidden;
}

.sr-card-head {
  background: linear-gradient(90deg, #5b1a62, #1a1a7a);
  color: #ffffff;
  padding: 1rem 1.4rem;
}

.sr-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.sr-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 1.4rem 1.4rem;
}

.sr-table {
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
}

.sr-table thead th {
  background: #05053d;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.7rem 0.8rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 2px solid #1a1a7a;
}

.sr-table thead th.aCenter { text-align: center; }
.sr-table thead th:first-child { border-top-left-radius: 0.6rem; }
.sr-table thead th:last-child { border-top-right-radius: 0.6rem; }

.sr-table .sr-td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

.sr-table .sr-td.aCenter { text-align: center; }

.sr-row:nth-child(even) td { background: #faf9fc; }
.sr-row:hover td { background: #f3eef5; }

.sr-staff {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 170px;
}

.sr-staff-img {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid #ede9fe;
  background: #ffffff;
  flex: 0 0 auto;
}

.sr-staff-link {
  font-weight: 600;
  color: #5b1a62;
  text-decoration: none;
  font-size: 0.9rem;
}

.sr-staff-link:hover { text-decoration: underline; }

.sr-count {
  min-width: 3rem;
  padding: 0.35rem 0.75rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.sr-count:hover { filter: brightness(0.95); }
.sr-count-assigned { background: #1a1a7a; }
.sr-count-completed { background: #16a34a; }
.sr-count-muted { background: #cbd5e1; color: #475569; cursor: default; }
.sr-count-muted:hover { filter: none; }

.sr-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 0.55rem;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.sr-icon-primary { background: #ede9fe; color: #5b1a62; }
.sr-icon-primary:hover { background: #5b1a62; color: #ffffff; }
.sr-icon-success { background: #dcfce7; color: #16a34a; }
.sr-icon-success:hover { background: #16a34a; color: #ffffff; }

.sr-empty {
  text-align: center;
  padding: 1.5rem;
  color: #94a3b8;
  font-size: 0.9rem;
}

@media (max-width: 520px) {
  .sr-tabs {
    width: 100%;
    flex-direction: column;
  }

  .sr-tab {
    width: 100%;
  }
}

/* =====================================================================
 * Default Settings page (default_settings.jsp)  -> ds-* prefix
 * ===================================================================== */
.ds-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

.ds-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ds-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #05053d;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ds-title i { color: #5b1a62; }

.ds-subtitle {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: #64748b;
}

.ds-tabs {
  display: inline-flex;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  padding: 0.3rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.8rem;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.ds-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 125px;
  padding: 0.6rem 1rem;
  border: 0;
  border-radius: 0.6rem;
  background: transparent;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ds-tab:hover {
  background: #f3eef5;
  color: #5b1a62;
}

.ds-tab-active,
.ds-tab-active:hover {
  background: linear-gradient(90deg, #5b1a62, #1a1a7a);
  color: #ffffff;
}

.ds-panel-hidden { display: none; }

.ds-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.ds-card {
  background: #ffffff;
  border: 1px solid #eef0f5;
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.ds-card-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.1rem;
  background: linear-gradient(90deg, #05053d, #1a1a7a);
  color: #ffffff;
}

.ds-card-icon { font-size: 1rem; opacity: 0.9; }

.ds-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
}

.ds-card-body { padding: 0.35rem 1.1rem 0.85rem; }

.ds-activity-card {
  width: 100%;
  max-width: none;
}

.ds-activity-intro {
  margin: 0.2rem 0 0;
  color: #64748b;
  font-size: 0.85rem;
}

.ds-activity-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #eef0f5;
}

.ds-activity-heading {
  margin: 0;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 700;
}

.ds-activity-form {
  display: flex;
  align-items: stretch;
  gap: 0.55rem;
  width: min(100%, 540px);
}

.ds-activity-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 0.6rem;
  padding: 0.55rem 0.75rem;
  color: #0f172a;
  font-size: 0.85rem;
  outline: none;
}

.ds-activity-form input:focus {
  border-color: #5b1a62;
  box-shadow: 0 0 0 3px rgba(91, 26, 98, 0.12);
}

.ds-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ds-btn-add {
  flex: 0 0 auto;
  background: linear-gradient(90deg, #5b1a62, #1a1a7a);
  color: #ffffff;
}

.ds-inline-message {
  display: none;
  margin: 0.75rem 1.1rem 0;
  border-radius: 0.55rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
}

.ds-inline-visible { display: block; }
.ds-inline-success { background: #dcfce7; color: #166534; }
.ds-inline-error { background: #fee2e2; color: #b91c1c; }

.ds-confirm-dialog { max-width: 440px; }

.ds-confirm-text {
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}

.ds-btn-delete {
  background: #dc2626;
  color: #ffffff;
}

.ds-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.ds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.ds-table th {
  padding: 0.7rem 1.1rem;
  background: #f8fafc;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #e2e8f0;
}

.ds-table td {
  padding: 0.75rem 1.1rem;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
}

.ds-table tbody tr:last-child td { border-bottom: 0; }
.ds-table tbody tr:hover td { background: #faf7fb; }

.ds-table .ds-id-cell {
  width: 15%;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.ds-table .ds-name-cell { width: 70%; }

.ds-table .ds-action-heading,
.ds-table .ds-action-cell {
  width: 15%;
  text-align: center;
}

.ds-icon-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0.5rem;
  background: #fee2e2;
  color: #dc2626;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ds-icon-delete:hover {
  background: #dc2626;
  color: #ffffff;
}

.ds-table .ds-table-state {
  padding: 2rem 1rem;
  color: #94a3b8;
  text-align: center;
}

.ds-table .ds-table-error { color: #dc2626; }

.ds-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid #f1f3f8;
}

.ds-row:last-child { border-bottom: none; }

.ds-row-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #334155;
  margin: 0;
  word-break: break-word;
}

.ds-row-value {
  font-size: 0.85rem;
  color: #0f172a;
  min-width: 0;
  word-break: break-word;
}

.ds-empty-val { color: #94a3b8; }

/* ---- injected content coming from default_settings.js ---- */
#root_default_settings .col-md-10 {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  width: auto;
  padding: 0;
  float: none;
}

#root_default_settings .showSetting,
#root_default_settings .hideSetting { width: 100%; }

#root_default_settings .editIcon {
  cursor: pointer;
  color: #5b1a62;
  background: #f3eef5;
  width: 1.6rem;
  height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.45rem;
  transition: all 0.15s ease;
  font-size: 0.8rem;
}

#root_default_settings .editIcon:hover {
  background: #5b1a62;
  color: #ffffff;
}

#root_default_settings .showSetting a {
  color: #1a1a7a;
  text-decoration: underline;
  font-weight: 500;
}

#root_default_settings .smsSettingVal { margin: 0; }

#root_default_settings .input-group {
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
  width: 100%;
}

#root_default_settings .inpBorder,
#root_default_settings input[type="text"],
#root_default_settings textarea,
#root_default_settings select.form-control {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#root_default_settings .inpBorder:focus,
#root_default_settings input[type="text"]:focus,
#root_default_settings textarea:focus,
#root_default_settings select.form-control:focus {
  border-color: #5b1a62;
  box-shadow: 0 0 0 3px rgba(91, 26, 98, 0.12);
}

#root_default_settings textarea { min-height: 70px; resize: vertical; }

#root_default_settings span.inpBorder {
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.85rem;
}

#root_default_settings .queckBtnCls {
  flex: 0 0 auto;
  border: none;
  background: #16a34a;
  color: #ffffff;
  border-radius: 0.5rem;
  width: 2.1rem;
  cursor: pointer;
}

#root_default_settings .queckBtnCls:hover { filter: brightness(0.95); }

#root_default_settings input[type="radio"] { margin-right: 0.25rem; }

/* ---- Modals (Tailwind-styled, driven by ds-open) ---- */
.ds-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 1050;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 1rem 2rem;
  overflow-y: auto;
}

.ds-modal.ds-open { display: flex; }

.ds-modal-dialog { width: 100%; max-width: 520px; }
.ds-modal-lg { max-width: 820px; }

.ds-modal-content {
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 20px 45px rgba(2, 6, 23, 0.35);
  overflow: hidden;
}

.ds-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  background: linear-gradient(90deg, #05053d, #1a1a7a);
  color: #ffffff;
}

.ds-modal-title { font-size: 1rem; font-weight: 600; margin: 0; }

.ds-modal-x {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
}

.ds-modal-x:hover { opacity: 1; }

.ds-modal-body { padding: 1.2rem; }

.ds-form-group { margin-bottom: 1rem; }

.ds-modal-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.5rem;
}

.ds-file {
  width: 100%;
  border: 1px dashed #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.5rem;
  font-size: 0.85rem;
}

.ds-nic-instance {
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  min-height: 150px;
  padding: 0.25rem;
}

.ds-modal-actions {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.ds-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: none;
  border-radius: 0.6rem;
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.ds-btn:hover { filter: brightness(0.96); }
.ds-btn-save { background: #16a34a; color: #ffffff; }
.ds-btn-cancel { background: #e2e8f0; color: #334155; }

@media (max-width: 900px) {
  .ds-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  .ds-tabs {
    display: flex;
    width: 100%;
  }

  .ds-tab {
    flex: 1;
    min-width: 0;
  }

  .ds-activity-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .ds-activity-form {
    flex-direction: column;
    width: 100%;
  }

  .ds-btn-add { justify-content: center; }

  .ds-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.25rem;
  }
}

/* ==========================================================================
   homepage_header_new.jsp — fixed nav clearance (hhn- prefix)
   Mobile nav bar is taller than the old 41px spacer, which clipped headings.
   ========================================================================== */

.hhn-nav-spacer {
  display: block;
  width: 100%;
  height: 3.25rem; /* matches fixed nav h-12 (~52px with buffer) */
  min-height: 3.25rem;
  padding: 0 !important;
  margin: 0;
  border: 0;
  flex-shrink: 0;
  pointer-events: none;
  visibility: hidden;
}

/* Mobile/tablet: padded hamburger bar is taller than desktop h-12 */
@media (max-width: 1023px) {
  .hhn-nav-spacer {
    height: 4.5rem;
    min-height: 4.5rem;
  }
}

@media (max-width: 479px) {
  .hhn-nav-spacer {
    height: 4.75rem;
    min-height: 4.75rem;
  }
}

/* Anchor/scroll targets should also clear the fixed header */
html {
  scroll-padding-top: 4.75rem;
}

@media (min-width: 1024px) {
  html {
    scroll-padding-top: 3.25rem;
  }
}

