/* ============================================
   REXE Theme — Custom CSS
   Modern SaaS Dashboard for WHMCS
   ============================================ */

/* ----------------------------------------
   1. CSS Custom Properties (Design Tokens)
   ---------------------------------------- */
:root {
  /* Brand Colors */
  --brand-blue: #0B2447;
  --brand-navy: #0f172a;
  --brand-gold: #E8D48B;
  --brand-orange: #F97316;
  --brand-lightBlue: #3B82F6;
  --brand-blue-subtle: rgba(11, 36, 71, 0.15);

  /* Dark Mode (default) */
  --bg-base: #020617;
  --bg-surface: #0f172a;
  --bg-elevated: #1e293b;
  --surface-glass: rgba(15, 23, 42, 0.7);
  --surface-hover: rgba(30, 41, 59, 0.8);
  --border-default: rgba(51, 65, 85, 0.8);
  --border-subtle: rgba(51, 65, 85, 0.4);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --input-bg: rgba(15, 23, 42, 0.8);
  --sidebar-bg: rgba(9, 14, 28, 0.95);
  --topbar-bg: rgba(9, 14, 28, 0.85);
  --modal-overlay: rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.5);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

/* Light Mode */
html:not(.dark) {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #f1f5f9;
  --surface-glass: rgba(255, 255, 255, 0.8);
  --surface-hover: rgba(241, 245, 249, 0.9);
  --border-default: rgba(203, 213, 225, 0.8);
  --border-subtle: rgba(203, 213, 225, 0.4);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --input-bg: rgba(255, 255, 255, 0.9);
  --sidebar-bg: rgba(248, 250, 252, 0.95);
  --topbar-bg: rgba(255, 255, 255, 0.85);
  --modal-overlay: rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.15);
  --brand-blue-subtle: rgba(59, 130, 246, 0.1);
}

/* Dark select option fix (Req 4.4, 19.7) */
html.dark select option {
  background: #1e293b;
  color: #f1f5f9;
}

/* ----------------------------------------
   2. Base Resets & Typography
   ---------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 0;
  line-height: 1.3;
}

a {
  color: var(--brand-lightBlue);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover {
  color: var(--brand-orange);
}

hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 1.5rem 0;
}

/* ----------------------------------------
   3. Bootstrap Override — Modal (Req 19.3)
   ---------------------------------------- */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1050;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
  background: var(--modal-overlay);
}
.modal.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
}
.modal.fade {
  opacity: 0;
  transition: opacity 0.15s linear;
}
.modal.fade.show {
  opacity: 1;
}
.modal-backdrop {
  display: none !important;
}
.modal-dialog {
  position: relative;
  width: auto;
  max-width: 500px;
  margin: 1.75rem auto;
  pointer-events: none;
}
.modal-dialog-centered {
  display: flex;
  align-items: center;
  min-height: calc(100% - 3.5rem);
}
.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  outline: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}
.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1.5rem;
  color: var(--text-secondary);
}
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
}
.modal .close,
.modal .btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.15s;
}
.modal .close:hover,
.modal .btn-close:hover {
  color: var(--text-primary);
}
.glass-modal {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

/* ----------------------------------------
   4. Bootstrap Override — Buttons
   ---------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  text-decoration: none;
  line-height: 1.5;
  text-align: center;
  vertical-align: middle;
  user-select: none;
}
.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.btn-primary,
.btn-default {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-lightBlue));
  color: #ffffff;
  border: none;
}
.btn-primary:hover,
.btn-default:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  color: #ffffff;
}
.btn-secondary {
  background: var(--surface-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}
.btn-secondary:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.btn-success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.btn-success:hover {
  background: rgba(34, 197, 94, 0.25);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}
.btn-warning {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.3);
}
.btn-warning:hover {
  background: rgba(234, 179, 8, 0.25);
}
.btn-info {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.btn-info:hover {
  background: rgba(59, 130, 246, 0.25);
}
.btn-link {
  background: transparent;
  color: var(--brand-lightBlue);
  border: none;
  padding: 0;
  text-decoration: underline;
}
.btn-link:hover {
  color: var(--brand-orange);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: none;
}
.btn-ghost:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}
.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}
.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}
.btn-block {
  display: flex;
  width: 100%;
  justify-content: center;
}
.btn-group {
  display: inline-flex;
  gap: 0;
}
.btn-group .btn {
  border-radius: 0;
}
.btn-group .btn:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}
.btn-group .btn:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ----------------------------------------
   5. Bootstrap Override — Form Controls
   ---------------------------------------- */
.form-control,
.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--input-bg);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.15s, box-shadow 0.15s;
  line-height: 1.5;
}
.form-control:focus,
.form-input:focus {
  outline: none;
  border-color: var(--brand-lightBlue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.form-control::placeholder,
.form-input::placeholder {
  color: var(--text-muted);
}
.form-control:disabled,
.form-control[readonly] {
  background: var(--bg-elevated);
  opacity: 0.7;
  cursor: not-allowed;
}
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}
textarea.form-control {
  min-height: 100px;
  resize: vertical;
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-label,
label.control-label,
.control-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.input-group {
  display: flex;
  position: relative;
  width: 100%;
}
.input-group .form-control {
  flex: 1 1 auto;
  border-radius: 0;
}
.input-group .form-control:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}
.input-group .form-control:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.input-group-addon,
.input-group-btn,
.input-group-text {
  display: flex;
  align-items: center;
  padding: 0.625rem 0.875rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  font-size: 0.875rem;
  white-space: nowrap;
}
.input-group-addon:first-child,
.input-group-text:first-child {
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}
.input-group-addon:last-child,
.input-group-text:last-child {
  border-left: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.input-group-btn .btn {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.help-block {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.has-error .form-control {
  border-color: #ef4444;
}
.has-error .help-block,
.has-error .control-label {
  color: #ef4444;
}
.has-success .form-control {
  border-color: #22c55e;
}
.checkbox, .radio {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}
.checkbox label, .radio label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ----------------------------------------
   6. Bootstrap Override — Alerts
   ---------------------------------------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  border-left: 4px solid;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--text-primary);
}
.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border-color: #22c55e;
}
.alert-danger,
.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
}
.alert-warning {
  background: rgba(234, 179, 8, 0.1);
  border-color: #eab308;
}
.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
}
.alert .close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.125rem;
  line-height: 1;
}
.alert a {
  color: inherit;
  text-decoration: underline;
  font-weight: 500;
}

/* ----------------------------------------
   7. Bootstrap Override — Badges & Labels
   ---------------------------------------- */
.badge,
.label {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  line-height: 1.4;
}
.badge-primary, .label-primary {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}
.badge-success, .label-success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}
.badge-danger, .label-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
.badge-warning, .label-warning {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}
.badge-info, .label-info {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}
.badge-default, .label-default {
  background: rgba(107, 114, 128, 0.15);
  color: #6b7280;
}

/* ----------------------------------------
   8. Bootstrap Override — Pagination
   ---------------------------------------- */
.pagination {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.pagination > li > a,
.pagination > li > span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface-glass);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
}
.pagination > li > a:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--border-default);
}
.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover {
  background: var(--brand-blue);
  color: #ffffff;
  border-color: var(--brand-blue);
}
.pagination > .disabled > a,
.pagination > .disabled > span {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.pager {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}
.pager li > a {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s;
}
.pager li > a:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

/* ----------------------------------------
   9. Bootstrap Override — Collapse
   ---------------------------------------- */
.collapse {
  display: none;
}
.collapse.in,
.collapse.show {
  display: block;
}
.collapsing {
  height: 0;
  overflow: hidden;
  transition: height 0.35s ease;
}

/* ----------------------------------------
   10. Bootstrap Override — Dropdown
   ---------------------------------------- */
.dropdown {
  position: relative;
}
.dropdown-toggle::after {
  display: none;
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  display: none;
  min-width: 12rem;
  padding: 0.5rem 0;
  margin: 0.25rem 0 0;
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  list-style: none;
}
.dropdown-menu.show,
.open > .dropdown-menu {
  display: block;
}
.dropdown-menu > li > a,
.dropdown-menu > a,
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.dropdown-menu > li > a:hover,
.dropdown-menu > a:hover,
.dropdown-item:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}
.dropdown-divider,
.dropdown-menu .divider {
  height: 0;
  margin: 0.375rem 0;
  border-top: 1px solid var(--border-subtle);
  overflow: hidden;
}
.dropdown-header {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ----------------------------------------
   11. Bootstrap Override — Tooltip & Popover
   ---------------------------------------- */
.tooltip {
  position: absolute;
  z-index: 1070;
  display: block;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.15s;
}
.tooltip.in,
.tooltip.show {
  opacity: 1;
}
.tooltip-inner {
  max-width: 200px;
  padding: 0.375rem 0.75rem;
  color: #f1f5f9;
  background: #1e293b;
  border-radius: var(--radius-sm);
  text-align: center;
}
.tooltip-arrow,
.tooltip .arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-color: transparent;
  border-style: solid;
}

.popover {
  position: absolute;
  z-index: 1060;
  max-width: 276px;
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.popover-title,
.popover-header {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.popover-content,
.popover-body {
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ----------------------------------------
   12. Bootstrap Override — Tables
   ---------------------------------------- */
.table,
table.table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text-primary);
  font-size: 0.875rem;
}
.table > thead > tr > th,
.table > thead > tr > td {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  background: transparent;
  text-align: left;
}
.table > tbody > tr > td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.table > tbody > tr:last-child > td {
  border-bottom: none;
}
.table > tbody > tr:hover {
  background: var(--surface-hover);
}
.table-striped > tbody > tr:nth-of-type(odd) {
  background: rgba(15, 23, 42, 0.3);
}
html:not(.dark) .table-striped > tbody > tr:nth-of-type(odd) {
  background: rgba(241, 245, 249, 0.5);
}
.table-bordered {
  border: 1px solid var(--border-subtle);
}
.table-bordered > thead > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > td {
  border: 1px solid var(--border-subtle);
}
.table-condensed > thead > tr > th,
.table-condensed > tbody > tr > td {
  padding: 0.5rem 0.75rem;
}
.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ----------------------------------------
   13. Bootstrap Override — Nav Tabs
   ---------------------------------------- */
.nav-tabs {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
  gap: 0;
  flex-wrap: wrap;
}
.nav-tabs > li {
  margin-bottom: -1px;
}
.nav-tabs > li > a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  transition: all 0.15s;
}
.nav-tabs > li > a:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
  border-bottom-color: var(--border-default);
}
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
  color: var(--brand-lightBlue);
  background: transparent;
  border-color: transparent;
  border-bottom: 2px solid var(--brand-lightBlue);
}
.tab-content {
  padding: 0;
}
.tab-content > .tab-pane {
  display: none;
}
.tab-content > .tab-pane.active,
.tab-content > .active {
  display: block;
}
.nav-pills {
  display: flex;
  list-style: none;
  padding: 0;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.nav-pills > li > a {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.15s;
}
.nav-pills > li > a:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}
.nav-pills > li.active > a {
  background: var(--brand-blue);
  color: #ffffff;
}

/* ----------------------------------------
   14. Bootstrap Override — Well
   ---------------------------------------- */
.well {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: none;
  min-height: 20px;
}
.well-sm {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
}
.well-lg {
  padding: 1.5rem 2rem;
}

/* ----------------------------------------
   15. Bootstrap Override — Panel / Card
   ---------------------------------------- */
.panel,
.card {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  margin-bottom: 1.25rem;
  box-shadow: none;
  overflow: visible;
}
.panel-heading,
.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-title,
.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.panel-body,
.card-body {
  padding: 1.5rem;
}
.panel-footer,
.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  background: transparent;
}
.panel-default {
  border-color: var(--border-subtle);
}
.panel-default > .panel-heading {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-subtle);
}
.panel-primary > .panel-heading {
  background: rgba(59, 130, 246, 0.1);
  color: var(--brand-lightBlue);
  border-color: rgba(59, 130, 246, 0.2);
}
.panel-success > .panel-heading {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}
.panel-danger > .panel-heading {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}
.panel-warning > .panel-heading {
  background: rgba(234, 179, 8, 0.1);
  color: #eab308;
}
.panel-info > .panel-heading {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

/* ----------------------------------------
   16. Glassmorphism Utilities
   ---------------------------------------- */
.glass {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
}
.glass-card {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: visible;
}
.glass-card .card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.glass-card .card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.glass-card .card-body {
  padding: 1.5rem;
}
.glass-card .card-actions {
  display: flex;
  gap: 0.5rem;
}

/* ----------------------------------------
   17. Sidebar Styles — Modern SaaS
   ---------------------------------------- */
aside.sidebar,
.main-layout > .sidebar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  width: 16rem !important;
  background: var(--sidebar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-subtle);
  z-index: 40;
  display: flex !important;
  flex-direction: column !important;
  transition: width 0.2s ease;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar::-webkit-scrollbar {
  width: 4px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--border-default);
}
.sidebar.collapsed {
  width: 5rem;
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  min-height: 4rem;
}
.sidebar-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.375rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-toggle:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}
.sidebar-nav {
  flex: 1;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

/* Nav items */
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.8125rem;
  font-weight: 450;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}
.sidebar-nav-item:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}
.sidebar-nav-item:hover .nav-icon {
  color: var(--brand-lightBlue);
}
.sidebar-nav-item.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(59, 130, 246, 0.06));
  color: var(--brand-lightBlue);
  font-weight: 500;
}
.sidebar-nav-item.active .nav-icon {
  color: var(--brand-lightBlue);
}
.sidebar-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--brand-lightBlue);
  border-radius: 0 3px 3px 0;
}
.sidebar-nav-item .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  min-width: 1.5rem;
  height: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.sidebar-nav-item .nav-label {
  transition: opacity 0.2s;
}
.sidebar.collapsed .sidebar-nav-item .nav-label {
  opacity: 0;
  width: 0;
  overflow: hidden;
}
.sidebar.collapsed .sidebar-nav-item {
  justify-content: center;
  padding: 0.625rem;
}
.sidebar-section-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 1rem 1rem 0.375rem;
}
.sidebar.collapsed .sidebar-section-title {
  display: none;
}

/* Sidebar badge */
.sidebar-badge {
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--brand-lightBlue), #6366f1);
  color: #ffffff;
  line-height: 1.4;
}

/* Sidebar nav group & label */
.sidebar-nav-group {
  margin-bottom: 0.25rem;
}
.sidebar-nav-group + .sidebar-nav-group {
  margin-top: 0.25rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border-subtle);
}
.sidebar-nav-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.75rem 0.75rem 0.375rem;
  opacity: 0.7;
}
.sidebar-label-icon {
  font-size: 0.5625rem;
  opacity: 0.6;
}
.sidebar.collapsed .sidebar-nav-label {
  display: none;
}

/* Sidebar nav dropdown (items with children) */
.sidebar-nav-parent {
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  text-align: left;
}
.sidebar-nav-parent .nav-arrow {
  margin-left: auto;
  font-size: 0.5rem;
  transition: transform 0.25s ease;
  color: var(--text-muted);
  opacity: 0.6;
}
.sidebar-nav-dropdown.open .sidebar-nav-parent .nav-arrow {
  transform: rotate(180deg);
}
.sidebar-nav-dropdown.open > .sidebar-nav-parent {
  color: var(--text-primary);
}
.sidebar-nav-dropdown.open > .sidebar-nav-parent .nav-icon {
  color: var(--brand-lightBlue);
}
.sidebar-nav-children {
  display: none;
  padding: 0.125rem 0 0.25rem 0;
  margin-left: 1.5rem;
  border-left: 1px solid var(--border-subtle);
}
.sidebar-nav-dropdown.open .sidebar-nav-children {
  display: block;
  animation: slideDown 0.2s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.sidebar-nav-child {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  margin-left: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
  font-weight: 400;
}
.sidebar-nav-child .child-icon {
  font-size: 0.625rem;
  width: 1rem;
  min-width: 1rem;
  text-align: center;
  opacity: 0.5;
  transition: opacity 0.15s;
}
.sidebar-nav-child:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}
.sidebar-nav-child:hover .child-icon {
  opacity: 0.8;
  color: var(--brand-lightBlue);
}
.sidebar-nav-child.active {
  color: var(--brand-lightBlue);
  background: rgba(59, 130, 246, 0.06);
  font-weight: 500;
}
.sidebar-nav-child.active .child-icon {
  opacity: 1;
  color: var(--brand-lightBlue);
}
.sidebar.collapsed .sidebar-nav-children {
  display: none;
}
.sidebar.collapsed .sidebar-nav-parent .nav-arrow {
  display: none;
}

/* Auth buttons (guest sidebar) */
.sidebar-auth-btn {
  border: 1px solid var(--border-subtle);
  margin: 0.125rem 0;
}
.sidebar-auth-btn:hover {
  border-color: var(--brand-lightBlue);
  background: rgba(59, 130, 246, 0.06);
}

/* Sidebar logo variants */
.sidebar-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-primary);
  overflow: hidden;
}
.sidebar-logo-img {
  height: 2rem;
  width: auto;
  object-fit: contain;
}
.sidebar-logo-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar.collapsed .sidebar-logo-img,
.sidebar.collapsed .sidebar-logo-text {
  display: none;
}

/* Sidebar logout */
.sidebar-logout {
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.sidebar-logout:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}
.sidebar-logout:hover .nav-icon {
  color: #ef4444;
}

.sidebar-footer {
  padding: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

/* ----------------------------------------
   18. Topbar Styles
   ---------------------------------------- */
.topbar,
header.topbar,
#topbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 30;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  padding: 0 1.5rem;
  height: 4rem;
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: box-shadow 0.2s;
  box-sizing: border-box;
}
.topbar.scrolled {
  box-shadow: var(--shadow-md);
}
.topbar-left,
#topbar .topbar-left {
  display: flex !important;
  align-items: center;
  gap: 1rem;
  flex: 1 1 0% !important;
  min-width: 0;
}
.topbar-right,
#topbar .topbar-right {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto !important;
  flex-shrink: 0 !important;
}
.topbar-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.topbar-icon-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}
#darkModeToggle {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-lightBlue));
  color: #ffffff;
}
#darkModeToggle:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.topbar-icon-btn .badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.25rem;
  font-size: 0.625rem;
  background: var(--brand-orange);
  color: #ffffff;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ----------------------------------------
   19. Breadcrumb Styles
   ---------------------------------------- */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  min-width: 0;
  overflow: hidden;
}
.breadcrumb-nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}
.breadcrumb-nav a:hover {
  color: var(--text-primary);
}
.breadcrumb-nav .breadcrumb-separator {
  color: var(--text-muted);
  opacity: 0.5;
  font-size: 0.625rem;
}
.breadcrumb-nav .breadcrumb-current {
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bootstrap breadcrumb override */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  list-style: none;
  padding: 0;
  margin: 0;
  background: transparent;
  font-size: 0.8125rem;
}
.breadcrumb > li {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.breadcrumb > li + li::before {
  content: "\f054";
  font-family: "Font Awesome 6 Free", "FontAwesome";
  font-weight: 900;
  font-size: 0.5rem;
  color: var(--text-muted);
  opacity: 0.5;
}
.breadcrumb > li > a {
  color: var(--text-muted);
  text-decoration: none;
}
.breadcrumb > li > a:hover {
  color: var(--text-primary);
}
.breadcrumb > .active {
  color: var(--text-primary);
  font-weight: 500;
}

/* ----------------------------------------
   20. Profile Dropdown
   ---------------------------------------- */
.profile-dropdown {
  position: relative;
}
.profile-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text-secondary);
}
.profile-btn:hover {
  background: var(--surface-hover);
}
.avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-lightBlue));
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
}
.profile-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
}
.profile-dropdown .dropdown-menu {
  right: 0;
  left: auto;
  min-width: 10rem;
}

/* ----------------------------------------
   21. Stat Card Component
   ---------------------------------------- */
.stat-card {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s;
}
.stat-card:hover {
  border-color: var(--border-default);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-lightBlue));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.125rem;
  flex-shrink: 0;
}
.stat-body {
  flex: 1;
  min-width: 0;
}
.stat-number {
  font-size: 2rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  line-height: 1.2;
}
.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

/* ----------------------------------------
   22. Status Badge Component
   ---------------------------------------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  white-space: nowrap;
}
.status-active,
.status-Active {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}
.status-paid,
.status-Paid {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}
.status-pending,
.status-Pending {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}
.status-unpaid,
.status-Unpaid {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}
.status-suspended,
.status-Suspended {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
.status-terminated,
.status-Terminated {
  background: rgba(107, 114, 128, 0.15);
  color: #6b7280;
}
.status-overdue,
.status-Overdue {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}
.status-cancelled,
.status-Cancelled {
  background: rgba(107, 114, 128, 0.15);
  color: #6b7280;
}
.status-expired,
.status-Expired {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
.status-open,
.status-Open {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}
.status-answered,
.status-Answered {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}
.status-closed,
.status-Closed {
  background: rgba(107, 114, 128, 0.15);
  color: #6b7280;
}
.status-customer-reply,
.status-customerreply {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}
.status-in-progress,
.status-inprogress {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}
.status-on-hold,
.status-onhold {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

/* ----------------------------------------
   23. Data Table Component
   ---------------------------------------- */
.data-table-wrapper {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table thead th {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  background: transparent;
}
.data-table tbody td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.875rem;
  vertical-align: middle;
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}
.data-table tbody tr:hover {
  background: var(--surface-hover);
}
.data-table .clickable-row {
  cursor: pointer;
  transition: background 0.15s;
}
.data-table .clickable-row:hover {
  background: var(--surface-hover);
}
.data-table .empty-row td {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

/* ----------------------------------------
   24. Filter Bar Component
   ---------------------------------------- */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.filter-btn {
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--surface-hover);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  transition: all 0.15s;
  white-space: nowrap;
}
.filter-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-default);
}
.filter-btn.active {
  background: var(--brand-blue);
  color: #ffffff;
  border-color: var(--brand-blue);
}

/* ----------------------------------------
   25. Flash Message Component
   ---------------------------------------- */
.flash-message {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  border-left: 4px solid;
  margin-bottom: 1rem;
  animation: flashSlideIn 0.3s ease;
}
@keyframes flashSlideIn {
  from {
    opacity: 0;
    transform: translateY(-0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.flash-success {
  background: rgba(34, 197, 94, 0.1);
  border-color: #22c55e;
}
.flash-error,
.flash-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
}
.flash-warning {
  background: rgba(234, 179, 8, 0.1);
  border-color: #eab308;
}
.flash-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
}
.flash-icon {
  font-size: 1.125rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}
.flash-success .flash-icon { color: #22c55e; }
.flash-error .flash-icon,
.flash-danger .flash-icon { color: #ef4444; }
.flash-warning .flash-icon { color: #eab308; }
.flash-info .flash-icon { color: #3b82f6; }

.flash-body {
  flex: 1;
  min-width: 0;
}
.flash-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-bottom: 0.125rem;
}
.flash-text {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.flash-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1rem;
  line-height: 1;
  transition: color 0.15s;
  flex-shrink: 0;
}
.flash-close:hover {
  color: var(--text-primary);
}

/* ----------------------------------------
   26. Form Input Component (custom)
   ---------------------------------------- */
.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--input-bg);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus {
  outline: none;
  border-color: var(--brand-lightBlue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.form-input::placeholder {
  color: var(--text-muted);
}

/* ----------------------------------------
   27. Auth Page Layout (Full-Page Centered)
   ---------------------------------------- */
.auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  padding: 2rem 1rem;
}
.auth-card {
  width: 100%;
  max-width: 28rem;
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-xl);
}
.auth-card-wide {
  max-width: 41.5rem !important;
}
.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}
.auth-logo img,
.auth-logo .auth-logo-img {
  height: 2.5rem;
  width: auto;
}
.auth-logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.025em;
}
.auth-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 0.5rem;
}
.auth-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 2rem;
}
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.auth-footer a {
  color: var(--brand-lightBlue);
  font-weight: 500;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.75rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* OAuth / Linked Accounts (login, register) */
.social-signin-btns {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.social-signin-btns .btn,
.social-signin-btns button,
.social-signin-btns a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--surface-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.social-signin-btns .btn:hover,
.social-signin-btns button:hover,
.social-signin-btns a:hover {
  background: var(--bg-elevated);
  border-color: var(--brand-lightBlue);
}
.providerLinkingFeedback {
  margin-bottom: 0.5rem;
}
.providerLinkingFeedback:empty {
  display: none;
}
.providerPreLinking .sub-heading,
.providerPreLinking .sub-heading-borderless {
  display: none;
}

/* ----------------------------------------
   27b. Store Layout (Shopping Cart / Order Forms)
   ---------------------------------------- */
.store-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
}
.store-layout .topbar {
  position: sticky;
  top: 0;
  z-index: 30;
}
.store-layout .content-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
}

/* ----------------------------------------
   28. Main Layout (Sidebar + Content)
   ---------------------------------------- */
.main-layout {
  display: block;
  min-height: 100vh;
}
.content-wrapper {
  flex: 1;
  margin-left: 16rem !important;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.2s ease;
}
.sidebar.collapsed ~ .content-wrapper,
.content-wrapper.sidebar-collapsed {
  margin-left: 5rem !important;
}
.content-area {
  flex: 1;
  padding: 1.5rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}
.page-header {
  margin-bottom: 1.5rem;
}
.page-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
}
.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.content-footer {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}
/* Footer fallback — WHMCS store sayfalarında fazladan </div> content-wrapper'ı erken kapatabilir */
.main-layout > .content-footer {
  margin-left: 16rem;
}
.sidebar.collapsed ~ .content-footer,
.main-layout.sidebar-collapsed > .content-footer {
  margin-left: 5rem;
}
@media (max-width: 1023px) {
  .main-layout > .content-footer {
    margin-left: 5rem;
  }
}
@media (max-width: 767px) {
  .main-layout > .content-footer {
    margin-left: 0;
  }
}
.content-footer a {
  color: var(--text-muted);
  text-decoration: none;
}
.content-footer a:hover {
  color: var(--text-primary);
}

/* ----------------------------------------
   29. Password Strength Bar
   ---------------------------------------- */
.password-strength-container {
  margin-top: 0.5rem;
}
.pw-strength-bar {
  height: 0.375rem;
  border-radius: 9999px;
  background: var(--bg-elevated);
  overflow: hidden;
  margin-bottom: 0.25rem;
}
.pw-strength-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #ef4444, #eab308, #22c55e);
  transition: width 0.3s ease;
  width: 0%;
}
.pw-strength-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.pw-strength-tip {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* Hide WHMCS default pw strength bar */
.password-strength-container .progress {
  display: none !important;
}

/* ----------------------------------------
   30. Admin Masquerade Bar (inline in topbar)
   ---------------------------------------- */
.admin-return-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #ffffff !important;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.admin-return-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  color: #ffffff !important;
}
.admin-return-btn i {
  font-size: 0.8125rem;
}

/* ----------------------------------------
   31. Quick Access Links (Dashboard)
   ---------------------------------------- */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.quick-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 0.75rem;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
  transition: all 0.15s;
}
.quick-link:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--border-default);
  transform: translateY(-2px);
}
.quick-link i {
  font-size: 1.25rem;
  color: var(--brand-lightBlue);
}

/* Quick Link Card (Dashboard homepage) */
.quick-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s;
  text-align: center;
}
.quick-link-card:hover {
  background: var(--surface-hover);
  border-color: var(--brand-lightBlue);
  color: var(--text-primary);
  transform: translateY(-2px);
}
.quick-link-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(6,182,212,0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--brand-lightBlue);
  transition: all 0.15s;
}
.quick-link-card:hover .quick-link-icon {
  background: linear-gradient(135deg, var(--brand-lightBlue), #06b6d4);
  color: white;
}
.quick-link-label {
  font-size: 0.75rem;
  font-weight: 500;
}

/* ----------------------------------------
   32. Service Card (Products Grid)
   ---------------------------------------- */
.service-card {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.5rem;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.service-card:hover {
  border-color: var(--border-default);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.service-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.service-card-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
}
.service-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ----------------------------------------
   33. Ticket Thread Styles
   ---------------------------------------- */
.ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ticket-message {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.ticket-message.staff-reply {
  border-left: 3px solid var(--brand-lightBlue);
}
.ticket-message.client-reply {
  border-left: 3px solid var(--brand-gold);
}
.ticket-message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
}
.ticket-message-author {
  font-weight: 600;
  color: var(--text-primary);
}
.ticket-message-date {
  color: var(--text-muted);
}
.ticket-message-body {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.ticket-message-body p {
  margin-bottom: 0.75rem;
}
.ticket-message-body p:last-child {
  margin-bottom: 0;
}
.ticket-attachments {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ticket-attachment {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
}
.ticket-attachment:hover {
  color: var(--text-primary);
}

/* ----------------------------------------
   34. Department Selection Cards
   ---------------------------------------- */
.department-card {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.15s;
}
.department-card:hover {
  border-color: var(--brand-lightBlue);
  background: var(--surface-hover);
  color: inherit;
  transform: translateY(-2px);
}
.department-card-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.department-card-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ----------------------------------------
   35. Invoice Styles
   ---------------------------------------- */
.invoice-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.invoice-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.invoice-total {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}
.invoice-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}
.invoice-items-table th {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}
.invoice-items-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.875rem;
  color: var(--text-primary);
}
.invoice-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.375rem;
  font-size: 0.875rem;
}
.invoice-summary-row {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  min-width: 200px;
}
.invoice-summary-row.total {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

/* ----------------------------------------
   36. Announcement Card
   ---------------------------------------- */
.announcement-card {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.15s;
}
.announcement-card:hover {
  border-color: var(--border-default);
}
.announcement-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}
.announcement-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.announcement-title a {
  color: var(--text-primary);
  text-decoration: none;
}
.announcement-title a:hover {
  color: var(--brand-lightBlue);
}
.announcement-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ----------------------------------------
   37. KB (Knowledge Base) Styles
   ---------------------------------------- */
.kb-search {
  margin-bottom: 2rem;
}
.kb-search .form-control {
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}
.kb-category-card {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.15s;
}
.kb-category-card:hover {
  border-color: var(--brand-lightBlue);
  transform: translateY(-2px);
  color: inherit;
}
.kb-category-icon {
  font-size: 1.5rem;
  color: var(--brand-lightBlue);
  margin-bottom: 0.75rem;
}
.kb-category-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.kb-category-count {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ----------------------------------------
   38. WHMCS Branding Hide (Req 3.5, 18.2, 19.6)
   ---------------------------------------- */
/* Aggressively hide "Powered by WHMCompleteSolution" */
footer a[href*="whmcs.com"],
footer a[href*="WHMCompleteSolution"],
a[href*="whmcs.com"],
[class*="whmcs-branding"],
.whmcs-branding,
#footer a[href*="whmcs.com"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Hide WHMCS output containers */
.whmcs-header-output,
.whmcs-footer-output {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Hide any remaining WHMCS default elements including "Powered by" text */
.main-content > .container-fluid > .row > .col-sm-3.pull-right,
.footer-nav,
.site-footer .text-center,
.site-footer,
p[class*="powered"],
.powered-by,
.copyright .pull-right,
footer .pull-right {
  display: none !important;
}

/* Hide twenty-one default header/topbar/navbar that may leak through */
#header,
.header:not(.topbar),
.navbar-header,
.navbar-default,
.site-header {
  display: none !important;
}

/* Aggressively hide WHMCS "Powered by" text injected into content area */
p[style*="text-align:center"] a[href*="whmcs.com"],
p[style*="text-align: center"] a[href*="whmcs.com"],
p[style*="text-align:center"] a[href*="WHMCompleteSolution"] {
  display: none !important;
}
p[style*="text-align:center"]:has(a[href*="whmcs.com"]),
p[style*="text-align: center"]:has(a[href*="whmcs.com"]) {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}
/* Fallback for browsers without :has() — hide by content matching */
.content-area > p[style*="text-align:center"],
.content-area > p[style*="text-align: center"],
main > p[style*="text-align:center"],
main > p[style*="text-align: center"],
.auth-layout p[style*="text-align:center"],
.auth-layout p[style*="text-align: center"],
.primary-content > p[style*="text-align:center"],
.primary-content > p[style*="text-align: center"] {
  display: none !important;
}

/* ----------------------------------------
   39. Mobile Sidebar Overlay
   ---------------------------------------- */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.125rem;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 39;
}
.sidebar-overlay.active {
  display: block;
}

/* ----------------------------------------
   40. WHMCS Sidebar Panels (primarySidebar)
   ---------------------------------------- */
.whmcs-sidebar .panel,
.whmcs-sidebar .card {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  margin-bottom: 1rem;
}
.whmcs-sidebar .list-group {
  list-style: none;
  padding: 0;
  margin: 0;
}
.whmcs-sidebar .list-group-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.875rem;
  transition: all 0.15s;
}
.whmcs-sidebar .list-group-item:last-child {
  border-bottom: none;
}
.whmcs-sidebar .list-group-item:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}
.whmcs-sidebar .list-group-item.active {
  background: var(--brand-blue-subtle);
  color: var(--brand-lightBlue);
}

/* Sidebar panel list & items (clientarea.tpl) */
.sidebar-panel-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-panel-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  transition: all 0.15s;
  cursor: pointer;
}
.sidebar-panel-item:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}
.sidebar-panel-item.active {
  background: rgba(59, 130, 246, 0.08);
  color: var(--brand-lightBlue);
}
.sidebar-panel-item.active i {
  color: var(--brand-lightBlue);
}

/* ----------------------------------------
   41. Bootstrap Grid Override
   ---------------------------------------- */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -0.75rem;
  margin-right: -0.75rem;
}
.row > [class*="col-"] {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}
.container,
.container-fluid {
  width: 100%;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  margin-left: auto;
  margin-right: auto;
}

/* ----------------------------------------
   42. List Group Override
   ---------------------------------------- */
.list-group {
  list-style: none;
  padding: 0;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.list-group-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--surface-glass);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.15s;
}
.list-group-item:first-child {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.list-group-item:last-child {
  border-bottom: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.list-group-item:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}
.list-group-item.active {
  background: var(--brand-blue-subtle);
  color: var(--brand-lightBlue);
  border-color: var(--border-subtle);
}
.list-group-item .badge {
  margin-left: auto;
}

/* ----------------------------------------
   43. Utility Classes
   ---------------------------------------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--text-primary) !important; }
.text-success { color: #22c55e !important; }
.text-danger { color: #ef4444 !important; }
.text-warning { color: #eab308 !important; }
.text-info { color: #3b82f6 !important; }
.pull-right { float: right; }
.pull-left { float: left; }
.clearfix::after {
  content: '';
  display: table;
  clear: both;
}
.hidden { display: none !important; }
.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;
}
.img-responsive {
  max-width: 100%;
  height: auto;
}
.caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.25rem;
  vertical-align: middle;
  border-top: 4px dashed;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  color: var(--text-muted);
}

/* ----------------------------------------
   44. Fullpage Overlay & WHMCS Required
   ---------------------------------------- */
#fullpage-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--modal-overlay);
  z-index: 1040;
}

/* WHMCS system output — visually hidden but fully accessible to JS */
.whmcs-system-output {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ----------------------------------------
   45. Scrollbar Styling
   ---------------------------------------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) transparent;
}

/* ----------------------------------------
   46. Transition & Animation Utilities
   ---------------------------------------- */
.fade-in {
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.slide-up {
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ----------------------------------------
   47. Responsive Breakpoints
   ---------------------------------------- */

/* Tablet (< 1024px) */
@media (max-width: 1023px) {
  .sidebar {
    width: 5rem !important;
  }
  .sidebar .nav-label {
    display: none;
  }
  .sidebar .sidebar-section-title {
    display: none;
  }
  .sidebar .sidebar-nav-item {
    justify-content: center;
    padding: 0.625rem;
  }
  .sidebar-header {
    justify-content: center;
  }
  .sidebar-logo-full {
    display: none;
  }
  .sidebar-logo-icon {
    display: block;
  }
  .sidebar-toggle {
    display: none;
  }
  .content-wrapper {
    margin-left: 5rem !important;
  }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
  .sidebar {
    transform: translateX(-100%);
    width: 16rem !important;
    z-index: 50;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .sidebar .nav-label {
    display: inline;
    opacity: 1;
  }
  .sidebar .sidebar-section-title {
    display: block;
  }
  .sidebar .sidebar-nav-item {
    justify-content: flex-start;
    padding: 0.625rem 1rem;
  }
  .sidebar-header {
    justify-content: space-between;
  }
  .sidebar-logo-full {
    display: block;
  }
  .sidebar-logo-icon {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  .content-wrapper {
    margin-left: 0 !important;
  }
  .content-area {
    padding: 1rem;
  }
  .topbar {
    padding: 0 1rem;
  }

  /* Mobile: Stack stat cards */
  .stat-card {
    padding: 1rem;
  }
  .stat-number {
    font-size: 1.5rem;
  }

  /* Mobile: Single column grids */
  .quick-links {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Mobile: Scrollable tables */
  .data-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .data-table {
    min-width: 600px;
  }
  .table-responsive {
    border: none;
  }

  /* Mobile: Auth card */
  .auth-card {
    padding: 1.5rem;
    margin: 0.5rem;
  }

  /* Mobile: Profile dropdown */
  .profile-name {
    display: none;
  }

  /* Mobile: Page title */
  .page-title {
    font-size: 1.25rem;
  }

  /* Mobile: Modal */
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }

  /* Mobile: Invoice */
  .invoice-header {
    flex-direction: column;
  }
  .invoice-total {
    font-size: 1.5rem;
  }
}

/* Small mobile (< 480px) */
@media (max-width: 479px) {
  .quick-links {
    grid-template-columns: 1fr;
  }
  .filter-bar {
    flex-direction: column;
  }
  .filter-btn {
    text-align: center;
  }
  .auth-card {
    padding: 1.25rem;
  }
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
  }

  /* Topbar: daha kompakt */
  .topbar,
  header.topbar,
  #topbar {
    padding: 0 0.75rem !important;
    gap: 0.25rem;
  }
  .topbar-left {
    gap: 0.5rem !important;
  }
  .topbar-right {
    gap: 0.25rem !important;
  }

  /* Breadcrumb: mobilde gizle */
  .breadcrumb-nav,
  .breadcrumb {
    display: none !important;
  }

  /* Content area: daha az padding */
  .content-area {
    padding: 0.75rem !important;
  }

  /* Guest hero: daha kompakt */
  .glass-card .card-body {
    padding: 1rem;
  }
}

/* ----------------------------------------
   48. Print Styles
   ---------------------------------------- */
@media print {
  .sidebar,
  .topbar,
  .mobile-menu-toggle,
  .sidebar-overlay,
  .admin-return-btn,
  .filter-bar,
  .flash-message,
  .btn:not(.btn-print) {
    display: none !important;
  }
  .content-wrapper {
    margin-left: 0 !important;
  }
  body {
    background: #ffffff;
    color: #000000;
  }
  .glass-card,
  .panel,
  .card,
  .well,
  .data-table-wrapper {
    background: #ffffff;
    backdrop-filter: none;
    border: 1px solid #e5e7eb;
    box-shadow: none;
  }
}

/* ----------------------------------------
   49. Accessibility Enhancements
   ---------------------------------------- */
:focus-visible {
  outline: 2px solid var(--brand-lightBlue);
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ----------------------------------------
   50. WHMCS Specific Overrides
   ---------------------------------------- */
/* Override WHMCS default container */
.main-content {
  background: transparent;
}
.main-content > .container-fluid {
  padding: 0;
}

/* WHMCS form horizontal */
.form-horizontal .control-label {
  text-align: left;
  padding-top: 0.5rem;
}

/* WHMCS captcha container */
.captcha-container {
  margin: 1rem 0;
}
.captcha-container .g-recaptcha {
  display: flex;
  justify-content: center;
}

/* Hide invisible reCAPTCHA badge (it floats at bottom-right) */
.grecaptcha-badge {
  visibility: hidden !important;
  opacity: 0 !important;
  position: fixed !important;
  bottom: -100px !important;
  right: -100px !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* WHMCS OAuth buttons */
.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-md);
  background: var(--surface-hover);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.oauth-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

/* ============================================
   ORDER FORM STYLES — standard_cart theme override
   Makes WHMCS order forms match REXE glassmorphism design
   ============================================ */

/* Order form container */
#order-standard_cart {
  color: var(--text-primary);
}
#order-standard_cart .header-lined {
  display: block !important;
  border: none;
  margin-bottom: 1.5rem;
}
#order-standard_cart .header-lined h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  border: none;
  padding: 0;
  margin: 0 0 0.5rem 0;
}
#order-standard_cart .header-lined p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Cart sidebar */
#order-standard_cart .cart-sidebar,
#order-standard_cart .sidebar {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
#order-standard_cart .cart-sidebar .list-group-item,
#order-standard_cart .sidebar .list-group-item {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.125rem;
}
#order-standard_cart .cart-sidebar .list-group-item:hover,
#order-standard_cart .sidebar .list-group-item:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}
#order-standard_cart .cart-sidebar .list-group-item.active,
#order-standard_cart .sidebar .list-group-item.active {
  background: rgba(59, 130, 246, 0.1);
  color: var(--brand-lightBlue);
  border-color: transparent;
}

/* Product cards */
#order-standard_cart .product {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 1.5rem;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  height: 100%;
}
#order-standard_cart .product:hover {
  border-color: var(--brand-lightBlue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
#order-standard_cart .product header {
  padding: 1.25rem 1.5rem 0.75rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: none;
  background: transparent;
}
#order-standard_cart .product header .qty {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}
#order-standard_cart .product .product-desc {
  padding: 0 1.5rem;
  flex: 1;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.6;
}
#order-standard_cart .product .product-desc ul {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
}
#order-standard_cart .product .product-desc ul li {
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
#order-standard_cart .product .product-desc ul li:last-child {
  border-bottom: none;
}
#order-standard_cart .product .product-desc ul li .feature-value {
  color: var(--text-primary);
  font-weight: 600;
  margin-right: 0.25rem;
}
#order-standard_cart .product .product-desc ul li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free", "FontAwesome";
  font-weight: 900;
  font-size: 0.625rem;
  color: #22c55e;
  flex-shrink: 0;
}
#order-standard_cart .product footer {
  padding: 1rem 1.5rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
}
#order-standard_cart .product-pricing {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}
#order-standard_cart .product-pricing .price {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
}
#order-standard_cart .product-pricing small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Order now button */
#order-standard_cart .btn-order-now {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-lightBlue)) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: var(--radius-md);
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.15s;
}
#order-standard_cart .btn-order-now:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Cart body */
#order-standard_cart .cart-body {
  flex: 1;
}

/* Row equal height */
#order-standard_cart .row-eq-height {
  display: flex;
  flex-wrap: wrap;
}
#order-standard_cart .row-eq-height > [class*="col-"] {
  display: flex;
}

/* Sidebar categories collapsed (mobile) */
#order-standard_cart .sidebar-header-text {
  color: var(--text-primary);
  font-weight: 600;
}

/* Configure product page */
#order-standard_cart .sub-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

/* Pricing table in configure */
#order-standard_cart .pricing-table,
#order-standard_cart .order-summary {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

/* Checkout page */
#order-standard_cart .order-summary .order-summary-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--text-primary);
}
#order-standard_cart .order-summary .order-summary-body {
  padding: 1.5rem;
}

/* View cart */
#order-standard_cart .view-cart-items-header {
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
#order-standard_cart .view-cart-items-header th {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}
#order-standard_cart .item-container {
  border-bottom: 1px solid var(--border-subtle);
}
#order-standard_cart .item-container td {
  padding: 1rem;
  color: var(--text-primary);
  vertical-align: middle;
}
#order-standard_cart .item-title {
  font-weight: 600;
  color: var(--text-primary);
}
#order-standard_cart .item-domain,
#order-standard_cart .item-config {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Promo code */
#order-standard_cart .promo-container {
  background: var(--surface-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
}

/* Domain search */
#order-standard_cart .domain-checker-container {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
#order-standard_cart .domain-checker-container input[type="text"] {
  background: var(--input-bg);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  font-size: 1rem;
}
#order-standard_cart .domain-checker-container input[type="text"]:focus {
  border-color: var(--brand-lightBlue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  outline: none;
}

/* Domain results */
#order-standard_cart .domain-lookup-result {
  background: var(--surface-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 0.5rem;
}
#order-standard_cart .domain-lookup-result.available {
  border-color: rgba(34, 197, 94, 0.3);
}
#order-standard_cart .domain-lookup-result.unavailable {
  border-color: rgba(239, 68, 68, 0.2);
  opacity: 0.7;
}

/* Complete page */
#order-standard_cart .order-complete {
  text-align: center;
  padding: 3rem 1.5rem;
}
#order-standard_cart .order-complete i {
  font-size: 3rem;
  color: #22c55e;
  margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 767px) {
  #order-standard_cart .product footer {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  #order-standard_cart .btn-order-now {
    width: 100%;
    justify-content: center;
  }
}

/* ----------------------------------------
   Empty Status Group Headers — Hide
   WHMCS renders status group headers even
   when no products exist in that status.
   ---------------------------------------- */
.label-placeholder {
  position: absolute !important;
  visibility: hidden !important;
}

/* ----------------------------------------
   intl-tel-input — Phone Country Code Dropdown
   Fix: visual styling for dark mode, width containment
   Note: Do NOT override padding-left — intlTelInput calculates it
   dynamically via iti-sdc-* classes based on dial code length.
   ---------------------------------------- */
.intl-tel-input,
.intl-tel-input.allow-dropdown,
.intl-tel-input.separate-dial-code {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  z-index: 100;
}
.intl-tel-input input,
.intl-tel-input input[type="tel"],
.intl-tel-input input[type="text"] {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.intl-tel-input .flag-container {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  padding: 1px;
  z-index: 2;
}
.intl-tel-input .selected-flag {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 0 8px 0 12px;
  cursor: pointer;
  position: relative;
  z-index: 1;
  background: transparent;
  border-right: 1px solid var(--border-subtle);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  transition: background 0.15s;
}
.intl-tel-input .selected-flag:hover {
  background: var(--surface-hover);
}
.intl-tel-input .selected-dial-code {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.intl-tel-input .iti-arrow {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--text-muted);
  transition: transform 0.15s;
}
.intl-tel-input .iti-arrow.up {
  border-top: none;
  border-bottom: 5px solid var(--text-muted);
}

/* Country list dropdown */
.intl-tel-input .country-list {
  position: absolute !important;
  z-index: 9999 !important;
  top: 100%;
  left: 0;
  list-style: none;
  padding: 0.375rem 0;
  margin: 4px 0 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-height: 260px;
  min-width: 320px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.intl-tel-input .country-list.hide {
  display: none;
}

/* Scrollbar styling */
.intl-tel-input .country-list::-webkit-scrollbar {
  width: 6px;
}
.intl-tel-input .country-list::-webkit-scrollbar-track {
  background: transparent;
}
.intl-tel-input .country-list::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 3px;
}
.intl-tel-input .country-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Individual country items */
.intl-tel-input .country-list .country {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  transition: background 0.1s, color 0.1s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.intl-tel-input .country-list .country:hover,
.intl-tel-input .country-list .country.highlight {
  background: var(--surface-hover);
  color: var(--text-primary);
}
.intl-tel-input .country-list .country.active {
  background: rgba(59, 130, 246, 0.1);
  color: var(--brand-lightBlue);
}

/* Flag box */
.intl-tel-input .country-list .flag-box {
  display: inline-flex;
  align-items: center;
  width: 20px;
  min-width: 20px;
}

/* Country name & dial code */
.intl-tel-input .country-list .country-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
  font-size: 0.8125rem;
}
.intl-tel-input .country-list .dial-code {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  margin-left: auto;
  padding-left: 8px;
}

/* Divider between preferred and all countries */
.intl-tel-input .country-list .divider {
  height: 0;
  margin: 4px 0;
  border-top: 1px solid var(--border-subtle);
  padding: 0;
}

/* Search input inside dropdown (if enabled) */
.intl-tel-input .country-list .search-box {
  width: 100%;
  padding: 6px 10px;
  margin-bottom: 4px;
  background: var(--input-bg);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8125rem;
  outline: none;
}
.intl-tel-input .country-list .search-box:focus {
  border-color: var(--brand-lightBlue);
}

/* Ensure parent containers don't clip the dropdown */
.form-group,
.panel-body,
.card-body,
.well,
.form-horizontal .form-group,
.tab-content,
.tab-pane,
.tab-content > .tab-pane,
#containerNewUserSignup,
#containerNewUserSecurity,
.main-content,
.content-area {
  overflow: visible !important;
}

/* Fix iti-flag visibility in dark mode — override all.css gray background */
.iti-flag {
  background-color: transparent !important;
}

/* Ensure intl-tel-input dropdown appears above sibling cards */

/* Grid cell overflow fix for intl-tel-input inside grid layouts */
.grid > .form-group,
#personalInformation .form-group {
  min-width: 0;
  overflow: visible;
}

/* Light mode adjustments */
html:not(.dark) .intl-tel-input .country-list {
  background: #ffffff;
  border-color: rgba(203, 213, 225, 0.8);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}
html:not(.dark) .intl-tel-input .country-list .country:hover,
html:not(.dark) .intl-tel-input .country-list .country.highlight {
  background: #f1f5f9;
}
html:not(.dark) .intl-tel-input .country-list .country.active {
  background: rgba(59, 130, 246, 0.08);
}

/* ============================================
   REXE ORDER FORM — Premium Product Cards
   ============================================ */

/* Product card hover glow */
#order-rexe .product:hover {
  border-color: var(--brand-lightBlue) !important;
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.12), 0 0 0 1px rgba(59, 130, 246, 0.1);
}

/* Light mode: product card footer */
html:not(.dark) #order-rexe .product footer {
  background: rgba(241, 245, 249, 0.6) !important;
}

/* Light mode: product card body */
html:not(.dark) #order-rexe .product {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(226, 232, 240, 0.8) !important;
}
html:not(.dark) #order-rexe .product:hover {
  background: #ffffff !important;
  border-color: var(--brand-lightBlue) !important;
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.08), 0 0 0 1px rgba(59, 130, 246, 0.08);
}

/* Feature icon boxes — light mode */
html:not(.dark) #order-rexe .product .flex.items-center .w-7 {
  background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(99,102,241,0.06)) !important;
}

/* Order button hover */
#order-rexe .btn-order-now:hover {
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35) !important;
}

/* Configure product page — order summary sticky card */
#order-rexe .order-summary .summary-container {
  font-size: 0.875rem;
}
#order-rexe .order-summary .summary-container .clearfix {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}
#order-rexe .order-summary .summary-container .clearfix:last-child {
  border-bottom: none;
  font-weight: 700;
  font-size: 1rem;
  padding-top: 0.75rem;
  color: var(--text-primary);
}
#order-rexe .order-summary .summary-container .pull-left {
  float: none;
  color: var(--text-secondary);
}
#order-rexe .order-summary .summary-container .pull-right {
  float: none;
  color: var(--text-primary);
  font-weight: 600;
}

/* Validation errors styling */
#order-rexe #containerProductValidationErrors {
  border-radius: var(--radius-lg);
  animation: flashSlideIn 0.3s ease;
}
#order-rexe #containerProductValidationErrors ul {
  margin: 0;
  padding-left: 1.25rem;
}
#order-rexe #containerProductValidationErrors ul li {
  font-size: 0.8125rem;
  padding: 0.125rem 0;
}

/* ============================================
   REXE ORDER FORM — Feature Rows
   ============================================ */
.rexe-features-list {
  display: flex;
  flex-direction: column;
}
.rexe-feature-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border-subtle);
}
.rexe-feature-row:last-child {
  border-bottom: none;
}
.rexe-feature-icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.6875rem;
  background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(99,102,241,0.08));
}
.rexe-feature-text {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.4;
}
.rexe-feature-val {
  font-weight: 700;
  color: var(--text-primary);
  margin-right: 0.25rem;
}
.rexe-feature-label {
  color: var(--text-muted);
  font-weight: 400;
}

/* ============================================
   REXE ORDER SUMMARY — Premium Styling
   ============================================ */

/* Product header */
.rexe-summary-product-header {
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}
.rexe-summary-product-name {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}
.rexe-summary-product-group {
  font-size: 0.6875rem;
  color: var(--brand-lightBlue);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.125rem;
}

/* Line items */
.rexe-summary-items {
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}
.rexe-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.375rem 0;
  font-size: 0.8125rem;
}
.rexe-summary-label {
  color: var(--text-muted);
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}
.rexe-summary-value {
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  text-align: right;
  flex-shrink: 0;
}
.rexe-summary-highlight {
  color: var(--text-primary) !important;
  font-weight: 700;
}
.rexe-summary-sub {
  padding-left: 0.5rem;
  font-size: 0.75rem;
}
.rexe-summary-sub .rexe-summary-label {
  color: var(--text-muted);
  opacity: 0.8;
}

/* Totals section */
.rexe-summary-totals {
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
  margin-top: 0.25rem;
}
.rexe-summary-totals .rexe-summary-row {
  padding: 0.3125rem 0;
}
.rexe-summary-totals .rexe-summary-label {
  font-weight: 500;
  color: var(--text-secondary);
}
.rexe-summary-totals .rexe-summary-value {
  font-weight: 600;
  color: var(--text-primary);
}

/* Total due today */
.rexe-summary-total-due {
  margin-top: 0.75rem;
  padding-top: 0.875rem;
  border-top: 2px solid var(--brand-lightBlue);
  text-align: center;
}
.rexe-summary-total-amount {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}
.rexe-summary-total-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* Orderform validation errors — force block layout (not flex) */
#containerProductValidationErrors {
  display: none;
}
#containerProductValidationErrors[style*="display: block"],
#containerProductValidationErrors.show {
  display: block !important;
}

/* ----------------------------------------
   Active Products/Services Item (clientareahome)
   ---------------------------------------- */
.rexe-service-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  margin: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  border: 1px solid transparent;
}
.rexe-service-item:hover {
  background: var(--surface-hover);
  border-color: var(--border-subtle);
}
.rexe-service-item:first-child {
  margin-top: 1rem;
}
.rexe-service-item:last-child {
  margin-bottom: 1rem;
}
.rexe-service-left {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
  flex: 1;
}
.rexe-service-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.rexe-service-status .label-placeholder {
  display: none;
}
.rexe-service-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rexe-service-domain {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.rexe-service-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.25rem;
}
.rexe-service-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.rexe-service-right .btn-view-details {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--brand-lightBlue);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.rexe-service-right .btn-view-details:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

/* Responsive — mobilde alt alta */
@media (max-width: 640px) {
  .rexe-service-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .rexe-service-right {
    align-self: flex-end;
  }
}

/* Card footer links — clickable */
.glass-card .card-footer a {
  color: var(--brand-lightBlue);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.glass-card .card-footer a:hover {
  color: var(--brand-orange);
  text-decoration: underline;
}

/* ----------------------------------------
   Store pages — layout fixes
   ---------------------------------------- */

/* Footer layout — custom classes to avoid Bootstrap/Tailwind conflicts */
.rexe-footer-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.rexe-footer-copyright {
  margin: 0;
  flex-shrink: 0;
}
.rexe-footer-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.rexe-footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.rexe-footer-links a:hover {
  color: var(--text-secondary);
}
@media (max-width: 640px) {
  .rexe-footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* Store — ensure content-wrapper takes full width */
.content-wrapper {
  min-width: 0;
}

/* WHMCS utility: hidden elements */
.w-hidden {
  display: none !important;
}

/* ----------------------------------------
   Bootstrap Markdown Editor Fix
   Dark mode & light mode styling for
   WHMCS ticket message editor (.md-editor)
   ---------------------------------------- */

/* Editor wrapper */
.md-editor {
  border-color: var(--border-default) !important;
  border-radius: var(--radius-md) !important;
}

/* Toolbar (header) */
.md-editor > .md-header {
  background: var(--bg-elevated) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  padding: 6px 4px;
}

.md-editor > .md-header .btn {
  background: transparent !important;
  color: var(--text-secondary) !important;
  border: none !important;
  box-shadow: none !important;
}

.md-editor > .md-header .btn:hover,
.md-editor > .md-header .btn:focus,
.md-editor > .md-header .btn.active {
  background: var(--surface-hover) !important;
  color: var(--text-primary) !important;
}

/* Textarea (the actual message input) */
.md-editor > textarea {
  background: var(--input-bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-subtle) !important;
  caret-color: var(--text-primary);
}

.md-editor > textarea:focus {
  background: var(--input-bg) !important;
  color: var(--text-primary) !important;
}

.md-editor > textarea::placeholder {
  color: var(--text-muted) !important;
}

/* Preview pane */
.md-editor > .md-preview {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-subtle) !important;
}

/* Footer */
.md-editor .md-footer {
  background: var(--bg-elevated) !important;
  border-top: 1px solid var(--border-subtle) !important;
  color: var(--text-muted) !important;
}

/* Active state border */
.md-editor.active {
  border-color: var(--brand-lightBlue) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

/* Controls */
.md-editor .md-controls .md-control {
  color: var(--text-muted) !important;
}

.md-editor .md-controls .md-control:hover {
  color: var(--text-primary) !important;
}

/* Light mode fine-tuning */
html:not(.dark) .md-editor > textarea {
  background: #ffffff !important;
  color: #0f172a !important;
}

html:not(.dark) .md-editor > textarea:focus {
  background: #ffffff !important;
}

html:not(.dark) .md-editor > .md-header {
  background: #f1f5f9 !important;
}

html:not(.dark) .md-editor > .md-preview {
  background: #ffffff !important;
  color: #0f172a !important;
}

html:not(.dark) .md-editor .md-footer {
  background: #f1f5f9 !important;
}
