/* ═══════════════════════════════════════════════════════
   LYSIDE SMM — style.css
   Design: Dark Purple Premium
   Fontes: Outfit (display) + DM Sans (body)
═══════════════════════════════════════════════════════ */

/* ── RESET & BASE ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── CSS VARIABLES ── */
:root {
  --purple:         #6B3FE7;
  --purple-light:   #9B6DFF;
  --purple-mid:     #7C4FF0;
  --purple-dim:     rgba(107, 63, 231, 0.13);
  --purple-border:  rgba(107, 63, 231, 0.35);
  --purple-glow:    rgba(107, 63, 231, 0.25);

  --bg:             #040B24;
  --bg2:            #080F2E;
  --bg3:            #0D1535;
  --bg4:            #111A3E;

  --surface:        rgba(255, 255, 255, 0.04);
  --surface2:       rgba(255, 255, 255, 0.07);
  --surface3:       rgba(255, 255, 255, 0.10);

  --border:         rgba(255, 255, 255, 0.07);
  --border2:        rgba(255, 255, 255, 0.11);

  --text:           #F0EEFF;
  --text-muted:     #9B93C4;
  --text-dim:       #5C5480;

  --green:          #10D9A0;
  --green-dim:      rgba(16, 217, 160, 0.12);
  --gold:           #F5C842;
  --gold-dim:       rgba(245, 200, 66, 0.12);
  --red:            #F87171;
  --red-dim:        rgba(248, 113, 113, 0.10);

  --sidebar-w:      240px;
  --topbar-h:       62px;
  --radius:         12px;
  --radius-lg:      18px;
  --transition:     0.2s ease;

  --font-display:   'Outfit', sans-serif;
  --font-body:      'DM Sans', sans-serif;
}

/* ── BODY ── */
html, body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Scroll customizado */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--purple-border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple); }

/* ── SELEÇÃO DE TEXTO ── */
::selection { background: var(--purple-dim); color: var(--purple-light); }

/* ═══════════════════════════════════════════════════════
   LAYOUT AUTENTICADO
═══════════════════════════════════════════════════════ */

body.layout-authenticated {
  display: block;
}

/* ── SIDEBAR ── */
.ly-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform var(--transition);
  overflow: hidden;
}

/* Logo */
.ly-sidebar-logo {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ly-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.ly-logo-img {
  max-height: 36px;
  max-width: 100%;
  object-fit: contain;
}
.ly-logo-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.02em;
}

/* Nav */
.ly-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ly-sidebar-nav::-webkit-scrollbar { width: 3px; }

.ly-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-muted);
  font-size: .88rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ly-nav-item:hover {
  background: var(--surface2);
  color: var(--text);
  text-decoration: none;
}
.ly-nav-item.active {
  background: var(--purple-dim);
  color: var(--purple-light);
  border: 1px solid var(--purple-border);
}
.ly-nav-icon {
  font-size: .95rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  opacity: .8;
}
.ly-nav-item.active .ly-nav-icon { opacity: 1; }

/* ── EMOJI ICON ── */
.ly-nav-emoji {
  font-size: .95rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}

/* ── EXTERNAL LINK INDICATOR ── */
.ly-nav-ext {
  margin-left: auto;
  font-size: .7rem;
  opacity: .35;
  flex-shrink: 0;
}
.ly-nav-item:hover .ly-nav-ext { opacity: .7; }

/* ── NAV DIVIDER ── */
.ly-nav-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 6px 6px;
  padding: 0 4px;
}
.ly-nav-divider::before,
.ly-nav-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.07);
}
.ly-nav-divider span {
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.2);
  white-space: nowrap;
}

/* ── WHATSAPP & INSTA HOVER ── */
.ly-nav-whatsapp:hover { color: #25D366 !important; border-color: rgba(37,211,102,.2) !important; background: rgba(37,211,102,.06) !important; }
.ly-nav-insta:hover    { color: #E1306C !important; border-color: rgba(225,48,108,.2) !important; background: rgba(225,48,108,.06) !important; }

/* Sidebar bottom — saldo */
.ly-sidebar-bottom {
  padding: 14px 14px 18px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.ly-balance-card {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--purple-dim);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.ly-balance-icon { font-size: 1.2rem; flex-shrink: 0; }
.ly-balance-label {
  font-size: .7rem;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 3px;
}
.ly-balance-val {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.ly-addfunds-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--purple);
  color: #fff;
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .02em;
  transition: opacity var(--transition), transform var(--transition);
  box-shadow: 0 4px 16px var(--purple-glow);
}
.ly-addfunds-btn:hover {
  opacity: .88;
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}

/* ── TOPBAR ── */
.ly-topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  background: rgba(4, 11, 36, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 900;
}
.ly-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ly-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Hamburger */
.ly-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.ly-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: background var(--transition);
}
.ly-menu-toggle:hover span { background: var(--text); }

/* Page title */
.ly-page-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.01em;
}

/* Topbar links */
.ly-topbar-link {
  font-size: .83rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background var(--transition), color var(--transition);
}
.ly-topbar-link:hover,
.ly-topbar-link.active {
  background: var(--surface2);
  color: var(--text);
  text-decoration: none;
}

/* Balance badge (topbar) */
.ly-user-balance,
.ly-balance-badge {
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 700;
  color: #fff;
  background: var(--purple);
  border: none;
  border-radius: 20px;
  padding: 5px 14px;
  box-shadow: 0 2px 12px rgba(107,63,231,.4);
}

/* Currency dropdown trigger */
.ly-currency-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--purple);
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  color: #fff;
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  box-shadow: 0 2px 12px rgba(107,63,231,.4);
}
.ly-currency-btn:hover { opacity: .88; transform: translateY(-1px); }
.ly-currency-btn svg { opacity: .7; }

/* ── DROPDOWN ── */
.ly-dropdown { position: relative; }
.ly-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  min-width: 160px;
  list-style: none;
  padding: 6px;
  z-index: 2000;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.ly-dropdown.open .ly-dropdown-menu { display: block; }
.ly-dropdown-menu li a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: .85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.ly-dropdown-menu li a:hover,
.ly-dropdown-menu li.active a {
  background: var(--purple-dim);
  color: var(--text);
}

/* ── MAIN CONTENT (autenticado) ── */
.ly-main {
  margin-left: var(--sidebar-w);
  padding-top: var(--topbar-h);
  min-height: 100vh;
  background: var(--bg);
}

/* ── NOTIFICATIONS ── */
.ly-notify {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 340px;
}
.ly-notify.hidden { display: none; }


/* ═══════════════════════════════════════════════════════
   LAYOUT PÚBLICO
═══════════════════════════════════════════════════════ */

/* ── TOPNAV PÚBLICO ── */
.ly-topnav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(4, 11, 36, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.ly-topnav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Topnav links */
.ly-topnav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin-left: auto;
}
.ly-topnav-links li a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.ly-topnav-links li a:hover,
.ly-topnav-links li.active a {
  background: var(--surface2);
  color: var(--text);
}

/* Lang dropdown (público) */
.ly-lang-dropdown { margin-left: auto; }
.ly-lang-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 7px 12px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: .85rem;
  cursor: pointer;
  transition: background var(--transition);
}
.ly-lang-btn:hover { background: var(--surface2); color: var(--text); }

/* Mobile toggle (público) */
.ly-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}
.ly-mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
}

/* Public main */
.ly-public-main {
  min-height: calc(100vh - 64px);
  background: var(--bg);
}

/* ═══════════════════════════════════════════════════════
   BOOTSTRAP OVERRIDES — faz o Bootstrap combinar com o tema
═══════════════════════════════════════════════════════ */

/* Containers */
.container { max-width: 1100px; }
.well {
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: none !important;
  padding: 28px 26px !important;
  color: var(--text) !important;
}

/* Panels */
.panel { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.panel-body { color: var(--text-muted); }
.panel-heading { background: var(--bg4); border-bottom: 1px solid var(--border); border-radius: var(--radius-lg) var(--radius-lg) 0 0; color: var(--text); }

/* Alerts */
.alert {
  border-radius: var(--radius) !important;
  border: 1px solid !important;
  padding: 14px 18px !important;
  font-size: .88rem !important;
}
.alert-danger  { background: rgba(248,113,113,.08) !important; border-color: rgba(248,113,113,.28) !important; color: #FCA5A5 !important; }
.alert-success { background: rgba(16,217,160,.08) !important; border-color: rgba(16,217,160,.28) !important; color: #6EE7B7 !important; }
.alert-info    { background: rgba(107,63,231,.10) !important; border-color: var(--purple-border) !important; color: var(--purple-light) !important; }
.alert-warning { background: rgba(245,200,66,.09) !important; border-color: rgba(245,200,66,.3) !important; color: #FDE68A !important; }
.alert h4      { font-family: var(--font-display); font-weight: 700; font-size: 1rem; margin-bottom: 6px; color: inherit; }
.alert .close  { color: inherit; opacity: .5; text-shadow: none; }
.alert .close:hover { opacity: 1; }

/* Forms */
.form-control {
  background: var(--surface) !important;
  border: 1px solid var(--border2) !important;
  border-radius: var(--radius) !important;
  color: var(--text) !important;
  font-family: var(--font-body) !important;
  font-size: .92rem !important;
  padding: 10px 14px !important;
  height: auto !important;
  transition: border-color var(--transition), box-shadow var(--transition) !important;
  box-shadow: none !important;
}
.form-control:focus {
  border-color: var(--purple-border) !important;
  box-shadow: 0 0 0 3px rgba(107,63,231,.12) !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  outline: none !important;
}
.form-control::placeholder { color: var(--text-dim) !important; }
.form-control[readonly] { opacity: .75; cursor: default; }

select.form-control {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239B93C4' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  padding-right: 36px !important;
  cursor: pointer !important;
}
select.form-control option { background: #0D1535; color: var(--text); }

textarea.form-control { resize: vertical; min-height: 90px; }

.control-label {
  font-size: .78rem !important;
  font-weight: 600 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  color: var(--text-muted) !important;
  margin-bottom: 7px !important;
}

.help-block { color: var(--text-dim) !important; font-size: .78rem !important; }

/* Input groups */
.input-group .input-group-addon {
  background: var(--bg4);
  border: 1px solid var(--border2);
  color: var(--text-muted);
  border-radius: var(--radius) 0 0 var(--radius);
}

/* Checkboxes / radio */
input[type="checkbox"],
input[type="radio"] { accent-color: var(--purple); }

/* Buttons */
.btn {
  border-radius: var(--radius) !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  font-size: .9rem !important;
  padding: 11px 22px !important;
  letter-spacing: .02em !important;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition) !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer !important;
}
.btn:hover  { transform: translateY(-1px); opacity: .92; }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-mid) 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 20px var(--purple-glow) !important;
}
.btn-primary:hover  { box-shadow: 0 6px 28px var(--purple-glow) !important; }
.btn-primary:focus  { box-shadow: 0 0 0 3px rgba(107,63,231,.3) !important; }

.btn-success {
  background: var(--green) !important;
  color: #0a1a10 !important;
}
.btn-danger {
  background: var(--red) !important;
  color: #fff !important;
}
.btn-default, .btn-secondary {
  background: var(--surface2) !important;
  border: 1px solid var(--border2) !important;
  color: var(--text) !important;
}
.btn-default:hover { background: var(--surface3) !important; }

.btn-block { width: 100% !important; }
.btn-sm { padding: 7px 14px !important; font-size: .82rem !important; }
.btn-lg { padding: 14px 28px !important; font-size: 1rem !important; }

/* Tables */
.table {
  color: var(--text) !important;
  border-color: var(--border) !important;
}
.table > thead > tr > th {
  background: var(--bg3) !important;
  border-bottom: 1px solid var(--border) !important;
  color: var(--text-muted) !important;
  font-size: .75rem !important;
  font-weight: 600 !important;
  letter-spacing: .07em !important;
  text-transform: uppercase !important;
  padding: 12px 16px !important;
}
.table > tbody > tr > td {
  border-top: 1px solid var(--border) !important;
  padding: 13px 16px !important;
  vertical-align: middle !important;
  font-size: .88rem !important;
}
.table-hover > tbody > tr:hover > td {
  background: var(--surface) !important;
}
.table-striped > tbody > tr:nth-of-type(odd) > td {
  background: rgba(255,255,255,.02) !important;
}
.table-bordered, .table-bordered th, .table-bordered td {
  border-color: var(--border) !important;
}

/* Labels / badges */
.label, .badge {
  border-radius: 20px !important;
  font-size: .7rem !important;
  font-weight: 700 !important;
  padding: 3px 10px !important;
  letter-spacing: .04em !important;
}
.label-primary, .badge-primary { background: var(--purple) !important; }
.label-success, .badge-success { background: var(--green) !important; color: #0a1a10 !important; }
.label-danger,  .badge-danger  { background: var(--red) !important; }
.label-warning, .badge-warning { background: var(--gold) !important; color: #1a1000 !important; }
.label-info,    .badge-info    { background: var(--purple-dim) !important; color: var(--purple-light) !important; border: 1px solid var(--purple-border) !important; }
.label-default, .badge-default { background: var(--surface2) !important; color: var(--text-muted) !important; }

/* Pagination */
.pagination > li > a,
.pagination > li > span {
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-muted) !important;
  border-radius: 8px !important;
  margin: 0 2px !important;
  transition: background var(--transition) !important;
}
.pagination > li > a:hover { background: var(--surface2) !important; color: var(--text) !important; }
.pagination > .active > a { background: var(--purple) !important; border-color: var(--purple) !important; color: #fff !important; }

/* Tabs */
.nav-tabs {
  border-bottom: 1px solid var(--border) !important;
}
.nav-tabs > li > a {
  color: var(--text-muted) !important;
  border: none !important;
  border-radius: 8px 8px 0 0 !important;
  padding: 10px 18px !important;
  font-size: .88rem !important;
  font-weight: 500 !important;
}
.nav-tabs > li > a:hover { background: var(--surface) !important; color: var(--text) !important; }
.nav-tabs > li.active > a { background: var(--bg3) !important; color: var(--purple-light) !important; border-bottom: 2px solid var(--purple) !important; }

/* Modals */
.modal-content {
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 24px 80px rgba(0,0,0,.6) !important;
  color: var(--text) !important;
}
.modal-header { border-bottom: 1px solid var(--border) !important; }
.modal-footer { border-top: 1px solid var(--border) !important; }
.modal-title { font-family: var(--font-display) !important; font-weight: 700 !important; }
.modal-backdrop.in { opacity: .6 !important; }

/* Tooltips */
.tooltip-inner {
  background: var(--bg4) !important;
  border: 1px solid var(--border2) !important;
  color: var(--text) !important;
  border-radius: 8px !important;
  font-size: .8rem !important;
}
.tooltip.top .tooltip-arrow    { border-top-color: var(--bg4) !important; }
.tooltip.bottom .tooltip-arrow { border-bottom-color: var(--bg4) !important; }

/* Popover */
.popover {
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
}
.popover-title { background: var(--bg4) !important; color: var(--text) !important; border-bottom: 1px solid var(--border) !important; }
.popover-content { color: var(--text-muted) !important; }

/* Progress */
.progress {
  background: var(--surface2) !important;
  border-radius: 20px !important;
  height: 8px !important;
  box-shadow: none !important;
}
.progress-bar { background: linear-gradient(90deg, var(--purple), var(--purple-light)) !important; border-radius: 20px !important; }

/* List groups */
.list-group-item {
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  transition: background var(--transition) !important;
}
.list-group-item:first-child { border-radius: var(--radius) var(--radius) 0 0 !important; }
.list-group-item:last-child  { border-radius: 0 0 var(--radius) var(--radius) !important; }
.list-group-item:hover, .list-group-item:focus { background: var(--surface2) !important; color: var(--text) !important; }
.list-group-item.active { background: var(--purple) !important; border-color: var(--purple) !important; }

/* Cards / thumbnails */
.thumbnail {
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
}

/* Breadcrumbs */
.breadcrumb { background: transparent !important; color: var(--text-dim) !important; }
.breadcrumb > li + li::before { color: var(--text-dim) !important; }
.breadcrumb > .active { color: var(--text-muted) !important; }

/* Nav pills */
.nav-pills > li > a { color: var(--text-muted) !important; border-radius: 8px !important; }
.nav-pills > li > a:hover { background: var(--surface2) !important; color: var(--text) !important; }
.nav-pills > li.active > a { background: var(--purple) !important; color: #fff !important; }

/* Jumbotron */
.jumbotron { background: var(--bg3) !important; border: 1px solid var(--border) !important; border-radius: var(--radius-lg) !important; }

/* Input readonly */
input[readonly].form-control,
input[disabled].form-control { opacity: .7; cursor: default; }

/* ─── Select2 / Choices overrides (se usar plugin de select) ─── */
.select2-container--default .select2-selection--single {
  background: var(--surface) !important;
  border: 1px solid var(--border2) !important;
  border-radius: var(--radius) !important;
  height: 42px !important;
  display: flex !important;
  align-items: center !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--text) !important;
  line-height: 42px !important;
  padding-left: 14px !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 42px !important;
  right: 10px !important;
}
.select2-dropdown {
  background: var(--bg3) !important;
  border: 1px solid var(--border2) !important;
  border-radius: var(--radius) !important;
}
.select2-container--default .select2-results__option {
  color: var(--text-muted) !important;
  padding: 9px 14px !important;
  font-size: .88rem !important;
}
.select2-container--default .select2-results__option--highlighted {
  background: var(--purple-dim) !important;
  color: var(--text) !important;
}
.select2-search--dropdown .select2-search__field {
  background: var(--surface) !important;
  border: 1px solid var(--border2) !important;
  border-radius: 8px !important;
  color: var(--text) !important;
  padding: 8px 12px !important;
}

/* ── Dropdown Search (busca de serviço nativo) ── */
.search-dropdown input[type="text"] {
  background: var(--surface) !important;
  border: 1px solid var(--border2) !important;
  border-radius: var(--radius) !important;
  color: var(--text) !important;
  padding: 10px 14px 10px 38px !important;
  font-size: .9rem !important;
}
.search-dropdown input[type="text"]:focus {
  border-color: var(--purple-border) !important;
  box-shadow: 0 0 0 3px rgba(107,63,231,.12) !important;
}
.search-dropdown .fas.fa-search,
.search-dropdown button[type="button"] {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  background: none !important;
  border: none !important;
  pointer-events: none;
  font-size: .9rem;
}

/* Border solid / rounded (usados em description) */
.border-solid  { border: 1px solid var(--border2) !important; }
.border-rounded { border-radius: var(--radius) !important; }

/* ═══════════════════════════════════════════════════════
   SELECT PLUGIN — Dark theme override (SlimSelect / TomSelect / Custom)
   Cobre todos os plugins comuns usados no PerfectPanel
═══════════════════════════════════════════════════════ */

/* Bootstrap dropdown-menu (fallback geral) */
.dropdown-menu {
  background: #0D1535 !important;
  border: 1px solid rgba(255,255,255,0.11) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.5) !important;
  padding: 6px !important;
}
.dropdown-menu > li > a {
  color: #9B93C4 !important;
  border-radius: 8px !important;
  padding: 9px 12px !important;
  font-size: .88rem !important;
}
.dropdown-menu > li > a:hover,
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover {
  background: rgba(107,63,231,0.15) !important;
  color: #F0EEFF !important;
}

/* SlimSelect */
.ss-content, .ss-search, .ss-list {
  background: #0D1535 !important;
  border-color: rgba(255,255,255,0.11) !important;
}
.ss-content {
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.5) !important;
  border: 1px solid rgba(255,255,255,0.11) !important;
}
.ss-search input {
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.11) !important;
  border-radius: 8px !important;
  color: #F0EEFF !important;
  padding: 8px 12px !important;
}
.ss-option {
  color: #9B93C4 !important;
  padding: 9px 14px !important;
  border-radius: 8px !important;
}
.ss-option:hover, .ss-option.ss-highlighted {
  background: rgba(107,63,231,0.15) !important;
  color: #F0EEFF !important;
}
.ss-option.ss-selected {
  background: rgba(107,63,231,0.25) !important;
  color: #9B6DFF !important;
}
.ss-main {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.11) !important;
  border-radius: 10px !important;
  color: #F0EEFF !important;
}
.ss-main:focus, .ss-main.ss-open-above, .ss-main.ss-open-below {
  border-color: rgba(107,63,231,0.35) !important;
  box-shadow: 0 0 0 3px rgba(107,63,231,.12) !important;
}
.ss-arrow path { stroke: #9B93C4 !important; }

/* TomSelect */
.ts-wrapper .ts-control,
.ts-wrapper.single .ts-control {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.11) !important;
  border-radius: 10px !important;
  color: #F0EEFF !important;
  box-shadow: none !important;
  padding: 10px 14px !important;
}
.ts-wrapper.single.input-active .ts-control,
.ts-wrapper .ts-control:focus {
  border-color: rgba(107,63,231,0.35) !important;
  box-shadow: 0 0 0 3px rgba(107,63,231,.12) !important;
}
.ts-dropdown,
.ts-dropdown.single,
.ts-dropdown.multi {
  background: #0D1535 !important;
  border: 1px solid rgba(255,255,255,0.11) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.5) !important;
}
.ts-dropdown .ts-dropdown-content { padding: 6px !important; }
.ts-dropdown .option {
  color: #9B93C4 !important;
  padding: 9px 12px !important;
  border-radius: 8px !important;
}
.ts-dropdown .option:hover,
.ts-dropdown .option.active {
  background: rgba(107,63,231,0.15) !important;
  color: #F0EEFF !important;
}
.ts-dropdown .option.selected {
  background: rgba(107,63,231,0.25) !important;
  color: #9B6DFF !important;
}
.ts-wrapper .ts-control input {
  color: #F0EEFF !important;
}
.ts-wrapper .ts-control input::placeholder { color: #5C5480 !important; }

/* Choices.js */
.choices__inner {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.11) !important;
  border-radius: 10px !important;
  color: #F0EEFF !important;
  min-height: 44px !important;
}
.choices__list--dropdown,
.choices[data-type*="select-one"] .choices__list--dropdown {
  background: #0D1535 !important;
  border: 1px solid rgba(255,255,255,0.11) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.5) !important;
}
.choices__list--dropdown .choices__item {
  color: #9B93C4 !important;
  padding: 9px 14px !important;
}
.choices__list--dropdown .choices__item--selectable:hover,
.choices__list--dropdown .choices__item.is-highlighted {
  background: rgba(107,63,231,0.15) !important;
  color: #F0EEFF !important;
}
.choices__list--dropdown .choices__input {
  background: rgba(255,255,255,0.06) !important;
  border-bottom: 1px solid rgba(255,255,255,0.11) !important;
  color: #F0EEFF !important;
}

/* Generic — qualquer ul/div de dropdown gerado por plugin dentro do formulário */
#order-form .select-dropdown,
#order-form [class*="dropdown"]:not(.ly-dropdown),
#order-form [class*="select-list"],
#order-form [class*="select-menu"],
#order-form [class*="options"],
.search-dropdown-results,
[id*="new-order"] + div ul,
[id*="new-order"] ~ div ul {
  background: #0D1535 !important;
  border: 1px solid rgba(255,255,255,0.11) !important;
  border-radius: 12px !important;
  color: #9B93C4 !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.5) !important;
}

/* ── FIX LUPA / SEARCH ICON ── */
/* Garante padding correto no input de busca para a lupa não sobrepor */
#new-order-search .input-wrapper { position: relative !important; }
#new-order-search .input-wrapper input,
#new-order-search input#template-input,
#template-input {
  padding-left: 40px !important;
}
#new-order-search .input-wrapper button,
#new-order-search .input-wrapper > button {
  position: absolute !important;
  left: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: none !important;
  border: none !important;
  color: #5C5480 !important;
  pointer-events: none !important;
  z-index: 2 !important;
  padding: 0 !important;
  font-size: .9rem !important;
}

/* ── RTL ── */
body.rtl, .rtl-form, .rtl-alert, .rtl-content { direction: rtl; text-align: right; }

/* ═══════════════════════════════════════════════════════
   RESPONSIVO / MOBILE
═══════════════════════════════════════════════════════ */

@media (max-width: 992px) {
  /* Sidebar escondida por padrão em mobile */
  .ly-sidebar {
    transform: translateX(-100%);
  }
  .ly-sidebar.open {
    transform: translateX(0);
  }

  /* Overlay ao abrir sidebar */
  body.sidebar-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 999;
  }

  /* Topbar ocupa tudo */
  .ly-topbar {
    left: 0;
  }
  .ly-menu-toggle {
    display: flex;
  }

  /* Main sem margem de sidebar */
  .ly-main {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  /* Topnav público: links viram dropdown mobile */
  .ly-mobile-toggle { display: flex; }
  .ly-topnav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 10px;
    gap: 2px;
  }
  .ly-topnav-links.open { display: flex; }
  .ly-topnav-links li a { border-radius: 8px; padding: 11px 16px; }

  /* Lang dropdown no mobile */
  .ly-lang-dropdown { margin-left: 0; }

  /* Tabelas responsivas */
  .table-responsive { border: 1px solid var(--border); border-radius: var(--radius); }

  /* Wells e cards — menos padding */
  .well { padding: 20px 16px !important; }
}

/* ═══════════════════════════════════════════════════════
   UTILITÁRIOS GERAIS
═══════════════════════════════════════════════════════ */

.text-muted   { color: var(--text-muted) !important; }
.text-primary { color: var(--purple-light) !important; }
.text-success { color: var(--green) !important; }
.text-danger  { color: var(--red) !important; }
.text-warning { color: var(--gold) !important; }

.bg-primary { background: var(--purple) !important; }
.bg-success { background: var(--green-dim) !important; }
.bg-danger  { background: var(--red-dim) !important; }

a { color: var(--purple-light); transition: color var(--transition); }
a:hover { color: var(--text); text-decoration: none; }

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

code {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 6px;
  padding: 2px 7px;
  color: var(--purple-light);
  font-size: .85em;
}

pre {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--text-muted);
  font-size: .85rem;
  overflow-x: auto;
}

/* Animação suave de entrada para o main */
.ly-main > *,
.ly-public-main > * {
  animation: fadeIn .25s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════
   GLOBAL MOBILE FIX — sem scroll horizontal
════════════════════════════════════ */

/* Nunca deixa nada vazar da tela */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

/* Main content nunca ultrapassa a tela */
.ly-main,
.ly-public-main {
  overflow-x: hidden;
  max-width: 100%;
}

/* Todos os inputs/selects/textareas ficam dentro do container */
input, select, textarea, button {
  max-width: 100%;
}

@media (max-width: 768px) {
  /* Sidebar escondida — conteúdo ocupa tela toda */
  .ly-main {
    margin-left: 0 !important;
    padding-top: var(--topbar-h) !important;
    width: 100% !important;
  }

  /* Topbar ocupa tela toda */
  .ly-topbar {
    left: 0 !important;
    padding: 0 14px !important;
  }

  /* Sempre mostra o hamburguer */
  .ly-menu-toggle { display: flex !important; }

  /* Sidebar por cima no mobile */
  .ly-sidebar {
    transform: translateX(-100%);
    z-index: 1000;
    width: 260px !important;
  }
  .ly-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 40px rgba(0,0,0,.5);
  }

  /* Overlay ao abrir */
  body.sidebar-open::before {
    content: '';
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 999;
  }

  /* Bootstrap containers: sem padding extra */
  .container { padding-left: 12px !important; padding-right: 12px !important; }
  .well      { padding: 16px 13px !important; border-radius: 12px !important; }
  .row       { margin-left: -8px !important; margin-right: -8px !important; }
  [class*="col-"] { padding-left: 8px !important; padding-right: 8px !important; }

  /* Tabelas: scroll horizontal dentro do card */
  .table-responsive,
  .sv-card { overflow-x: auto !important; }

  /* Formulários sem overflow */
  .form-control { max-width: 100% !important; }

  /* Dropdowns do plugin de select */
  .ss-content,
  .ts-dropdown,
  .choices__list--dropdown,
  .dropdown-menu {
    max-width: calc(100vw - 24px) !important;
    min-width: 0 !important;
  }

  /* Título da página menor */
  .ly-page-title { font-size: .85rem !important; }
}

@media (max-width: 480px) {
  /* Balance badge menor */
  .ly-balance-badge,
  .ly-currency-btn {
    font-size: .75rem !important;
    padding: 4px 10px !important;
  }
  .ly-topbar-link { display: none !important; }
}
