/*
 * Hanuma Global OCC CSS
 * 
 * Description:
 * This stylesheet contains custom CSS rules and Bootstrap overrides
 * specifically tailored for the Hanuma Global OCC product. The customizations
 * aim to enhance the user interface, improve responsiveness, and align
 * with the brand’s visual identity.
 * 
 * Author: Harsh Bhardwaj
 * Date: 2025-09-28
 */

:root {
  --primary: #1f8bf7;
  --primary-hover: #0d6fd4;
  --border: #E4EBF7;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #fff;
  font-size: 0.875rem;
  color: #222222;
  margin: 0;
  padding: 0;
}

/* Scrollbar subtle styling */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-thumb {
  background-color: #e5e7eb;
  border-radius: 9999px;
}

.text-primary {
  color: #0d82f6 !important;
  ;
}

/*Custom Font Sizes */
.cfs-11 {
  font-size: 0.688rem;
}

.cfs-12 {
  font-size: 0.75rem;
}

.cfs-13 {
  font-size: 0.813rem;
}

.cfs-16 {
  font-size: 1rem;
}

.cfs-18 {
  font-size: 1.125rem;
}

.cfs-20 {
  font-size: 1.25rem;
}

.cfs-22 {
  font-size: 1.375rem;
}

.cfs-24 {
  font-size: 1.5rem;
}

/* Custom UI Styles*/
.btn-primary {
  background-color: #1f8bf7;
  border-color: #1f8bf7;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #186fcb;
  border-color: #186fcb;
  box-shadow: 0 0 0 0.25rem rgba(31, 139, 247, 0.5);
}

.btn-secondary {
  background-color: #fff;
  color: #1f8bf7;
  border: 1px solid #e4ebf7;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: #1f8bf7;
  color: #fff;
  border-color: #1f8bf7;
}

/* Text Muted*/
.text-muted {
  color: #6F7794 !important;
}

/* Table styles */
thead th {
  font-weight: 500;
  font-size: 0.8125rem;
  /* ~13px */
  border-bottom: 1px solid #e4ebf7;
  color: #222;
}

tbody td {
  color: #6f7794;
  font-size: 0.8125rem;
  vertical-align: middle;
}

tbody tr:hover {
  background-color: #f8f9fa;
  cursor: pointer;
}

/* Badges for subscription statuses */
.badge-community {
  background-color: #dbedff;
  color: #0d82f6;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25em 0.5em;
  border-radius: 9999px;
}

.badge-demo {
  background-color: #fee2e2;
  color: #dc2626;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25em 0.5em;
  border-radius: 9999px;
}

/* Account filter buttons */
.account-filter-btn {
  height: 34px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  border: 1px solid #e4ebf7;
  transition: all 0.2s;
}

.account-filter-btn.active {
  background-color: #1f8bf7;
  color: white;
  border-color: #e4ebf7;
  box-shadow: 0 1px 3px rgb(31 139 247 / 0.4);
}

.account-filter-btn:not(.active):hover {
  background-color: #f8f9fa;
  color: #6c757d;
}

/* Custom checkbox size */
.form-check-input {
  width: 1rem;
  height: 1rem;
}


/* Sidebar, Pages CSS*/

@keyframes pulse-twice {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
  }

  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
  }
}

.pulse-twice {
  animation: pulse-twice 1s ease-out 0s 2;
  /* 2 iterations */
}

#toggleSidebar {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 0;
  justify-content: center;
  align-items: center;
}

#toggleSidebar:hover {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  background: #ecf3ff;
}

.main-header {
  position: fixed;
  top: 0;
  left: 240px;
  right: 0;
  background-color: #fff;
  border-bottom: 1px solid #E2E9F7;
  padding: 15px 1.5rem 14px 1.5rem;
  font-size: 1.25rem;
  line-height: 1.75rem;
  z-index: 1000;
  transition: left 0.3s ease;
}

.sidebar.collapsed~.main-content .main-header {
  left: 64px;
}

.main-body {
  margin-top: 162px;
  /* space below fixed header */
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background: #F9FAFB;
  border-right: 1px solid #EDF2FA;
  transition: all 0.3s ease;
  padding: 12px 0 16px 0;
  display: flex;
  flex-direction: column;
  z-index: 1001;
}

.sidebar.collapsed {
  width: 64px !important;
  padding-inline: 0.5rem !important;
  /* Affects only left & right */
  border-right: 1px solid #e5e7eb;
  background: #ffffff;
}

.sidebar .sidebar-text {
  transition: opacity 0.3s;
  white-space: nowrap;
  overflow: hidden;
  font-size: .875rem;
}

.sidebar.collapsed .sidebar-text {
  opacity: 0;
  visibility: hidden;
  width: 0;
}

.sidebar-link {
  color: #6F7794;
  font-weight: 400;
  display: flex;
  align-items: center;
  padding: 0.65rem 0.75rem;
  margin: 2px 0;
  border-radius: 8px;
  transition: all 0.2s;
  text-decoration: none;
}

.sidebar-link:hover,
.sidebar-link.active {
  background-color: #ecf3ff;
  color: #1f8bf7 !important;
}

.sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: 0.75rem;
}

.sidebar.collapsed .sidebar-link i {
  margin-right: 0 !important;
}

.sidebar.collapsed .sidebar-link.active {
  background-color: #ecf3ff;
  color: #1f8bf7 !important;
}

#sidebarHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.sidebar.collapsed #sidebarHeader {
  justify-content: center !important;
  height: 40px;
  /* consistent */
}

.sidebar.collapsed #sidebarHeader>div:first-child {
  display: none;
}

.toggle-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #6F7794;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-footer {
  font-size: 0.688rem;
  color: #B9BCC9;
  text-align: center;
  position: relative;
  padding-top: 16px;
  letter-spacing: 0.2px;
}

.sidebar.collapsed .sidebar-footer .app-version-text,
.sidebar.collapsed .sidebar-footer .hanuma-text {
  display: none;
}

.sidebar-footer .about-icon {
  display: none;
  font-size: 1.5rem;
  color: #1f8bf7;
  cursor: pointer;
}

.sidebar.collapsed .sidebar-footer .about-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0 auto;
}

.sidebar.collapsed .sidebar-footer {
  padding-top: 0 !important;
}

.sidebar-user {
  border-top: 1px solid #E2E9F7;
  border-bottom: 1px solid #E2E9F7;
  padding: 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.user-info {
  display: block;
}

.user-info small {
  color: #939BA9;
}

.logout-icon {
  display: none;
  color: #6F7794;
  cursor: pointer;
  padding: 0.25rem;
  flex-shrink: 0;
  transition: color 0.3s ease;
}

.sidebar.collapsed .user-info {
  display: none !important;
}

.sidebar.collapsed .user-avatar {
  margin: 0 auto !important;
}

.sidebar.collapsed .sidebar-user {
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center;
  gap: 0.25rem;
}

.sidebar.collapsed .logout-icon {
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #1f8bf7;
  margin: 0 auto;
  transition: color 0.3s ease;
}

.sidebar.collapsed .logout-icon:hover {
  color: #166fce;
}

.main-content {
  margin-left: 240px;
  transition: margin-left 0.3s ease;
  padding: 1rem 1.5rem;
}

.sidebar.collapsed~.main-content {
  margin-left: 64px;
}

.show-when-expanded {
  display: block;
}

.show-when-collapsed {
  display: none;
}

.sidebar.collapsed .show-when-expanded {
  display: none !important;
}

.sidebar.collapsed .show-when-collapsed {
  display: flex !important;
}

.avatar-initials {
  background-color: #0D82F6;
  color: #ffffff;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  line-height: normal;
  font-size: 0.875rem;
  text-transform: uppercase;
}

.userprofileText {
  color: #222222;
  font-size: 0.813rem;
}

.card {
  background: white;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.06);
}

.breadcrumb {
  margin-bottom: 8px;
  color: #6b7280 !important;
}

.breadcrumb .breadcrumb-item .sourceBreadcrum:hover {
  color: #0d6efd !important;
}

/* Remove Bootstrap's automatic divider */
.custom-breadcrumb .breadcrumb-item+.breadcrumb-item::before {
  content: none !important;
}

.breadcrumb-item+.breadcrumb-item {
  margin-left: -8px;
  /* Reduce space on the left of next item */
}

/* Fix breadcrumb below the fixed header */
.fixedBreadcrumbTabs {
  position: fixed;
  top: 61px;
  /* Height of fixed header */
  left: 240px;
  /* Width of sidebar */
  right: 0;
  background-color: #fff;
  z-index: 1000;
  /* Above main header */
  padding: 1.1rem 1.5rem 0 1.5rem;
}

/* Adjust breadcrumb for collapsed sidebar */
.sidebar.collapsed~.main-content .fixedBreadcrumbTabs {
  left: 64px;
}


/* Tabs */
/* General tab styles */
#myTab .nav-link {
  color: #6b7280;
  font-weight: 500;
  font-size: 14px;
  padding: 12px 0;
  border: none;
  position: relative;
  transition: all 0.3s ease;
}

/* Underline effect */
#myTab .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 4px;
  background-color: #007BFF;
  /* Bootstrap primary or any custom color */
  transition: width 0.3s ease;
}

/* On hover and focus */
#myTab .nav-link:hover,
#myTab .nav-link:focus {
  color: #007BFF;
}

/*#myTab .nav-link:hover::after,
#myTab .nav-link:focus::after {
  width: 100%;
}
*/

/* Active tab */
#myTab .nav-link.active {
  color: #222222;
  font-weight: 500;
}

#myTab .nav-link.active::after {
  width: 100%;
}

/* Optional: Customize tab container spacing */
#myTab {
  border-bottom: 1px solid #e5e7eb;
  gap: 24px;
}


/* Login Page */

.loginBody {
  background: #F6F8FA;
}

.loginBox {
  max-width: 460px;
  width: 100%;
  background: #ffffff;
  box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.06);
  border-radius: 0;
  padding: 30px 40px;
}

.logoOCC {
  animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  border-radius: 0.5rem;
}

.form-control {
  height: 42px;
  font-size: 0.875rem;
  /* text-sm */
  padding: 0.375rem 0.75rem;
  /* px-3 py-2 */
  border: 1px solid var(--border);
  border-radius: 0;
  /* rounded-md */
  color: #939BA9 !important;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(31, 139, 247, 0.25);
}

.form-control.is-invalid {
  border-color: #f56565;
  box-shadow: 0 0 0 0.2rem rgba(245, 101, 101, 0.25);
}

.btn-signin {
  height: 42px;
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  font-weight: 500;
  border-radius: 0.375rem;
}

.forgot-link {
  font-size: 0.8125rem;
  /* 13px */
  color: #6f7794;
  text-decoration: none;
}

.forgot-link:hover {
  text-decoration: underline;
}

.footer-text {
  font-size: 0.6875rem;
  /* 11px */
  color: #b9bcc9;
}

.bottom-footer {
  font-size: 0.75rem;
  color: #b9bcc9;
}

/*Org Management Page*/
.organization-managementForm .organization-heading {
  font-size: 0.688rem;
  letter-spacing: 1.1px;
  color: #0D82F6;
  text-transform: uppercase;
  padding-bottom: 8px;
}

.organization-managementForm label {
  font-size: 0.813rem;
  color: #6F7794;
  padding-bottom: 8px
}

.organization-managementForm input {
  color: #222222 !important;
  font-size: 0.813rem;
}