/*==========================
Starter Kit Brand Variables
==========================*/
:root {
  /* Brand Primary Colors - Mapped from HTML injection with fallbacks */
  --brand-primary: var(--primary-color, #FFD65A);
  --brand-secondary: var(--secondary-color, #212121);
  --brand-accent: var(--accent-color, #FFFFFF);
  
  /* Functional Colors */
  --brand-success: var(--success-color, #28a745);
  --brand-danger: var(--danger-color, #dc3545);
  --brand-dark: var(--dark-color, #1a1a1a);
  --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: 10;
}

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

.full-width {
  width: 100%;
}

.custom-select-label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: var(--text-main);
}

.custom-select-display {
  border: 2px solid var(--border-color);
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  background: var(--white-accent);
  position: relative;
  transition: border-color 0.2s;
}

.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: 1.3rem;
  color: var(--text-main);
}

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

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

.custom-select-display.active {
  border-color: var(--brand-primary);
}

.custom-select-list {
  list-style: none;
  padding: 0;
  margin: 5px 0 0 0;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  /* show 5 items, scrollable */
  overflow-y: auto;
  background: var(--white-accent);
  display: none;
  z-index: 1000;
}

.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;
}

/* Button Styles */
.btn {
  font-weight: 600;
  border-radius: 10px;
  padding: 10px 24px;
  transition: all 0.25s ease;
  position: relative;
}

.btn-primary {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--brand-secondary);
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
  overflow: hidden;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:focus-visible {
  background-color: #e6c04a !important;
  border-color: #e6c04a !important;
  color: var(--brand-secondary) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 214, 90, 0.35);
}

.btn-primary:active {
  background-color: #d4b043 !important;
  border-color: #d4b043 !important;
  color: var(--brand-secondary) !important;
  transform: translateY(0);
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
  pointer-events: none;
}

.btn-primary:hover::before {
  left: 150%;
}

.btn-primary:disabled,
.btn-primary.disabled {
  background-color: #d4c48a !important;
  border-color: #d4c48a !important;
  color: rgba(33, 33, 33, 0.5) !important;
  opacity: 0.65;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.btn-primary:disabled::before,
.btn-primary.disabled::before {
  display: none;
}

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

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:focus-visible {
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  color: var(--brand-secondary) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 214, 90, 0.25);
}

.btn-outline-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-outline-primary:disabled,
.btn-outline-primary.disabled {
  border-color: var(--brand-primary) !important;
  color: var(--brand-primary) !important;
  opacity: 0.65;
  pointer-events: none;
  background: transparent !important;
}

.btn-secondary {
  background-color: var(--brand-secondary);
  border-color: var(--brand-secondary);
  color: #fff;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:focus-visible {
  background-color: #000 !important;
  border-color: #000 !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(33, 33, 33, 0.3);
}

.btn-secondary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-secondary:disabled,
.btn-secondary.disabled {
  background-color: rgba(33, 33, 33, 0.5) !important;
  border-color: rgba(33, 33, 33, 0.5) !important;
  opacity: 0.65;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.btn-outline-secondary {
  color: var(--brand-secondary);
  border-color: var(--brand-secondary);
  background: transparent;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:focus-visible {
  background-color: var(--brand-secondary) !important;
  border-color: var(--brand-secondary) !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(33, 33, 33, 0.2);
}

.btn-outline-secondary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-outline-secondary:disabled,
.btn-outline-secondary.disabled {
  border-color: rgba(33, 33, 33, 0.4) !important;
  color: rgba(33, 33, 33, 0.4) !important;
  opacity: 0.65;
  pointer-events: none;
  background: transparent !important;
}

.btn-light {
  background-color: var(--brand-light);
  border-color: var(--brand-light);
  color: var(--brand-dark);
}

.btn-light:hover,
.btn-light:focus,
.btn-light:focus-visible {
  background-color: #e2e6ea !important;
  border-color: #e2e6ea !important;
  color: var(--brand-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-light:active {
  transform: translateY(0);
}

.btn-light:disabled,
.btn-light.disabled {
  opacity: 0.55;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.btn:disabled,
.btn.disabled,
fieldset:disabled .btn {
  cursor: not-allowed;
}

/* 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 h6 {
  color: var(--brand-primary);
  font-weight: 600;
}

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

body:not(.landing-page) 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 */
.lang-switcher-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1.5px solid rgba(42, 90, 90, 0.15);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-primary);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lang-switcher-btn:hover {
  border-color: var(--brand-primary);
  background: var(--brand-primary);
  color: #fff;
}

.lang-switcher-btn::after {
  display: none !important;
}

.lang-switcher-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lang-switcher-menu {
  min-width: 150px;
  border: none;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  padding: 4px;
  background: #fff;
}

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

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

.lang-switcher-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--brand-dark);
  transition: all 0.15s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: inherit;
  cursor: pointer;
}

.lang-switcher-item:hover {
  background: var(--brand-light);
  color: var(--brand-primary);
}

.lang-switcher-item.active-lang {
  background: var(--brand-primary);
  color: #fff;
  font-weight: 600;
}

.lang-switcher-item.active-lang .lang-check {
  color: #fff;
}

.lang-flag {
  font-size: 1rem;
  line-height: 1;
}

.lang-name {
  flex: 1;
  font-size: 0.82rem;
}

.lang-check {
  font-size: 0.7rem;
  color: var(--brand-primary);
  opacity: 0.8;
}

/* 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);
}


[dir="rtl"] .fa-chevron-left { transform: rotate(180deg); }
[dir="rtl"] .fa-chevron-right { transform: rotate(180deg); }



/* Custom Global Checkbox Styles */
.form-check-input[type="checkbox"] {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.15em;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}

.form-check-input[type="checkbox"]:hover {
    border-color: var(--brand-primary, #FFD65A);
    background-color: rgba(255, 214, 90, 0.12);
}

.form-check-input[type="checkbox"]:checked {
    background-color: var(--brand-primary, #FFD65A);
    border-color: var(--brand-primary, #FFD65A);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23212121' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 0 12px rgba(255, 214, 90, 0.35);
}

.form-check-input[type="checkbox"]:focus {
    border-color: var(--brand-primary, #FFD65A);
    box-shadow: 0 0 0 3px rgba(255, 214, 90, 0.2);
    outline: none;
}

.form-check-input[type="checkbox"]:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.form-switch .form-check-input {
    width: 2.5em;
    height: 1.4em;
    border-radius: 2em;
    border: 2px solid #d1d5db;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23d1d5db'/%3e%3c/svg%3e");
    transition: all 0.25s ease;
    cursor: pointer;
}

.form-switch .form-check-input:checked {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

.form-switch .form-check-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.2rem rgba(42, 90, 90, 0.15);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23d1d5db'/%3e%3c/svg%3e");
}

.form-switch .form-check-input:checked:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

.form-check-label {
    cursor: pointer;
    user-select: none;
}

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

/* SweetAlert2 — Dark Liquid-Glass Theme */
.swal2-container {
    backdrop-filter: blur(18px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
    background: rgba(5, 7, 12, 0.82) !important;
    z-index: 10000 !important;
}

.swal2-popup {
    background: linear-gradient(155deg, rgba(22, 28, 44, 0.97) 0%, rgba(12, 16, 26, 0.95) 100%) !important;
    backdrop-filter: blur(28px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
    border: 1.5px solid rgba(255, 214, 90, 0.35) !important;
    border-radius: 24px !important;
    color: #ffffff !important;
    padding: 2.2rem !important;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85), 0 0 35px rgba(255, 214, 90, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.swal2-title {
    color: #ffffff !important;
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.3px !important;
}

.swal2-html-container {
    color: #f1f5f9 !important;
    font-size: 0.98rem !important;
    line-height: 1.6 !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, #FFD65A 0%, #eab308 100%) !important;
    color: #000000 !important;
    font-weight: 900 !important;
    border: none !important;
    border-radius: 999px !important;
    padding: 0.75rem 2.2rem !important;
    box-shadow: 0 8px 24px rgba(255, 214, 90, 0.35) !important;
}

.swal2-cancel {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    border-radius: 999px !important;
    padding: 0.75rem 1.8rem !important;
}

/* Error List Container */
.error-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.error-list li:not(:first-child) {
    display: none !important;
}

