:root {
  --premium-bg: #07080f;
  --premium-bg-2: #111321;
  --premium-panel: rgba(18, 20, 34, .78);
  --premium-card: rgba(255,255,255,.065);
  --premium-card-strong: rgba(255,255,255,.10);
  --premium-border: rgba(255,255,255,.13);
  --premium-border-gold: rgba(245,197,66,.32);
  --premium-gold: #f5c542;
  --premium-gold-2: #ffb700;
  --premium-orange: #ff8a00;
  --premium-text: #fff;
  --premium-muted: #aab0c3;
  --premium-danger: #ff4d5e;
  --premium-success: #2ee59d;
  --premium-radius-lg: 26px;
  --premium-radius-md: 18px;
  --premium-shadow: 0 24px 70px rgba(0,0,0,.45);
  --premium-sidebar: 17.5rem;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  color: var(--premium-text) !important;
  background:
    radial-gradient(circle at top left, rgba(245,197,66,.12), transparent 34rem),
    radial-gradient(circle at 78% 10%, rgba(118,72,255,.16), transparent 32rem),
    linear-gradient(135deg, #07080f 0%, #111321 55%, #07080f 100%) !important;
  background-attachment: fixed !important;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .01em;
}
body:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.85), transparent 75%);
  z-index: 0;
}
a { color: var(--premium-gold); transition: color .2s ease, opacity .2s ease, transform .2s ease; }
a:hover { color: #ffe08a; text-decoration: none; }

/* LOGIN */
.premium-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  background-image:
    linear-gradient(135deg, rgba(7,8,15,.90), rgba(7,8,15,.70)),
    url("../img/LoginBG.png") !important;
  background-size: cover !important;
  background-position: center !important;
}
.premium-login-shell {
  width: min(1120px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 32px;
  align-items: center;
  position: relative;
  z-index: 1;
  padding: 36px 0;
}
.premium-login-hero {
  padding: 32px;
}
.premium-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #1a1200;
  background: linear-gradient(135deg, var(--premium-gold), var(--premium-orange));
  border-radius: 999px;
  padding: 9px 15px;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  box-shadow: 0 14px 40px rgba(245,197,66,.22);
}
.premium-login-title {
  margin-top: 24px;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: .98;
  font-weight: 900;
  letter-spacing: -.055em;
}
.premium-login-title span {
  display: block;
  color: var(--premium-gold);
  text-shadow: 0 10px 40px rgba(245,197,66,.25);
}
.premium-login-copy {
  max-width: 580px;
  margin-top: 20px;
  color: var(--premium-muted);
  font-size: 1.03rem;
  line-height: 1.7;
}
.premium-login-card {
  width: 100%;
  padding: 34px;
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.045));
  border: 1px solid var(--premium-border);
  box-shadow: var(--premium-shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  position: relative;
  overflow: hidden;
  animation: premiumFadeUp .65s ease both;
}
.premium-login-card:before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--premium-gold), transparent);
}
.premium-login-logo {
  display: block;
  width: min(230px, 76%);
  margin: 0 auto 22px;
  filter: drop-shadow(0 18px 38px rgba(0,0,0,.55));
}
.premium-login-card h1 {
  margin: 0;
  text-align: center;
  font-size: 1.42rem;
  font-weight: 800;
}
.premium-login-card p {
  text-align: center;
  color: var(--premium-muted);
  margin: 8px 0 24px;
}
.premium-input-wrap { position: relative; margin-bottom: 16px; }
.premium-input-wrap i {
  position: absolute;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
  color: rgba(245,197,66,.86);
  z-index: 2;
}
.premium-input,
.form-control {
  min-height: 48px;
  background: rgba(255,255,255,.075) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.13) !important;
  border-radius: 15px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  transition: border .2s ease, box-shadow .2s ease, background .2s ease;
}
.premium-input { padding-left: 48px !important; }
.form-control:focus {
  background: rgba(255,255,255,.10) !important;
  border-color: rgba(245,197,66,.70) !important;
  box-shadow: 0 0 0 4px rgba(245,197,66,.13) !important;
}
.form-control::placeholder { color: rgba(255,255,255,.48); }
.premium-login-footer {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  color: rgba(255,255,255,.56);
  font-size: .86rem;
}

/* PANEL */
#wrapper { position: relative; z-index: auto; min-height: 100vh; overflow-x: hidden; }
#sidebar-wrapper {
  min-height: 100vh;
  width: var(--premium-sidebar);
  margin-left: 0;
  background: linear-gradient(180deg, rgba(14,16,28,.95), rgba(9,10,18,.92)) !important;
  border-right: 1px solid var(--premium-border);
  box-shadow: 22px 0 50px rgba(0,0,0,.28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: margin .25s ease;
}
#wrapper.toggled #sidebar-wrapper { margin-left: calc(var(--premium-sidebar) * -1); }
#page-content-wrapper { width: 100%; min-width: 0; }
.sidebar-heading {
  min-height: 92px;
  display: flex;
  align-items: center;
  padding: 22px 20px !important;
  color: #fff !important;
  font-weight: 900;
  letter-spacing: -.03em;
  font-size: 1.22rem;
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.sidebar-heading:before {
  content: "";
  width: 38px;
  height: 38px;
  margin-right: 12px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--premium-gold), var(--premium-orange));
  box-shadow: 0 12px 34px rgba(245,197,66,.24);
}
.list-group { padding: 14px 12px 20px; }
.list-group-item {
  margin-bottom: 8px;
  color: rgba(255,255,255,.74) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 16px !important;
  font-weight: 650;
  padding: 13px 14px !important;
}
.list-group-item i { width: 22px; color: rgba(245,197,66,.88); }
.list-group-item:hover,
.list-group-item.active {
  color: #fff !important;
  background: rgba(255,255,255,.08) !important;
  border-color: rgba(245,197,66,.20) !important;
  transform: translateX(3px);
}
.premium-sidebar-footer {
  margin: 8px 12px 18px;
  padding: 13px;
  border-radius: 18px;
  color: var(--premium-muted);
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.09);
  font-size: .8rem;
}
.navbar {
  min-height: 76px;
  background: rgba(7,8,15,.58) !important;
  border-bottom: 1px solid var(--premium-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 14px 22px !important;
  position: sticky;
  top: 0;
  z-index: 40;
}
.premium-page-title { margin-left: 14px; }
.premium-page-title strong { display: block; color: #fff; font-size: 1rem; }
.premium-page-title span { display: block; color: var(--premium-muted); font-size: .78rem; }
.container-fluid { padding: 24px !important; }

.card,
.ctcard,
.modal-content,
.premium-card {
  background: linear-gradient(145deg, rgba(255,255,255,.105), rgba(255,255,255,.04)) !important;
  color: #fff !important;
  border: 1px solid var(--premium-border) !important;
  border-radius: var(--premium-radius-lg) !important;
  box-shadow: var(--premium-shadow) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
}
.card-header,
.modal-header {
  background: rgba(255,255,255,.055) !important;
  border-bottom: 1px solid rgba(255,255,255,.10) !important;
  color: #fff !important;
}
.card-header h1, .card-header h2, .card-header h3, .card-header h4, .card-header h5, .card-header h6,
h1,h2,h3,h4,h5,h6 { color: #fff; font-weight: 850; letter-spacing: -.025em; }
.card-body { color: rgba(255,255,255,.82); }

.table { color: rgba(255,255,255,.82) !important; margin-bottom: 0; }
.table thead th {
  color: #fff !important;
  background: rgba(255,255,255,.07);
  border-bottom: 1px solid rgba(255,255,255,.12) !important;
  border-top: 0 !important;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.table td, .table th { border-color: rgba(255,255,255,.08) !important; vertical-align: middle !important; }
.table-striped tbody tr:nth-of-type(odd) { background-color: rgba(255,255,255,.035) !important; }
.table-hover tbody tr:hover, .table tbody tr:hover { background: rgba(245,197,66,.08) !important; }
.table-responsive { border-radius: 20px; border: 1px solid rgba(255,255,255,.08); }

.btn {
  border-radius: 14px !important;
  font-weight: 800 !important;
  letter-spacing: .01em;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary,
.btn-info,
.btn-warning,
.btn-premium {
  background: linear-gradient(135deg, var(--premium-gold), var(--premium-orange)) !important;
  border: none !important;
  color: #15110a !important;
  box-shadow: 0 14px 34px rgba(245,197,66,.22) !important;
}
.btn-danger {
  background: linear-gradient(135deg, #ff4d5e, #b60022) !important;
  border: 0 !important;
  box-shadow: 0 14px 34px rgba(255,77,94,.22) !important;
}
.btn-default,
.btn-secondary {
  background: rgba(255,255,255,.10) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  color: #fff !important;
}
.alert { border: 0 !important; border-radius: 18px !important; color: #fff !important; }
.alert-info { background: rgba(46, 154, 255, .20) !important; }
.alert-success { background: rgba(46, 229, 157, .18) !important; }
.alert-danger { background: rgba(255, 77, 94, .18) !important; }
.alert-warning { background: rgba(245,197,66,.18) !important; color: #fff !important; }
label { color: rgba(255,255,255,.82); font-weight: 700; }
hr { border-top-color: rgba(255,255,255,.10); }

.premium-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.premium-stat {
  min-height: 142px;
  padding: 22px;
  border-radius: 26px;
  border: 1px solid var(--premium-border);
  background: linear-gradient(145deg, rgba(255,255,255,.105), rgba(255,255,255,.04));
  box-shadow: 0 24px 60px rgba(0,0,0,.30);
  position: relative;
  overflow: hidden;
}
.premium-stat:after {
  content: "";
  position: absolute;
  width: 92px;
  height: 92px;
  right: -28px;
  top: -28px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,197,66,.35), transparent 70%);
}
.premium-stat span { display: block; color: var(--premium-muted); font-size: .82rem; font-weight: 750; text-transform: uppercase; letter-spacing: .09em; }
.premium-stat strong { display: block; margin-top: 12px; font-size: clamp(1.8rem, 3vw, 2.8rem); color: #fff; line-height: 1; }
.premium-stat small { display: block; margin-top: 12px; color: rgba(255,255,255,.58); }
.premium-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
}
.premium-action {
  display: block;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.10);
  color: #fff !important;
}
.premium-action:hover { transform: translateY(-4px); background: rgba(245,197,66,.09); border-color: rgba(245,197,66,.22); }
.premium-action i { color: var(--premium-gold); margin-right: 8px; }

@keyframes premiumFadeUp {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.card, .premium-card, .premium-stat { animation: premiumFadeUp .45s ease both; }

@media (min-width: 1600px) {
  .container-fluid { max-width: 1640px; margin: 0 auto; }
}
@media (max-width: 1199px) {
  .premium-stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .premium-action-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 991px) {
  #sidebar-wrapper { margin-left: calc(var(--premium-sidebar) * -1); position: fixed; z-index: 60; }
  #wrapper.toggled #sidebar-wrapper { margin-left: 0; }
  #wrapper.toggled:after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.48); z-index: 50; }
  #page-content-wrapper { width: 100vw; }
  .premium-login-shell { grid-template-columns: 1fr; }
  .premium-login-hero { text-align: center; padding: 12px; }
  .premium-login-copy { margin-left: auto; margin-right: auto; }
}
@media (max-width: 575px) {
  .container-fluid { padding: 16px !important; }
  .navbar { padding: 12px 14px !important; }
  .premium-page-title span { display: none; }
  .premium-stats-grid, .premium-action-grid { grid-template-columns: 1fr; }
  .premium-login-card { padding: 24px; border-radius: 24px; }
  .premium-login-title { font-size: 2.2rem; }
  main.col-15, main.px-5 { padding-left: 0 !important; padding-right: 0 !important; }
}


/* Correção do modal de exclusão: evita que o backdrop fique acima da janela e trave a tela */
.modal {
  z-index: 2060 !important;
}
.modal-backdrop {
  z-index: 2050 !important;
}
.modal-open #wrapper:after {
  display: none !important;
}
.modal-footer .btn-ok {
  cursor: pointer;
}
