/* ========================================
   GLOBAL THEME STYLES - Modern Dark/Light Theme
   ======================================== */

/* CSS Variables for consistent theming */
:root {
  /* Primary Colors */
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --primary-color: #667eea;
  --primary-hover: #5a6fd6;
  --secondary-color: #764ba2;

  /* Background Colors */
  --bg-main: #f0f2f5;
  --bg-card: #ffffff;
  --bg-sidebar: #1a1f2e;
  --bg-sidebar-header: #151923;

  /* Text Colors */
  --text-primary: #2c3e50;
  --text-secondary: #5a6a7a;
  --text-muted: #8b95a5;
  --text-light: #ffffff;

  /* Border Colors */
  --border-color: #e8ecf1;
  --border-light: #f0f3f7;

  /* Status Colors */
  --success-color: #27ae60;
  --danger-color: #e74c3c;
  --warning-color: #f39c12;
  --info-color: #3498db;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 15px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 25px rgba(0,0,0,0.15);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

/* ========================================
   GLOBAL COMPONENTS - Applied to ALL pages
   ======================================== */

/* Body and Container */
body {
  background: var(--bg-main) !important;
  color: var(--text-primary);
}

/* Navigation Bar Enhancement */
.navbar {
  background: linear-gradient(135deg, #1a1f2e 0%, #151923 100%) !important;
  border: none !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  min-height: 65px;
  padding: 0;
}

.navbar-default {
  background: linear-gradient(135deg, #1a1f2e 0%, #151923 100%) !important;
  border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.navbar-brand {
  color: var(--text-light) !important;
  font-weight: 700;
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  transition: all 0.3s ease;
}

.navbar-brand:hover {
  color: #667eea !important;
}

.navbar-brand i {
  color: #667eea;
  font-size: 24px;
}

.navbar-brand .brand-tld {
  color: #667eea;
  font-weight: 600;
}

.navbar-brand img {
  max-height: 40px;
}

.navbar-nav > li > a {
  color: rgba(255,255,255,0.7) !important;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
  padding: 22px 18px;
  position: relative;
}

.navbar-nav > li > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar-nav > li > a:hover::after,
.navbar-nav > li.active > a::after {
  width: 80%;
}

.navbar-nav > li > a:hover,
.navbar-nav > li > a:focus {
  color: #fff !important;
  background: transparent !important;
}

.navbar-nav > li.active > a,
.navbar-nav > li.active > a:hover,
.navbar-nav > li.active > a:focus {
  color: #fff !important;
  background: rgba(102, 126, 234, 0.15) !important;
}

.navbar-toggle {
  border-color: rgba(102, 126, 234, 0.5);
  margin-top: 15px;
  margin-bottom: 15px;
}

.navbar-toggle .icon-bar {
  background-color: #667eea;
}

.navbar-collapse {
  border-color: rgba(102, 126, 234, 0.2);
}

/* Badge Styling */
.badge {
  background: var(--primary-gradient);
  color: var(--text-light);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
}

/* Dropdown Menu */
.dropdown-menu {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
}

.dropdown-menu > li > a {
  color: var(--text-primary) !important;
  padding: 10px 20px;
  transition: all 0.2s ease;
}

.dropdown-menu > li > a:hover {
  background: var(--bg-main) !important;
  color: var(--primary-color) !important;
}

/* ========================================
   CARDS & WELLS - Global Styling
   ======================================== */

.well {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 25px;
  margin-bottom: 25px;
}

.well-float {
  border-radius: var(--radius-lg);
  overflow: visible;
}

/* API Page Styling */
.api.well {
  max-width: 100%;
  overflow-x: auto;
}

.api h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.api h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-color);
  margin: 30px 0 15px;
  padding: 12px 15px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.05) 100%);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary-color);
}

.api pre {
  background: var(--bg-sidebar);
  color: #e2e8f0;
  padding: 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  border: none;
  margin-top: 15px;
}

.api .table {
  margin-bottom: 0;
}

.api .table th {
  background: linear-gradient(135deg, var(--bg-sidebar) 0%, rgba(26, 31, 46, 0.95) 100%);
  color: #fff;
  font-weight: 600;
  padding: 12px 15px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.api .table td {
  padding: 12px 15px;
  vertical-align: middle;
  font-size: 14px;
}

.api .form-control {
  min-height: 42px;
  padding: 10px 35px 10px 15px;
  line-height: 1.4;
}

.api select.form-control {
  height: auto;
  padding-top: 10px;
  padding-bottom: 10px;
}

.api .form-inline {
  margin-bottom: 20px;
}

.api .form-inline .form-group {
  margin-bottom: 0;
}

/* Panel Styling */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.panel-heading {
  background: var(--bg-main);
  border-bottom: 1px solid var(--border-color);
  padding: 15px 20px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.panel-title {
  color: var(--text-primary);
  font-weight: 600;
}

/* ========================================
   TABLES - Global Styling
   ======================================== */

.table {
  background: var(--bg-card);
  margin-bottom: 0;
}

.table > thead > tr > th {
  background: var(--bg-sidebar);
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 15px 12px;
  border-bottom: none;
  white-space: nowrap;
}

.table > tbody > tr > td {
  padding: 15px 12px;
  vertical-align: middle;
  border-top: 1px solid var(--border-light);
  color: var(--text-primary);
}

.table > tbody > tr:hover {
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.03) 0%, transparent 100%);
}

.table > tbody > tr:first-child > td {
  border-top: none;
}

/* Category row in tables */
.table > tbody > tr[data-filter-table-category-id] > td[colspan] {
  background: linear-gradient(90deg, var(--bg-sidebar) 0%, rgba(26, 31, 46, 0.9) 100%);
  color: var(--text-light);
  font-weight: 600;
  padding: 12px 15px;
}

/* Status badges in tables */
.table .label,
.table .badge {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 15px;
  font-weight: 600;
}

/* ========================================
   FORMS - Global Styling
   ======================================== */

.form-control {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  font-size: 14px;
  height: auto;
  min-height: 44px;
  transition: all 0.3s ease;
  background: var(--bg-card);
  color: var(--text-primary);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-muted);
}

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

.form-group > label,
.control-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 14px;
}

/* Select styling */
select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%235a6a7a' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 12px;
  padding-right: 40px;
}

/* Input Groups */
.input-group {
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.input-group .form-control {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-group-btn .btn {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  height: 44px;
  padding: 0 20px;
}

/* ========================================
   BUTTONS - Global Styling
   ======================================== */

.btn {
  border-radius: var(--radius-sm);
  font-weight: 600;
  padding: 12px 24px;
  font-size: 14px;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: var(--primary-gradient);
  color: var(--text-light);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #5a6fd6 0%, #6a3f8f 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  color: var(--text-light);
}

.btn-default {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
}

.btn-default:hover,
.btn-default:focus {
  background: var(--bg-main);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-success {
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-xs {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* ========================================
   NAV PILLS/TABS - Global Styling
   ======================================== */

.nav-pills {
  margin-bottom: 25px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  list-style: none;
}

.nav-pills > li {
  float: none;
}

.nav-pills > li > a {
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-pills > li > a:hover {
  background: var(--bg-main);
  color: var(--primary-color);
}

.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
  background: var(--primary-gradient);
  color: var(--text-light);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.nav-pills > li.search {
  margin-left: auto;
}

.nav-pills > li.search .form-control {
  min-height: 38px;
  padding: 8px 15px;
}

/* ========================================
   ACCOUNT/NOTIFICATIONS - Icons & alignment
   ======================================== */

.account-page .nav-pills > li > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.account-page label.control-label,
.account-page h5,
.account-page .modal-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.account-page .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.account-page .btn.btn-block {
  display: flex;
  width: 100%;
}

.account-page label.control-label > i,
.account-page h5 > i,
.account-page .modal-title > i {
  color: var(--primary-color);
  opacity: 0.85;
}

/* ========================================
   ALERTS - Global Styling
   ======================================== */

.alert {
  border-radius: var(--radius-md);
  border: none;
  padding: 15px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.alert-success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
  border-left: 4px solid var(--success-color);
}

.alert-danger {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
  border-left: 4px solid var(--danger-color);
}

.alert-warning {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
  color: #856404;
  border-left: 4px solid var(--warning-color);
}

.alert-info {
  background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
  color: #0c5460;
  border-left: 4px solid var(--info-color);
}

.alert .close {
  opacity: 0.7;
  text-shadow: none;
}

.alert .close:hover {
  opacity: 1;
}

/* ========================================
   PAGINATION - Global Styling
   ======================================== */

ul.pagination {
  display: flex !important;
  flex-direction: row !important;
  gap: 5px;
  justify-content: center;
  align-items: center;
  margin: 25px 0;
  padding-left: 0;
  list-style: none;
  flex-wrap: wrap;
}

ul.pagination > li {
  display: inline-block !important;
  float: none !important;
}

ul.pagination > li > a,
ul.pagination > li > span {
  display: inline-block !important;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  margin: 0;
  text-decoration: none;
  line-height: 1.4;
}

ul.pagination > li > a:hover {
  background: var(--bg-main);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

ul.pagination > .active > a,
ul.pagination > .active > span,
ul.pagination > .active > a:hover,
ul.pagination > .active > a:focus {
  background: var(--primary-gradient);
  border-color: transparent;
  color: var(--text-light) !important;
}

/* ========================================
   MODAL - Global Styling
   ======================================== */

.modal-content {
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  background: var(--bg-sidebar);
  color: var(--text-light);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px 25px;
  border-bottom: none;
}

.modal-header .close {
  color: var(--text-light);
  opacity: 0.7;
  text-shadow: none;
}

.modal-header .close:hover {
  opacity: 1;
}

.modal-title {
  font-weight: 600;
  font-size: 18px;
}

.modal-body {
  padding: 25px;
}

.modal-footer {
  padding: 20px 25px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-main);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ========================================
   TOOLTIP - Global Styling
   ======================================== */

.tooltip-inner {
  background: var(--bg-sidebar);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.tooltip.top .tooltip-arrow {
  border-top-color: var(--bg-sidebar);
}

.tooltip.bottom .tooltip-arrow {
  border-bottom-color: var(--bg-sidebar);
}

/* ========================================
   CONTAINER ADJUSTMENTS
   ======================================== */

.container,
.container-fluid {
  padding-top: 25px;
  padding-bottom: 25px;
}

/* ========================================
   ORDER ACTIONS
   ======================================== */

.order-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.order-actions .btn {
  padding: 6px 12px;
  font-size: 12px;
}

/* ========================================
   STATUS LABELS
   ======================================== */

.label-success { background: var(--success-color); }
.label-danger { background: var(--danger-color); }
.label-warning { background: var(--warning-color); color: #333; }
.label-info { background: var(--info-color); }
.label-default { background: var(--text-muted); }

/* ========================================
   HELPER CLASSES
   ======================================== */

.nowrap {
  white-space: nowrap;
}

.width-40 {
  width: 40%;
  max-width: 400px;
  word-break: break-all;
}

.width-service-name {
  max-width: 400px;
  word-break: break-word;
}

/* Service name column styling */
.service-name {
  font-size: 13px;
  line-height: 1.4;
}

/* Table responsive wrapper */
.table-responsive {
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 16px;
  margin: 0;
}

/* Link styling in tables */
.table a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.table a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* Favorite star */
[data-favorite-service-id] {
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

[data-favorite-service-id]:hover,
[data-favorite-service-id].favorite-active {
  color: #f39c12;
}

/* Filter button styling */
.btn-primary.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Search in nav pills */
.nav-pills .search .input-group {
  min-width: 250px;
}

/* Service description in table */
.service-description {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.service-description__th {
  min-width: 200px;
}

/* RTL support improvements */
.rtl-nav,
.rtl-table,
.rtl-form,
.rtl-alert {
  direction: rtl;
  text-align: right;
}

.rtl-pagination {
  direction: ltr;
}

/* Ticket uploader styling */
.tickets-uploader {
  margin-top: 10px;
}

/* API key styling */
#api_key {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
  background: var(--bg-main);
  letter-spacing: 0.5px;
}

/* Help block */
.help-block {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 8px;
}

/* ========================================
   GLOBAL SIDEBAR LAYOUT - For All Pages
   ======================================== */

/* Global Sidebar - reuse sidebar-wrapper styles */
.global-sidebar-wrapper {
  background: #1a1f2e;
  min-height: 100vh;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Global Main Content */
.global-main-content {
  margin-left: 250px;
  padding: 25px 30px;
  min-height: 100vh;
  background: var(--bg-main);
}

/* Mobile menu toggle - hidden on desktop */
body.has-sidebar .mobile-menu-toggle {
  display: none;
}

/* Sidebar overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}

.sidebar-overlay.active {
  display: block;
}

/* Hide default navbar when using sidebar layout */
body.has-sidebar .navbar {
  display: none !important;
}

/* Hide global sidebar on new order page (it has its own) */
body:has(.modern-order-page) .global-sidebar-wrapper {
  display: none !important;
}

body:has(.modern-order-page) .global-main-content {
  margin-left: 0 !important;
  padding: 0 !important;
}

/* Hide global mobile toggle and overlay on neworder page */
body:has(.modern-order-page) #globalMobileMenuToggle {
  display: none !important;
}

body:has(.modern-order-page) #globalSidebarOverlay {
  display: none !important;
}

/* Global sidebar - remove container padding since we have main-content padding */
.global-main-content .container,
.global-main-content .container-fluid {
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
}

/* ========================================
   MODERN NEW ORDER PAGE STYLES - 2MXH Style
   ======================================== */

/* Main Container */
.modern-order-page {
  background: var(--bg-main);
  min-height: 100vh;
  padding: 0;
}

.modern-order-page .container-fluid {
  padding: 0;
}

.modern-order-page .row {
  margin: 0;
}

/* Sidebar Wrapper (for neworder page specifically) */
.sidebar-wrapper {
  background: #1a1f2e;
  min-height: 100vh;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

/* Sidebar Brand/Logo */
.sidebar-brand {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #151923;
}

.sidebar-brand a {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo {
  max-height: 32px;
  max-width: 140px;
}

.brand-text {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-collapse-btn {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 5px;
  font-size: 12px;
}

.sidebar-collapse-btn:hover {
  color: #fff;
}

/* Sidebar Scroll Area */
.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-scroll::-webkit-scrollbar {
  width: 4px;
}

.sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

/* Sidebar Navigation */
.sidebar-nav {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: #8b95a5;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s ease;
}

.sidebar-nav-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.03);
  text-decoration: none;
}

.sidebar-nav-item.active {
  color: #fff;
  background: rgba(102, 126, 234, 0.15);
}

.sidebar-nav-item i {
  width: 22px;
  text-align: center;
  font-size: 18px;
  opacity: 0.85;
  transition: all 0.2s ease;
}

.sidebar-nav-item.active i {
  opacity: 1;
  transform: scale(1.1);
  color: #667eea;
}

/* Sidebar Groups - Collapsible */
.sidebar-group {
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.sidebar-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: #8b95a5;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.sidebar-group-header:hover {
  color: #fff;
  background: rgba(255,255,255,0.03);
}

.sidebar-group-header > i:first-child {
  width: 22px;
  text-align: center;
  font-size: 18px;
}

.sidebar-group-header > span {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
}

.sidebar-group-header .group-arrow {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.sidebar-group-header[aria-expanded="false"] .group-arrow,
.sidebar-group-header.collapsed .group-arrow {
  transform: rotate(-90deg);
}

.sidebar-group-items {
  background: rgba(0,0,0,0.15);
  overflow: hidden;
}

/* Fix: Hide items properly when collapsed */
.sidebar-group-items.collapse:not(.show) {
  display: none;
}

.sidebar-group-items .sidebar-nav-item {
  padding-left: 54px;
  font-size: 12px;
}

.sidebar-group-items .sidebar-nav-item i {
  font-size: 16px;
  width: 18px;
}

/* Smooth collapse animation */
.sidebar-group-items.collapsing {
  display: block;
  height: 0;
  overflow: hidden;
  transition: height 0.2s ease;
}

.sidebar-section-title {
  padding: 20px 20px 10px;
  color: #4a5568;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* Platform Groups */
.platform-groups {
  padding: 0 0 20px;
}

.platform-group {
  margin-bottom: 2px;
}

.platform-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  font-weight: 500;
}

.platform-header:hover {
  background: rgba(255,255,255,0.03);
}

.platform-header.active {
  background: rgba(102, 126, 234, 0.1);
}

.platform-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 14px;
}

.platform-icon.facebook { background: #1877f2; color: #fff; }
.platform-icon.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; }
.platform-icon.tiktok { background: #000; color: #fff; }
.platform-icon.youtube { background: #ff0000; color: #fff; }
.platform-icon.twitter { background: #1da1f2; color: #fff; }
.platform-icon.telegram { background: #0088cc; color: #fff; }
.platform-icon.other { background: #64748b; color: #fff; }

.platform-name {
  flex: 1;
}

.platform-arrow {
  font-size: 10px;
  color: #64748b;
  transition: transform 0.2s ease;
}

.platform-header.expanded .platform-arrow {
  transform: rotate(90deg);
}

.platform-categories {
  display: none;
  padding-left: 20px;
  background: rgba(0,0,0,0.15);
}

.platform-categories.show {
  display: block;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: #8b95a5;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
}

.category-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.03);
}

.category-item.active {
  color: #667eea;
  background: rgba(102, 126, 234, 0.1);
}

.category-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.category-icon {
  width: 18px;
  text-align: center;
  font-size: 12px;
  opacity: 0.7;
}

.category-name {
  font-size: 12px;
}

.category-arrow {
  font-size: 10px;
  opacity: 0.5;
}

/* Sidebar User Info */
.sidebar-user-info {
  padding: 15px 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
  background: #151923;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-balance-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-balance-box > i {
  color: #27ae60;
  font-size: 16px;
}

.balance-info {
  display: flex;
  flex-direction: column;
}

.balance-label {
  color: #64748b;
  font-size: 10px;
  text-transform: uppercase;
}

.balance-value {
  color: #27ae60;
  font-weight: 600;
  font-size: 14px;
}

.user-actions {
  display: flex;
  gap: 8px;
}

.user-action-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  color: #8b95a5;
  text-decoration: none;
  transition: all 0.2s ease;
}

.user-action-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.category-list {
  padding: 10px 0;
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  color: #ecf0f1;
}

.category-item:hover {
  background: rgba(52, 152, 219, 0.1);
  border-left-color: #3498db;
}

.category-item.active {
  background: linear-gradient(90deg, rgba(52, 152, 219, 0.2) 0%, transparent 100%);
  border-left-color: #3498db;
  color: #fff;
}

.category-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.category-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.category-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.category-name {
  font-size: 14px;
  font-weight: 500;
}

.category-arrow {
  font-size: 12px;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.category-item.active .category-arrow {
  opacity: 1;
  transform: translateX(3px);
}

/* Main Content */
.main-content {
  margin-left: 250px;
  padding: 25px 30px;
  min-height: 100vh;
  background: #f0f2f5;
}

/* Modern Alerts */
.modern-alert {
  border-radius: 8px;
  border: none;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.modern-alert i {
  margin-right: 10px;
  font-size: 20px;
}

.modern-alert h4 {
  margin-top: 0;
  margin-bottom: 15px;
}

.success-details p {
  margin: 8px 0;
  font-size: 14px;
}

/* Search Section */
.search-section {
  margin-bottom: 25px;
}

.search-wrapper {
  position: relative;
  max-width: 500px;
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #95a5a6;
  font-size: 16px;
}

.search-input {
  padding-left: 45px;
  height: 45px;
  border-radius: 25px;
  border: 2px solid #e0e6ed;
  font-size: 14px;
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  outline: none;
}

/* Unified Service Card - Contains services + fields */
.unified-service-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #e8ecf1;
  overflow: hidden;
  margin-bottom: 20px;
}

/* Services Section */
.services-section {
  margin-bottom: 0;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: #5a6a7a;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 20px 20px 0;
}

.services-list-container {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  border: none;
  overflow: hidden;
}

.services-list {
  max-height: 350px;
  overflow-y: auto;
  border-bottom: 1px solid #e8ecf1;
}

/* Custom Scrollbar */
.services-list::-webkit-scrollbar {
  width: 6px;
}

.services-list::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.services-list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.services-list::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

.loading-services {
  text-align: center;
  padding: 50px 20px;
  color: #95a5a6;
}

.loading-services i {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
  color: #3498db;
}

/* ============================================
   SERVER GROUP - Collapsible Service Groups
   ============================================ */
.server-group-wrapper {
  margin-bottom: 2px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e8ecf1;
}

.server-group-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  gap: 10px;
}

.server-group-header:hover {
  opacity: 0.95;
}

.server-group-header.expanded {
  border-radius: 8px 8px 0 0;
}

.server-group-icon {
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.2);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.server-group-icon i {
  font-size: 14px;
}

.server-group-name {
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}

.server-group-count {
  font-size: 11px;
  font-weight: 400;
  background: rgba(255,255,255,0.25);
  padding: 2px 6px;
  border-radius: 8px;
  margin-left: 6px;
}

.server-group-hint {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.85;
  margin-left: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.15);
  padding: 3px 10px;
  border-radius: 12px;
  animation: pulse-hint 2s ease-in-out infinite;
}

.server-group-hint i {
  font-size: 10px;
}

@keyframes pulse-hint {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.server-group-header.expanded .server-group-hint {
  display: none;
}

.server-group-arrow {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
  transition: transform 0.2s ease;
}

.server-group-arrow i {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.server-group-content {
  background: #fafbfc;
  border-top: 1px solid rgba(102, 126, 234, 0.2);
}

.server-group-content .service-item {
  background: #fff;
  margin: 0;
  border-left: 3px solid transparent;
}

.server-group-content .service-item:hover {
  border-left-color: #667eea;
  background: linear-gradient(90deg, #f0f7ff 0%, #fff 100%);
}

.server-group-content .service-item.selected {
  border-left-color: #3498db;
  background: linear-gradient(90deg, #e3f0ff 0%, #f5faff 100%);
}

/* Service Item - Modern Inline Style */
.service-item {
  border-bottom: 1px solid #f0f3f7;
  transition: all 0.2s ease;
}

.service-item:last-child {
  border-bottom: none;
}

.service-item:hover {
  background: linear-gradient(90deg, #f0f7ff 0%, #fff 100%);
}

.service-item.selected {
  background: linear-gradient(90deg, #e3f0ff 0%, #f5faff 100%);
}

.service-label {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  cursor: pointer;
  margin: 0;
  font-weight: normal;
  gap: 10px;
  width: 100%;
}

/* Custom Radio Button */
.service-radio {
  display: none;
}

.service-indicator {
  width: 20px;
  height: 20px;
  border: 2px solid #d0d7de;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s ease;
}

.service-item.selected .service-indicator {
  border-color: #3498db;
  background: #3498db;
}

.service-item.selected .service-indicator::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
}

.service-id-badge {
  font-size: 12px;
  font-weight: 600;
  color: #6b7b8a;
  background: #f0f3f7;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  min-width: 40px;
  text-align: center;
}

.service-item.selected .service-id-badge {
  background: #3498db;
  color: #fff;
}

.service-text {
  font-size: 13px;
  color: #3a4a5a;
  line-height: 1.4;
  word-break: break-word;
}

.service-rate {
  font-size: 11px;
  font-weight: 600;
  color: #667eea;
  flex-shrink: 0;
  padding: 3px 8px;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 4px;
  white-space: nowrap;
  margin-left: 6px;
}

.service-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #27ae60;
  flex-shrink: 0;
  box-shadow: 0 0 4px rgba(39, 174, 96, 0.4);
  margin-left: 6px;
}

.service-status-dot.inactive {
  background: #e74c3c;
  box-shadow: 0 0 4px rgba(231, 76, 60, 0.4);
}

/* Service Description - Inside Unified Card */
.service-description-section {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 0;
  padding: 16px 20px;
  margin: 0;
  border: none;
  border-top: 1px solid #e8ecf1;
  border-bottom: 1px solid #e8ecf1;
}

.service-description-section .section-title {
  padding: 0;
  margin-bottom: 10px;
  font-size: 12px;
  color: #667eea;
  display: flex;
  align-items: center;
  gap: 6px;
}

.service-description-section .section-title::before {
  content: '\f05a';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: 12px;
}

.description-content {
  font-size: 13px;
  line-height: 1.6;
  color: #555;
  background: #fff;
  padding: 12px 15px;
  border-radius: 8px;
  border: 1px solid #e0e6ed;
}

/* Order Summary */
.order-summary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 25px;
  color: #fff;
}

.summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.summary-item label {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
  opacity: 0.9;
}

.charge-display {
  font-size: 28px;
  font-weight: 700;
}

/* Terms Section */
.terms-section {
  margin-bottom: 20px;
}

.terms-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #555;
  cursor: pointer;
  font-weight: normal;
}

.terms-checkbox {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Submit Section */
.submit-section {
  text-align: right;
}

.btn-submit {
  width: 100%;
  padding: 16px 40px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

.btn-submit i {
  margin-right: 8px;
}

/* Dynamic Fields Styling - Inside Unified Card */
#fields {
  background: transparent;
  padding: 20px;
  border-radius: 0;
  border: none;
  margin-bottom: 0;
}

#fields:empty {
  display: none;
  padding: 0;
}

#fields .form-group {
  padding: 0;
  margin-bottom: 20px;
  background: transparent;
  border: none;
  border-radius: 0;
}

#fields .form-group:last-child {
  margin-bottom: 0;
}

#fields .form-group label {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 10px;
}

#fields .form-control {
  border: 2px solid #e0e6ed;
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 14px;
  height: auto;
  min-height: 44px;
  transition: all 0.3s ease;
  background: #fff;
  color: #333;
  position: relative;
  z-index: 1;
}

#fields .form-control:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  outline: none;
  background: #fff;
}

/* Validation States */
#fields .form-control.is-invalid,
#fields .form-control.has-error,
#fields input.input-error,
#fields textarea.input-error,
#fields select.input-error,
.form-control.input-error,
input.input-error,
textarea.input-error,
.input-error {
  border-color: #e74c3c !important;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15) !important;
  background: #fff5f5 !important;
  border-width: 2px !important;
}

#fields .form-control.is-valid {
  border-color: #27ae60;
  box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

/* Services list error state */
#services-list.input-error {
  border: 2px solid #e74c3c !important;
  border-radius: 8px;
}

.validation-error,
.validation-error-msg {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 8px;
  padding: 8px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: fadeInError 0.3s ease;
}

@keyframes fadeInError {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.validation-error i,
.validation-error-msg i {
  font-size: 12px;
}

.validation-error.hidden {
  display: none;
}

/* Form Error Alert */
.form-error-alert {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: #fff;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: shake 0.5s ease-in-out;
}

.form-error-alert i {
  font-size: 20px;
}

.form-error-alert.hidden {
  display: none;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Ensure inputs are interactive */
#fields input,
#fields textarea,
#fields select {
  pointer-events: auto !important;
  cursor: text;
}

#fields input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

#fields input[type="number"]::-webkit-outer-spin-button,
#fields input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 991px) {
  /* Global sidebar responsive */
  .global-sidebar-wrapper {
    position: fixed;
    left: -260px;
    top: 0;
    bottom: 0;
    width: 260px;
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 15px rgba(0,0,0,0.2);
  }

  .global-sidebar-wrapper.open {
    left: 0;
  }

  .global-main-content {
    margin-left: 0 !important;
    padding: 15px !important;
  }

  /* New order page sidebar on mobile */
  .modern-order-page .sidebar-wrapper,
  .sidebar-wrapper,
  #sidebar-categories {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 260px !important;
    z-index: 9999 !important;
    background: #1a1f2e !important;
    display: flex !important;
    flex-direction: column !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s ease !important;
  }

  .modern-order-page .sidebar-wrapper.open,
  .sidebar-wrapper.open,
  #sidebar-categories.open {
    transform: translateX(0) !important;
  }

  .main-content {
    margin-left: 0 !important;
    padding: 20px !important;
  }

  /* Mobile menu toggle button */
  .mobile-menu-toggle {
    display: flex !important;
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    z-index: 1001;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    border: none;
  }

	  /* When the sidebar is open, hide the floating toggle so it doesn't cover balance/bottom actions */
	  body.sidebar-open .mobile-menu-toggle {
	    display: none !important;
	  }

  .mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
  }

  .mobile-overlay.open,
  .mobile-overlay.active {
    display: block;
  }
}

@media (max-width: 767px) {
  .service-label {
    flex-wrap: wrap;
    padding: 12px 15px;
    gap: 8px;
  }

  .service-indicator {
    width: 18px;
    height: 18px;
  }

  .service-id-badge {
    font-size: 11px;
    padding: 2px 6px;
  }

  .service-text {
    width: 100%;
    order: 3;
    font-size: 12px;
    margin-top: 4px;
    padding-left: 30px;
  }

  .service-rate {
    font-size: 12px;
    padding: 3px 8px;
    order: 2;
    margin-left: auto;
  }

  .service-status-dot {
    order: 4;
    position: absolute;
    right: 15px;
    top: 15px;
  }

  .service-item {
    position: relative;
  }

  .submit-section {
    text-align: center;
  }

  .btn-submit {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
  }

  .order-summary {
    padding: 20px;
    border-radius: 12px;
  }

  .charge-display {
    font-size: 24px;
  }

  .search-section {
    margin-bottom: 15px;
  }

  .search-input {
    padding: 10px 15px 10px 40px;
    font-size: 14px;
  }

  .services-list {
    max-height: 350px;
  }
}

/* RTL Support */
.sidebar-rtl {
  direction: rtl;
}

.sidebar-rtl .category-item {
  border-left: none;
  border-right: 3px solid transparent;
}

.sidebar-rtl .category-item:hover,
.sidebar-rtl .category-item.active {
  border-right-color: #3498db;
}

.sidebar-rtl .category-arrow {
  transform: rotate(180deg);
}

.sidebar-rtl .category-item.active .category-arrow {
  transform: rotate(180deg) translateX(3px);
}

/* ========================================
   AUTH PAGES (SIGN IN / SIGN UP) - MODERN PREMIUM DESIGN
   ======================================== */

.auth-page {
  position: relative;
  padding: 60px 0 0;
  overflow: hidden;
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  min-height: 100vh;
}

.auth-page::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse 800px 800px at 20% 20%, rgba(102, 126, 234, 0.35) 0%, transparent 50%),
    radial-gradient(ellipse 600px 600px at 80% 30%, rgba(118, 75, 162, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse 500px 500px at 40% 80%, rgba(102, 126, 234, 0.2) 0%, transparent 50%);
  animation: auth-bg-float 25s ease-in-out infinite;
  pointer-events: none;
}

@keyframes auth-bg-float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(1deg); }
  66% { transform: translate(-20px, 20px) rotate(-1deg); }
}

.auth-page::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.auth-container {
  position: relative;
  z-index: 1;
}

/* Hero Section */
.auth-hero-section {
  margin-bottom: 60px;
}

.auth-hero-content {
  padding: 40px 0;
}

.auth-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  margin-bottom: 24px;
}

.auth-logo {
  height: 32px;
  width: auto;
}

.auth-brand-text {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.auth-hero-title {
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

.auth-hero-subtitle {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  margin-bottom: 28px;
}

.auth-hero-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}

.auth-hero-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
}

.auth-hero-features li i {
  color: #27ae60;
  font-size: 16px;
}

.auth-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.auth-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
}

.auth-trust-badge i {
  color: #667eea;
}

/* Form Card */
.auth-form-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 36px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

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

.auth-form-title {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px;
}

.auth-form-desc {
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  font-size: 15px;
}

.auth-form .form-group {
  margin-bottom: 18px;
}

.auth-form .control-label {
  display: block;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 8px;
  position: relative;
}

.auth-form .control-label i {
  margin-right: 6px;
  opacity: 0.7;
}

.auth-form .forgot-link {
  position: absolute;
  right: 0;
  top: 0;
  font-size: 12px;
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

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

.auth-form .form-control {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 14px 16px;
  height: auto;
  color: #fff;
  font-size: 15px;
  transition: all 0.3s ease;
}

.auth-form .form-control::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.auth-form .form-control:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(102, 126, 234, 0.6);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
  outline: none;
}

.auth-remember {
  margin: 16px 0 20px;
}

.auth-remember label {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-remember input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #667eea;
}

.auth-captcha {
  margin: 16px 0 20px;
  display: flex;
  justify-content: center;
}

.auth-terms {
  margin-bottom: 20px;
}

.auth-terms label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.auth-terms a {
  color: #667eea;
  text-decoration: none;
}

.auth-terms a:hover {
  text-decoration: underline;
}

.auth-actions .btn-primary {
  width: 100%;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: #fff;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.auth-actions .btn-primary i {
  margin-right: 8px;
}

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

.auth-actions .btn-primary:hover::before {
  left: 100%;
}

.auth-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
}

.auth-divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
}

.auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.auth-divider span {
  background: transparent;
  padding: 0 16px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
}

.auth-social {
  text-align: center;
}

.auth-switch {
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  font-size: 14px;
}

.auth-switch a {
  color: #667eea;
  font-weight: 700;
  text-decoration: none;
}

.auth-switch a:hover {
  color: #8fa4f3;
}

/* Alert styling */
.auth-form .alert {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #fff;
  margin-bottom: 20px;
}

.auth-form .alert-danger {
  background: rgba(231, 76, 60, 0.2);
  border-color: rgba(231, 76, 60, 0.4);
}

.auth-form .alert-success {
  background: rgba(39, 174, 96, 0.2);
  border-color: rgba(39, 174, 96, 0.4);
}

.auth-form .alert .close {
  color: rgba(255, 255, 255, 0.7);
  opacity: 1;
  text-shadow: none;
}


/* Section Titles */
.auth-section-title {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-section-title i {
  color: #667eea;
}

.auth-section-subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  margin-bottom: 32px;
  line-height: 1.6;
}

/* Stats Section */
.auth-stats-section {
  margin-bottom: 60px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-stats-section > .row {
  display: flex;
  flex-wrap: wrap;
}

.auth-stats-section > .row > [class*="col-"] {
  display: flex;
  margin-bottom: 16px;
}

.auth-stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  transition: all 0.3s ease;
  width: 100%;
}

.auth-stat-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.auth-stat-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 14px;
  font-size: 24px;
  color: #fff;
}

.auth-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.auth-stat-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
}

/* About Section */
.auth-about-section {
  margin-bottom: 60px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.auth-check-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.auth-check-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.auth-check-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
  border-radius: 12px;
  font-size: 20px;
  color: #667eea;
  flex-shrink: 0;
}

.auth-check-content h4 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}

.auth-check-content p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  line-height: 1.5;
}

.auth-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.auth-cta-buttons .btn {
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}

.auth-cta-buttons .btn-outline-light {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
}

.auth-cta-buttons .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.auth-cta-buttons .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: #fff;
}

.auth-cta-buttons .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

.auth-cta-buttons .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

.auth-cta-buttons .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Categories Card */
.auth-categories-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 28px;
  margin-top: 24px;
}

.auth-categories-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-categories-card h3 i {
  color: #e74c3c;
}

.auth-category-tags {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.auth-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
  justify-content: center;
}

.auth-tag:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.4);
  transform: translateY(-2px);
}

.auth-tag i {
  font-size: 16px;
}

.auth-tag i.fa-instagram { color: #e1306c; }
.auth-tag i.fa-tiktok { color: #fff; }
.auth-tag i.fa-youtube { color: #ff0000; }
.auth-tag i.fa-facebook { color: #1877f2; }
.auth-tag i.fa-telegram { color: #0088cc; }
.auth-tag i.fa-twitter { color: #1da1f2; }
.auth-tag i.fa-spotify { color: #1db954; }
.auth-tag i.fa-linkedin { color: #0077b5; }

.auth-api-note {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  margin: 0;
  padding: 12px 16px;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 10px;
  border-left: 3px solid #667eea;
}

.auth-api-note i {
  margin-right: 8px;
  color: #667eea;
}


/* Features Section */
.auth-features-section {
  margin-bottom: 60px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-features-section > .row {
  display: flex;
  flex-wrap: wrap;
}

.auth-features-section > .row > [class*="col-"] {
  display: flex;
  margin-bottom: 16px;
}

.auth-feature-card {
  text-align: center;
  padding: 32px 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.auth-feature-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.auth-feature-card .auth-feature-icon {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  font-size: 28px;
  color: #fff;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.auth-feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px;
}

.auth-feature-card p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  line-height: 1.6;
  flex-grow: 1;
}

/* Steps Section */
.auth-steps-section {
  margin-bottom: 60px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-steps-section > .row {
  display: flex;
  flex-wrap: wrap;
}

.auth-steps-section > .row > [class*="col-"] {
  display: flex;
  margin-bottom: 16px;
}

.auth-step-card {
  text-align: center;
  padding: 36px 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.auth-step-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-6px);
}

.auth-step-number {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.auth-step-icon {
  width: 60px;
  height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(102, 126, 234, 0.15);
  border-radius: 16px;
  font-size: 26px;
  color: #667eea;
  margin: 12px 0 20px;
}

.auth-step-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px;
}

.auth-step-card p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  line-height: 1.6;
}

/* FAQ Section */
.auth-faq-section {
  margin-bottom: 60px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-faq-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.auth-faq-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.auth-faq-question {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.auth-faq-question i {
  color: #667eea;
  font-size: 12px;
  margin-top: 4px;
}

.auth-faq-answer {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  padding-left: 24px;
}

/* SEO Section */
.auth-seo-section {
  margin-bottom: 40px;
}

.auth-seo-content {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 32px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
}

.auth-seo-content h1, .auth-seo-content h2, .auth-seo-content h3 {
  color: #fff;
}

.auth-seo-content a {
  color: #667eea;
}

/* Responsive */
@media (max-width: 991px) {
  .auth-hero-title {
    font-size: 32px;
  }

  .auth-hero-content {
    padding: 20px 0 40px;
  }

  .auth-checklist-grid {
    grid-template-columns: 1fr;
  }

  .auth-section-title {
    font-size: 24px;
  }
}

@media (max-width: 767px) {
  .auth-page {
    padding: 40px 0 60px;
  }

  .auth-hero-title {
    font-size: 28px;
  }

  .auth-hero-subtitle {
    font-size: 15px;
  }

  .auth-form-card {
    padding: 28px 20px;
    border-radius: 20px;
    margin-bottom: 30px;
  }

  .auth-form-title {
    font-size: 22px;
  }

  .auth-trust-badges {
    flex-direction: column;
    gap: 8px;
  }

  .auth-stats-section,
  .auth-about-section,
  .auth-features-section,
  .auth-steps-section,
  .auth-faq-section {
    padding: 28px 16px;
    margin-bottom: 30px;
  }

  /* Stats cards - 2 columns on mobile */
  .auth-stats-section > .row {
    margin: 0 -8px;
  }

  .auth-stats-section > .row > [class*="col-"] {
    padding: 0 8px;
    width: 50%;
    flex: 0 0 50%;
  }

  .auth-stat-card {
    flex-direction: column;
    text-align: center;
    padding: 16px 12px;
    gap: 10px;
  }

  .auth-stat-icon {
    width: 48px;
    height: 48px;
  }

  .auth-stat-icon i {
    font-size: 20px;
  }

  .auth-stat-number {
    font-size: 24px;
  }

  .auth-stat-label {
    font-size: 11px;
  }

  /* Features cards - full width on mobile */
  .auth-features-section > .row > [class*="col-"] {
    width: 100%;
    flex: 0 0 100%;
  }

  .auth-feature-card {
    padding: 20px 16px;
  }

  /* Steps cards - 2 columns on mobile */
  .auth-steps-section > .row {
    margin: 0 -8px;
  }

  .auth-steps-section > .row > [class*="col-"] {
    padding: 0 8px;
    width: 50%;
    flex: 0 0 50%;
  }

  .auth-step-card {
    padding: 20px 12px;
  }

  .auth-step-number {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .auth-step-icon {
    width: 50px;
    height: 50px;
  }

  .auth-step-icon i {
    font-size: 20px;
  }

  .auth-step-title {
    font-size: 14px;
  }

  .auth-step-desc {
    font-size: 12px;
  }

  .auth-cta-buttons {
    flex-direction: column;
  }

  .auth-cta-buttons .btn {
    width: 100%;
    text-align: center;
  }
}

/* Auth Footer */
.auth-footer {
  margin-top: 60px;
  padding: 30px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-footer-content {
  text-align: center;
}

.auth-footer-content p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  margin: 0 0 15px;
}

.auth-footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.auth-footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.auth-footer-links a:hover {
  color: #667eea;
}

/* Hide navbar gap on auth pages */
body:has(.auth-page) {
  background: #0f0c29 !important;
}

body:has(.auth-page) .navbar {
  margin-bottom: 0 !important;
  box-shadow: none !important;
}

.auth-page {
  margin-top: -20px;
  padding-bottom: 0;
}

@media (max-width: 767px) {
  .auth-footer {
    margin-top: 40px;
    padding: 24px 0;
  }

  .auth-footer-links {
    gap: 16px;
  }

  .auth-footer-links a {
    font-size: 12px;
  }
}