/* Custom Color Palette */

:root {
  --forest-green: #226b38;
  --forest-green-hover: #1a522b;
  --soft-black: #1e1e1e;
  --soft-black-light: #2c2c2c;
  --bg-off-white: #f7f9f8;
  --white: #ffffff;
}

/* width */

::-webkit-scrollbar {
  width: 15px;
}

/* Track */

::-webkit-scrollbar-track {
  background: var(--bs-dark);
}

::-webkit-scrollbar-track:hover {
  background: #515151;
  transition: background 0.5s linear;
}

/* Handle */

::-webkit-scrollbar-thumb {
  background: url("../../assets/img/favicon.webp") center / 15px no-repeat, var(--bs-white);
  border-radius: 0;
}

/* Handle on hover */

::-webkit-scrollbar-thumb:hover {
  background: url("../../assets/img/favicon.webp") center / 16px no-repeat, var(--bs-primary);
  border: 1px solid var(--bs-dark);
}

/* Typography */

body {
  font-family: 'Fira Sans', sans-serif;
  background-color: var(--bg-off-white);
  color: var(--soft-black);
  font-weight: 400;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

body:has( > .auth-wrapper) {
  background: url("../../assets/img/footer_img.png") -58px 100% / auto no-repeat, linear-gradient(-131deg, #d0e0bb 0%, #e6e6e6 63%);
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .fw-bolder {
  font-weight: 700;
}

/* Component Overrides */

.btn-primary {
  color: var(--bs-btn-color);
  background-color: var(--forest-green);
  border-color: var(--forest-green);
  font-weight: 600;
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--forest-green-hover);
  border-color: var(--forest-green-hover);
}

.text-primary-custom {
  color: var(--forest-green) !important;
}

.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  margin-bottom: 24px;
}

.card-header {
  background-color: var(--white);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding: 1rem 1.25rem;
  border-top-left-radius: 12px !important;
  border-top-right-radius: 12px !important;
}

/* Layout Styles */

.wrapper {
  display: flex;
  width: 100%;
  align-items: stretch;
  min-height: 100vh;
}

/* Sidebar */

#sidebar {
  min-width: 260px;
  max-width: 260px;
  background: var(--soft-black);
  color: var(--white);
  transition: all 0.3s;
  position: relative;
  padding-bottom: 3rem;
}

#sidebar .sidebar-header {
  padding: 20px;
  background: var(--soft-black-light);
  border-bottom: 1px solid #333;
  display: flex;
  align-items: center;
}

#sidebar .sidebar-header img {
  width: 16px;
  height: 16px;
  margin-right: 1rem;
}

#sidebar ul.components {
  padding: 20px 0;
}

#sidebar ul li a {
  padding: 12px 20px;
  font-size: 1.05rem;
  display: block;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s;
}

#sidebar ul li a:hover, #sidebar ul li.active > a {
  color: var(--white);
  background: var(--forest-green);
  border-left: 4px solid var(--white);
}

#sidebar ul li a i {
  margin-right: 10px;
  font-size: 1.1rem;
}

/* Main Content */

#content {
  width: 100%;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-navbar {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
  padding: 10px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-body {
  padding: 30px;
  flex-grow: 1;
  position: relative;
}

/* Form Switches */

.form-switch .form-check-input:checked {
  background-color: var(--forest-green);
  border-color: var(--forest-green);
}

/* App Logos placeholder */

.app-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background-color: var(--bg-off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--soft-black);
}

.dropdown-menu {
  --bs-dropdown-link-active-bg: var(--bs-primary);
}

.hasNotification .btn::after {
  content: '';
  display: block;
  padding: 4px;
  position: absolute;
  top: -2px;
  right: -2px;
  border: none;
  border-radius: 100%;
  background: var(--bs-danger);
}

/* --- Layout & Card --- */

.auth-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-grow: 1;
  justify-content: center;
}

/* SVG Logo Styling */

.auth-logo {
  width: 60px;
  height: 60px;
  margin-bottom: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-logo svg {
  width: 100%;
  height: 100%;
}

.auth-brand {
  text-align: center;
  margin-bottom: 30px;
}

.auth-brand h1 {
  color: var(--soft-black);
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.2;
}

.auth-brand span {
  color: var(--bs-gray);
  font-size: 1rem;
  font-weight: 500;
  display: block;
}

.auth-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  padding: 40px 30px;
  border: 1px solid rgba(0,0,0,0.02);
  width: 100%;
  box-shadow: 5px 5px var(--bs-primary);
  transition: box-shadow 0.2s linear;
}

.auth-card:hover {
  box-shadow: 3px 3px var(--forest-green-hover);
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-header h2 {
  margin: 0 0 8px 0;
  font-size: 1.4rem;
}

.auth-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- Form Elements --- */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--soft-black);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--soft-black);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--forest-green);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.form-control::placeholder {
  color: #adb5bd;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-wrapper input[type="checkbox"] {
  accent-color: var(--forest-green);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.checkbox-wrapper label {
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Buttons --- */

.btn-primary {
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.btn-brand:hover {
  background-color: var(--forest-green-hover);
}

/* --- USER DASH --- */

/* Page Headers */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-title {
  margin: 0;
  font-size: 1.75rem;
}

.page-subtitle {
  color: var(--bs-grey);
  margin: 5px 0 0 0;
  font-size: 0.95rem;
}

/* Cards */

.data-card {
  background-color: var(--bs-white);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  padding: 24px;
}

/* Toolbars (Search & Filter) */

.data-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 15px;
}

.search-input-wrapper {
  position: relative;
  flex-grow: 1;
  max-width: 350px;
}

.search-input-wrapper svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #333;
}

.search-input-wrapper input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 1px solid var(--bs-dark);
  border-radius: 8px;
  font-family: inherit;
  outline: none;
}

.search-input-wrapper input:focus {
  border-color: var(--forest-green);
}

.filter-group {
  display: flex;
  gap: 10px;
}

/* Custom Data Table */

.directory-table {
  width: 100%;
  border-collapse: collapse;
}

.directory-table th {
  text-align: left;
  padding: 12px 16px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border-color);
}

.directory-table td {
  padding: 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.directory-table tbody tr:hover {
  background-color: var(--bg-off-white);
}

.directory-table tbody tr:last-child td {
  border-bottom: none;
}

/* User Identify Component (Avatar + Name inside table) */

.user-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eee;
  font-weight: bold;
  color: white;
  background-color: var(--bs-gray);
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 700;
  color: var(--soft-black);
  margin: 0;
}

.user-email {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

/* Badges */

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.status-badge i {
  margin-right: 5px;
  font-size: 0.75rem;
}

.badge-active {
  background-color: rgba(34, 107, 56, 0.1);
  color: var(--forest-green);
  border-color: rgba(34, 107, 56, 0.2);
}

.badge-inactive {
  background-color: rgba(108, 117, 125, 0.1);
  color: var(--text-muted);
  border-color: rgba(108, 117, 125, 0.2);
}

.badge-pending {
  background-color: rgba(255, 193, 7, 0.1);
  color: #d39e00;
  border-color: rgba(255, 193, 7, 0.2);
}

.auth-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-indicator.secured {
  color: var(--forest-green);
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px;
  font-size: 1.1rem;
  transition: color 0.2s;
}

.btn-icon:hover {
  color: var(--forest-green);
}

/* --- LOGIN SCREEN --- */

/* --- Two FA --- */
.two-fa-input-group {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 24px;
}

.two-fa-input {
  width: 45px;
  height: 55px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: 8px;
  color: var(--soft-black);
}

.two-fa-input:focus {
  outline: none;
  border-color: var(--forest-green);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

/* Utility to hide steps */

.d-none {
  display: none !important;
}

/* Alert Box */

.alert-info {
  background-color: rgba(34, 107, 56, 0.05);
  border: 1px solid rgba(34, 107, 56, 0.1);
  color: var(--forest-green);
  padding: 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
}

/* --- Footer Pill --- */

.footer-pill {
  display: inline-flex;
  align-items: center;
  background-color: #333;
  color: #ffffff;
  padding: 5px 17px 5px 5px;
  border-radius: 50px;
  font-size: 0.85rem;
  border: 3px solid #333;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  gap: 12px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.footer-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(179,179,179,0.44);
  color: #333;
  background: linear-gradient(-145deg, #d6c108, #e3e3e3), white;
  border-color: #333;
  text-decoration: none;
}

.footer-pill img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: contain;
  background-color: white;
}

.status-badge > svg {
  margin-right: 0.3rem;
}

.auth-wrapper .btn {
  width: 100%;
}

.developer-footer {
  margin-bottom: 2rem;
}

#sidebar .developer-footer {
  margin-bottom: 2px;
  position: absolute;
  bottom: 5px;
  left: 5px;
  right: 5px;
  text-align: center;
  font-size: 10px;
  zoom: 0.7;
}

.auth-logo img {
  width: 100%;
}

body:has(.htmx-request) [hx-indicator="#step-processing"]{
  display: none;
}
