/*==========================
Starter Kit Brand Variables
==========================*/
:root {
  /* Brand Primary Colors - Mapped from HTML injection with fallbacks */
  --brand-primary: var(--primary-color, #0d6efd);
  --brand-secondary: var(--secondary-color, #6c757d);
  --brand-accent: var(--accent-color, #ffc107);
  
  /* Functional Colors */
  --brand-success: var(--success-color, #198754);
  --brand-danger: var(--danger-color, #dc3545);
  --brand-dark: var(--dark-color, #212529);
  --brand-light: var(--light-color, #f8f9fa);

  /* Layout Variables */
  --bg-canvas: var(--brand-light);
  --white-accent: #FFFFFF;
  --text-main: #1A1A1A;
  --border-color: #e2e8f0;
}


/* == Start of Custom Select */
.custom-select-wrapper {
  position: relative;
  z-index: 20;
}

.custom-select-wrapper.active {
  z-index: 1100 !important;
}

.has-active-select,
.glass-card:has(.custom-select-wrapper.active),
.modal-content:has(.custom-select-wrapper.active),
.modal-body:has(.custom-select-wrapper.active) {
  overflow: visible !important;
  z-index: 1090 !important;
  position: relative !important;
}

.full-width {
  width: 100%;
}

.custom-select-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.92rem;
}

.custom-select-display {
  border: 2px solid var(--border-color);
  padding: .5rem .85rem;
  border-radius: 14px;
  cursor: pointer;
  background: var(--white-accent);
  position: relative;
  transition: all 0.2s ease;
  font-weight: 600;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.custom-select-display:hover {
  border-color: var(--brand-secondary);
}

.custom-select-display .arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.9rem;
  color: var(--text-main);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-select-wrapper.active .custom-select-display .arrow,
.custom-select-display.active .arrow {
  transform: translateY(-50%) rotate(180deg) !important;
}

[dir="rtl"] .custom-select-display .arrow {
  left: 14px;
  right: auto;
}

[dir="ltr"] .custom-select-display .arrow {
  right: 14px;
  left: auto;
}

/* Caret Fixes & Resets */
.no-caret::after,
.dropdown-toggle.no-caret::after,
.no-caret::before,
.dropdown-toggle.no-caret::before {
  display: none !important;
  content: none !important;
  border: none !important;
}

[dir="rtl"] .dropdown-toggle:not(.no-caret)::after {
  margin-right: 0.45em !important;
  margin-left: 0 !important;
  vertical-align: 0.15em !important;
}

[dir="ltr"] .dropdown-toggle:not(.no-caret)::after {
  margin-left: 0.45em !important;
  margin-right: 0 !important;
  vertical-align: 0.15em !important;
}

.custom-select-display.active {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.custom-select-list {
  list-style: none;
  padding: 6px;
  margin: 6px 0 0 0;
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: var(--white-accent);
  display: none;
  z-index: 1080 !important;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12);
}

.custom-select-list.show {
  display: block;
}

.custom-select-list li {
  padding: 10px 15px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.2s ease;
  color: var(--text-main);
  background: var(--white-accent);
}

.custom-select-list li:hover {
  background: var(--brand-light);
  color: var(--brand-primary);
  padding-left: 20px;
}

[dir="rtl"] .custom-select-list li:hover {
  padding-left: 15px;
  padding-right: 20px;
}

/* End of custom select == */

/*==========================
Custom File Input Styling
==========================*/
.file-input-container {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: .375rem .75rem;
    background-color: var(--white-accent);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    min-height: 50px;
}

.file-input-container:hover {
    border-color: var(--brand-secondary);
    background-image: linear-gradient(rgba(0,0,0,0.02), rgba(0,0,0,0.02));
}

.file-input-container.active, 
.file-input-container.has-file {
    border-color: var(--brand-primary);
}

.file-input-content {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.file-icon {
    font-size: 1.2rem;
    color: var(--brand-secondary);
    flex-shrink: 0;
}

.file-placeholder {
    color: #6c757d;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-name {
    color: var(--text-main);
    font-weight: 500;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.visually-hidden-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
}

[dir="ltr"] .form-label {
    text-align: left;
    display: block;
}

[dir="rtl"] .form-label {
    text-align: right;
    display: block;
}

[dir="ltr"] .file-input-content {
    text-align: left;
}

[dir="rtl"] .file-input-content {
    text-align: right;
    flex-direction: row;
}

/* Spinner color */
.spinner-border-sm {
    --bs-spinner-border-width: 0.2em;
    border-color: rgba(255, 255, 255, 0.3) !important;
    border-right-color: white !important;
}


body {
  font-family: 'Cairo', sans-serif;
  background-color: var(--brand-light);
  color: var(--text-main);
}

/* Navbar Styles */
.navbar {
  background-color: var(--white-accent) !important;
  border-bottom: 2px solid var(--brand-primary);
}

.navbar-brand {
  font-weight: bold;
  color: var(--brand-primary) !important;
  font-size: 1.5rem;
}

.navbar-brand:hover {
  color: var(--brand-secondary) !important;
}

.nav-link {
  color: var(--text-main);
  border-radius: 0.25rem;
  margin-bottom: 5px;
  transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  background-color: var(--brand-light);
  color: var(--brand-primary);
}

/* Main Content */
.main-content {
  padding: 7px;
  min-height: calc(100vh - 56px);
}

/* Card Styles */
.card {
  border: none;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: 8px;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
  background-color: var(--brand-primary);
  color: var(--white-accent);
  border-radius: 8px 8px 0 0 !important;
}

/* Stat Cards */
.stat-card {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, var(--white-accent) 0%, var(--brand-light) 100%);
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
  opacity: 0.8;
}

.stat-icon.text-primary {
  color: var(--brand-primary) !important;
}

.stat-icon.text-success {
  color: var(--brand-success) !important;
}

.stat-icon.text-warning {
  color: var(--brand-accent) !important;
}

.stat-icon.text-danger {
  color: var(--brand-danger) !important;
}

/* ==============================================================================
   Text Clamping Utilities
   ============================================================================== */
.text-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==============================================================================
   Liquid Glass Buttons System (Light Liquid Glass 2.0)
   ============================================================================== */
.btn-liquid-primary {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  border-radius: 14px !important;
  padding: 0.65rem 1.4rem !important;
  font-family: 'Cairo', sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.92rem !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  text-decoration: none !important;
  cursor: pointer !important;
  line-height: 1.4 !important;
}

.btn-liquid-primary:hover,
.btn-liquid-primary:focus {
  background: linear-gradient(135deg, #047857 0%, #059669 100%) !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.48) !important;
}

.btn-liquid-primary:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
}

.btn-liquid-primary.btn-sm,
.btn-sm.btn-liquid-primary {
  padding: 0.42rem 0.95rem !important;
  font-size: 0.84rem !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
}

.btn-liquid-ghost {
  background: rgba(255, 255, 255, 0.95) !important;
  color: #064e3b !important;
  border: 1.5px solid #a7f3d0 !important;
  border-radius: 14px !important;
  padding: 0.65rem 1.35rem !important;
  font-family: 'Cairo', sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.92rem !important;
  box-shadow: 0 2px 8px rgba(6, 78, 59, 0.04) !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.45rem !important;
  text-decoration: none !important;
  cursor: pointer !important;
  line-height: 1.4 !important;
}

.btn-liquid-ghost:hover,
.btn-liquid-ghost:focus {
  background: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #059669 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.18) !important;
  transform: translateY(-2px) !important;
}

.btn-liquid-ghost:active {
  transform: translateY(0) !important;
}

.btn-liquid-ghost.btn-sm,
.btn-sm.btn-liquid-ghost {
  padding: 0.42rem 0.95rem !important;
  font-size: 0.84rem !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
}

.btn-liquid-danger {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1.5px solid #fecaca !important;
  border-radius: 12px !important;
  padding: 0.45rem 0.95rem !important;
  font-family: 'Cairo', sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.4rem !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}

.btn-liquid-danger:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25) !important;
}

/* Button Styles */
.btn-primary {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s;
}

.btn-primary:hover {
  background-color: var(--brand-primary); /* Keep same base */
  background-image: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.1)); /* Layer dark */
  border-color: rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

.btn-primary:active {
  background-image: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)); /* Deepen layer */
  transform: translateY(0);
}

.btn-outline-primary {
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.btn-outline-primary:hover {
  background-color: var(--brand-primary);
  background-image: linear-gradient(rgba(255,255,255,0.1), rgba(255,255,255,0.1)); /* Layer light */
  border-color: var(--brand-primary);
  color: white;
}

/* Nav Links & Items */
.nav-link:hover,
.nav-link.active {
  background-color: var(--brand-light);
  background-image: linear-gradient(rgba(0,0,0,0.03), rgba(0,0,0,0.03));
  color: var(--brand-primary);
}

.dropdown-item:hover {
  background-color: var(--brand-light);
  background-image: linear-gradient(rgba(0,0,0,0.02), rgba(0,0,0,0.02));
  color: var(--brand-primary);
}

.custom-select-list li:hover {
  background-color: var(--brand-light);
  background-image: linear-gradient(rgba(0,0,0,0.02), rgba(0,0,0,0.02));
  color: var(--brand-primary);
  padding-left: 20px;
}

/* Pagination Links */
.pagination-item.active .pagination-link {
  background-color: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.pagination-link:hover {
  background-color: var(--brand-light);
  background-image: linear-gradient(rgba(0,0,0,0.03), rgba(0,0,0,0.03));
  color: var(--brand-primary);
  transform: translateY(-2px);
}

/* Sidebar Styles */
.sidebar {
  background-color: var(--white-accent);
  border-left: 1px solid var(--border-color);
  min-height: 100vh;
}

.sidebar h6 {
  color: var(--brand-primary);
  font-weight: 600;
}

/* Footer Styles */
footer {
  background-color: var(--brand-primary) !important;
  color: var(--white-accent) !important;
  border-top: none !important;
}

footer p {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Text Colors */
.text-primary {
  color: var(--brand-primary) !important;
}

/* Alerts */
.alert-primary {
  background-color: var(--brand-light);
  border-color: var(--brand-secondary);
  color: var(--brand-primary);
}

/* Table Styles */
.table thead th {
  background-color: var(--brand-primary);
  color: var(--white-accent);
}

/* Language Switcher */
.language-switcher-top {
  position: absolute;
  top: 15px;
  z-index: 10;
}

[dir="ltr"] .language-switcher-top {
  right: 15px;
}

[dir="rtl"] .language-switcher-top {
  left: 15px;
}

.language-dropdown .lang-toggle {
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  border-color: var(--brand-secondary);
  color: var(--brand-primary);
  background: rgba(0, 0, 0, 0.05);
}

.language-dropdown .lang-toggle:hover {
  background: rgba(0, 0, 0, 0.1);
  border-color: var(--brand-primary);
}

.language-dropdown .dropdown-menu {
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 140px;
}

[dir="ltr"] .language-dropdown .dropdown-menu {
  right: 0;
  left: auto;
}

[dir="rtl"] .language-dropdown .dropdown-menu {
  left: 0;
  right: auto;
}

/* Form Inputs RTL/LTR Support */
[dir="ltr"] .form-control {
  text-align: left;
}

[dir="rtl"] .form-control {
  text-align: right;
}

[dir="ltr"] .form-control::placeholder {
  text-align: left;
}

[dir="rtl"] .form-control::placeholder {
  text-align: right;
}

/* Input Group Alignment */
[dir="ltr"] .input-group-text {
    border-radius: 12px 0 0 12px;
}

[dir="rtl"] .input-group-text {
    border-radius: 0 12px 12px 0;
}

[dir="ltr"] .input-group .form-control {
    border-radius: 0 12px 12px 0;
}

[dir="rtl"] .input-group .form-control {
    border-radius: 12px 0 0 12px;
}

/* Password field internal support */
.password-field {
    position: relative;
}

[dir="ltr"] .password-field .form-control {
    padding-right: 50px;
    padding-left: 12px;
}

[dir="rtl"] .password-field .form-control {
    padding-left: 50px;
    padding-right: 12px;
}

.password-toggle {
    color: var(--brand-secondary);
    background: none;
    border: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s ease;
}

[dir="ltr"] .password-toggle {
    right: 15px;
}

[dir="rtl"] .password-toggle {
    left: 15px;
}

.password-toggle:hover {
    color: var(--brand-primary);
}

/* ==============================================================================
   Custom Pagination Component (Light Liquid Glass)
   ============================================================================== */
.custom-pagination-nav {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  margin: 2.5rem 0 1rem 0 !important;
}

.pagination-list {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  list-style: none !important;
  list-style-type: none !important;
  padding: 6px 12px !important;
  margin: 0 auto !important;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1.5px solid #a7f3d0 !important;
  border-radius: 20px !important;
  box-shadow: 0 4px 18px rgba(6, 78, 59, 0.06) !important;
}

.pagination-list li,
.pagination-item {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex !important;
}

.pagination-list li::before,
.pagination-item::before,
.pagination-list li::marker,
.pagination-item::marker {
  content: none !important;
  display: none !important;
  font-size: 0 !important;
}

.pagination-link {
  min-width: 40px !important;
  height: 40px !important;
  padding: 0 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 12px !important;
  font-family: 'Cairo', sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  color: #064e3b !important;
  background: transparent !important;
  border: 1.5px solid transparent !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}

.pagination-link:hover {
  background: #ecfdf5 !important;
  border-color: #6ee7b7 !important;
  color: #059669 !important;
  text-decoration: none !important;
  transform: translateY(-1px);
}

.pagination-item.active .pagination-link {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
}

.pagination-item.disabled .pagination-link {
  opacity: 0.35 !important;
  color: #94a3b8 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
  background: transparent !important;
  border-color: transparent !important;
}

@media (max-width: 576px) {
  .pagination-list {
    gap: 4px;
  }
  .pagination-link {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 0.8rem;
  }
}

/*==============================================================================
  Restyled errorList Component (Light Liquid Glass Design System)
  ==============================================================================*/
#errorContainer {
  width: 100%;
  margin-bottom: 1.25rem;
  transition: all 0.3s ease;
}

#errorContainer:empty {
  display: none !important;
}

.error-list,
#errorList {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.error-list:empty,
#errorList:empty {
  display: none !important;
}

.error-list li,
#errorList li,
.error-list .alert,
#errorList .alert {
  position: relative;
  display: flex !important;
  align-items: center !important;
  padding: 0.85rem 1.25rem !important;
  border-radius: 14px !important;
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  margin-bottom: 0 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-width: 1.5px !important;
  border-style: solid !important;
  animation: errorItemFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes errorItemFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

[dir="rtl"] .error-list li::before,
[dir="rtl"] #errorList li::before {
  margin-left: 0.75rem;
  margin-right: 0;
}

[dir="ltr"] .error-list li::before,
[dir="ltr"] #errorList li::before {
  margin-right: 0.75rem;
  margin-left: 0;
}

.error-list li::before,
#errorList li::before {
  font-family: "Font Awesome 5 Free", "Font Awesome 6 Free", sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Alert Warning / Form Validation Errors */
.error-list .alert-warning,
#errorList .alert-warning {
  background: rgba(254, 243, 199, 0.95) !important;
  color: #92400e !important;
  border-color: #fde68a !important;
}

.error-list .alert-warning::before,
#errorList .alert-warning::before {
  content: "\f071";
  color: #d97706;
}

/* Alert Danger / Critical Errors */
.error-list .alert-danger,
#errorList .alert-danger {
  background: rgba(254, 242, 242, 0.95) !important;
  color: #991b1b !important;
  border-color: #fecaca !important;
}

.error-list .alert-danger::before,
#errorList .alert-danger::before {
  content: "\f06a";
  color: #dc2626;
}

/* Alert Success */
.error-list .alert-success,
#errorList .alert-success {
  background: rgba(236, 253, 245, 0.95) !important;
  color: #065f46 !important;
  border-color: #a7f3d0 !important;
}

.error-list .alert-success::before,
#errorList .alert-success::before {
  content: "\f058";
  color: #059669;
}

/* ==============================================================================
   Search Bar Component with Embedded Inside-Left Icon
   ============================================================================== */
.search-bar-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.search-bar-input {
  width: 100%;
  background: #ffffff !important;
  border: 1.5px solid #a7f3d0 !important;
  border-radius: 14px !important;
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: #064e3b !important;
  height: 46px;
  box-shadow: 0 2px 6px rgba(6, 78, 59, 0.04) !important;
  transition: all 0.25s ease;
}

[dir="rtl"] .search-bar-input {
  text-align: right;
  padding-right: 1.25rem !important;
  padding-left: 2.9rem !important;
}

[dir="ltr"] .search-bar-input {
  text-align: left;
  padding-left: 1.25rem !important;
  padding-right: 2.9rem !important;
}

.search-bar-input:focus {
  background: #ffffff !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
  color: #064e3b !important;
  outline: none !important;
}

.search-bar-input::placeholder {
  color: #94a3b8 !important;
  font-weight: 500 !important;
}

.search-bar-icon-btn,
.search-bar-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  outline: none;
  color: #059669;
  font-size: 0.95rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

[dir="rtl"] .search-bar-icon-btn,
[dir="rtl"] .search-bar-icon {
  left: 8px;
  right: auto;
}

[dir="ltr"] .search-bar-icon-btn,
[dir="ltr"] .search-bar-icon {
  right: 8px;
  left: auto;
}

/* Subject Glass Cards */
.subject-glass-card {
  background: #ffffff !important;
  border: 1.5px solid rgba(167, 243, 208, 0.7) !important;
  border-radius: 20px !important;
  padding: 1.35rem !important;
  box-shadow: 0 4px 18px rgba(6, 78, 59, 0.05) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  height: 100% !important;
  position: relative !important;
}

.subject-glass-card:hover {
  transform: translateY(-4px);
  border-color: #10b981 !important;
  box-shadow: 0 14px 30px rgba(6, 78, 59, 0.1) !important;
}

.subject-emblem {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(135deg, #ecfdf5 0%, #a7f3d0 100%);
  color: #047857;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.18);
}

.btn-subject-options {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-subject-options:hover {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}

.subject-card-title {
  color: #064e3b !important;
  font-size: 1.22rem !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  margin-top: 0.85rem !important;
  margin-bottom: 0.25rem !important;
}

.subject-card-date {
  color: #64748b !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  margin-bottom: 1rem !important;
}

.subject-stats-bar {
  background: #f0fdf4 !important;
  border: 1px solid #d1fae5 !important;
  border-radius: 12px !important;
  padding: 0.55rem 0.85rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-around !important;
  margin-bottom: 1.15rem !important;
}

.subject-stat-item {
  display: flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  color: #064e3b !important;
}

.subject-stat-label {
  color: #64748b !important;
  font-weight: 600 !important;
  font-size: 0.78rem !important;
}

.subject-stat-divider {
  color: #cbd5e1 !important;
  font-weight: 300 !important;
}

.btn-manage-subject {
  width: 100% !important;
  height: 44px !important;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  font-size: 0.92rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 1.15rem !important;
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.25) !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

.btn-manage-subject:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(16, 185, 129, 0.35);
  color: #ffffff !important;
}

[dir="rtl"] .btn-manage-subject i.fa-arrow-left {
  transition: transform 0.2s ease;
}
[dir="rtl"] .btn-manage-subject:hover i.fa-arrow-left {
  transform: translateX(-4px);
}

[dir="ltr"] .search-bar-icon-btn,
[dir="ltr"] .search-bar-icon {
  right: 8px;
  left: auto;
}

.search-bar-icon-btn:hover {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

/* ==============================================================================
   Public Frontend Glass Components (Navbar & Footer)
   ============================================================================== */
.navbar-glass {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border-bottom: 1.5px solid rgba(167, 243, 208, 0.6) !important;
  box-shadow: 0 4px 20px rgba(6, 78, 59, 0.04) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-glass.navbar-scrolled {
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 10px 30px rgba(6, 78, 59, 0.09) !important;
  padding-top: 0.6rem !important;
  padding-bottom: 0.6rem !important;
}

/* Scroll Progress Line at top of viewport */
.scroll-progress-line {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  background: linear-gradient(90deg, #10b981, #059669, #34d399);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s linear;
}

[dir="rtl"] .scroll-progress-line {
  left: auto;
  right: 0;
}

/* Floating Back-to-Top Button */
.btn-back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(167, 243, 208, 0.9);
  color: #064e3b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 6px 22px rgba(6, 78, 59, 0.12);
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[dir="ltr"] .btn-back-to-top {
  right: auto;
  left: 28px;
}

.btn-back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.btn-back-to-top:hover {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.35);
}

.nav-glass-link {
  color: #064e3b !important;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.5rem 1rem !important;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.nav-glass-link:hover {
  color: #059669 !important;
  background: rgba(16, 185, 129, 0.08);
}

.nav-glass-link.active {
  color: #047857 !important;
  background: rgba(16, 185, 129, 0.14) !important;
}

.footer-glass {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-top: 1.5px solid rgba(167, 243, 208, 0.6) !important;
}

.hover-emerald {
  transition: color 0.2s ease;
}

.hover-emerald:hover {
  color: #059669 !important;
}

.main-content-wrapper {
  min-height: calc(100vh - 280px);
}



