*{box-sizing:border-box}
:root{
  --red:#f50012;
  --red2:#ff3040;
  --bg:#07070a;
  --panel:#141419;
  --panel2:#1a1a21;
  --panel3:#0d0d11;
  --line:rgba(255,255,255,.16);
  --line-soft:rgba(255,255,255,.10);
  --muted:#c0c0ca;
  --text:#fff;
}
html{scroll-behavior:auto}
body{
  margin:0;
  background:
    radial-gradient(circle at top left,rgba(245,0,18,.16),transparent 34%),
    linear-gradient(180deg,#060608,#0a0a0e 55%,#060608);
  color:var(--text);
  font-family:Arial,Helvetica,sans-serif;
}
body.menu-open{overflow:hidden}
a{color:inherit}

.login-body{min-height:100vh;display:grid;place-items:center;padding:20px}
.login-card{
  width:min(450px,94vw);
  background:rgba(18,18,23,.98);
  border:1px solid var(--line);
  border-radius:28px;
  padding:34px;
  box-shadow:0 30px 90px rgba(0,0,0,.68);
}
.login-logo{display:block;max-width:320px;width:88%;margin:0 auto 18px;background:#000;border-radius:12px}
.login-card h1{text-align:center;margin:0 0 8px}
.login-card p{text-align:center;color:var(--muted)}
.alert{background:#2a0909;border:1px solid #7c1515;color:#ffd3d3;padding:12px;border-radius:12px;margin:12px 0}
.success{background:#082a12;border:1px solid #137a2b;color:#c8ffd6;padding:12px;border-radius:12px;margin:12px 0}

.layout{
  display:grid;
  grid-template-columns:290px minmax(0,1fr);
  min-height:100vh;
}

.sidebar{
  background:#0c0c10;
  border-right:1px solid var(--line);
  padding:22px;
  position:sticky;
  top:0;
  height:100vh;
  overflow-y:auto;
  z-index:50;
}
.sidebar-logo{
  max-width:205px;
  width:100%;
  display:block;
  margin:0 auto 18px;
  background:#000;
  border:1px solid var(--line-soft);
  border-radius:12px;
}
.sidebar-title{
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:2px;
  font-weight:900;
  color:var(--red2);
  margin:0 0 18px;
  text-align:center;
}
.sidebar-menu a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  color:#fff;
  text-decoration:none;
  padding:14px;
  border-radius:14px;
  margin-bottom:9px;
  background:#17171c;
  border:1px solid rgba(255,255,255,.055);
  transition:.16s ease;
}
.sidebar-menu a:hover{
  background:#222229;
  border-color:var(--line);
}
.sidebar-menu a.active{
  background:linear-gradient(135deg,var(--red),#b9000d);
  border-color:rgba(255,255,255,.12);
  box-shadow:0 10px 24px rgba(245,0,18,.18);
}
.menu-toggle,.sidebar-close,.sidebar-backdrop{display:none}

.main{
  padding:30px;
  width:100%;
  min-width:0;
}
.page-header{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:center;
  margin-bottom:24px;
}
.page-header h1{
  margin:0;
  font-size:clamp(28px,4vw,44px);
  letter-spacing:-1px;
}
.page-header p,.muted,.hint{color:var(--muted);font-size:14px}

.btn{
  background:linear-gradient(135deg,var(--red),#b9000d);
  color:#fff;
  text-decoration:none;
  border:1px solid rgba(255,255,255,.10);
  border-radius:13px;
  padding:12px 17px;
  font-weight:900;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.btn:hover{filter:brightness(1.08)}
.btn.gray{background:#303038}
.btn.green{background:#168037}
.btn.small{padding:8px 11px;font-size:13px;border-radius:10px}

.panel{
  background:linear-gradient(180deg,#15151b,#101015);
  border:1px solid var(--line);
  border-radius:22px;
  padding:22px;
  margin-bottom:20px;
  box-shadow:0 18px 42px rgba(0,0,0,.24);
}
.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.stat,.card{
  background:linear-gradient(180deg,#1b1b22,#15151b);
  border:1px solid var(--line);
  border-radius:22px;
  padding:20px;
}
.stat p{margin:0 0 8px;color:#d1d1da}
.stat strong{font-size:40px;color:#fff}
.card h2,.card h3,.panel h2,.panel h3{color:#fff}

label{font-size:13px;color:#e0e0e6;font-weight:700}
input,select,textarea{
  width:100%;
  border-radius:13px;
  border:1px solid rgba(255,255,255,.20);
  background:#101015;
  color:#fff;
  padding:13px;
  margin-top:6px;
  margin-bottom:12px;
  font-size:15px;
  outline:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
}
input::placeholder,textarea::placeholder{color:#8f8f99}
input:focus,select:focus,textarea:focus{
  border-color:rgba(245,0,18,.88);
  background:#131319;
  box-shadow:0 0 0 3px rgba(245,0,18,.13);
}
textarea{min-height:96px;resize:vertical}
.full{grid-column:1/-1}

.table-list{width:100%;border-collapse:collapse}
.table-list th,.table-list td{
  padding:14px 12px;
  border-bottom:1px solid rgba(255,255,255,.11);
  text-align:left;
  vertical-align:middle;
}
.table-list th{color:#f2f2f5;background:rgba(255,255,255,.025)}
.table-list td{color:#dedee5}
.thumb{width:64px;height:64px;border-radius:14px;object-fit:cover;background:#000;border:1px solid var(--line)}
.actions{display:flex;gap:8px;flex-wrap:wrap}
.badge{display:inline-block;padding:5px 9px;border-radius:999px;background:#2b2b33;color:#f1f1f4;font-size:12px;font-weight:800}
.badge.ok{background:#123f20;color:#c8ffd6}
.badge.off{background:#4a2828;color:#ffd7d7}

.tabs{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.tabs a{
  color:#fff;
  text-decoration:none;
  padding:11px 15px;
  border-radius:999px;
  background:#1b1b22;
  border:1px solid var(--line);
}
.tabs a.active{background:var(--red)}

.gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.material-card{
  background:#17171d;
  border:1px solid var(--line);
  border-radius:20px;
  overflow:hidden;
}
.material-preview{height:205px;background:#070709;display:grid;place-items:center}
.material-preview img,.material-preview video{width:100%;height:100%;object-fit:cover}
.material-body{padding:16px}

.dns-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:12px;
  align-items:center;
  background:#111116;
  border:1px solid var(--line);
  border-radius:16px;
  padding:15px;
  margin-top:12px;
}
.dns-value{font-size:18px;font-weight:900;word-break:break-all;color:#fff}

.toast{
  position:fixed;
  left:50%;
  bottom:22px;
  transform:translateX(-50%) translateY(25px);
  background:#15151b;
  color:#fff;
  border:1px solid var(--red);
  border-radius:999px;
  padding:12px 18px;
  opacity:0;
  transition:.22s;
  pointer-events:none;
  z-index:100;
}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* Loja integrada */
.integrated-store{width:100%}
.store-toolbar{
  display:flex;
  gap:12px;
  align-items:center;
  margin-bottom:20px;
}
.store-search{
  width:100%;
  height:54px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.20);
  background:#111116;
  color:#fff;
  padding:0 18px;
  font-size:16px;
  margin:0;
}
.store-grid{
  width:100%;
  margin:0;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:20px;
}
.store-card{
  background:linear-gradient(180deg,#1a1a21,#141419);
  border:1px solid var(--line);
  border-radius:20px;
  padding:18px;
  min-width:0;
}
.store-top{
  display:grid;
  grid-template-columns:96px minmax(0,1fr);
  gap:16px;
  align-items:center;
}
.store-top img{
  width:96px;
  height:96px;
  border-radius:18px;
  object-fit:cover;
  background:#000;
  border:1px solid var(--line);
}
.store-top h2{margin:0 0 8px}
.code-box{
  border:1px solid rgba(255,255,255,.18);
  border-radius:12px;
  padding:12px;
  margin-top:12px;
  text-align:center;
  background:#0d0d11;
}
.code-box button{
  background:transparent;
  border:0;
  color:#fff;
  font-size:34px;
  font-weight:900;
  letter-spacing:7px;
  cursor:pointer;
  max-width:100%;
  overflow-wrap:anywhere;
}

/* Mobile drawer */
@media(max-width:1000px){
  .layout{display:block;min-height:100vh}
  .main{padding:78px 16px 20px}

  .menu-toggle{
    display:flex;
    position:fixed;
    top:14px;
    left:14px;
    z-index:80;
    width:48px;
    height:48px;
    border-radius:14px;
    border:1px solid var(--line);
    background:#15151b;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    gap:5px;
    cursor:pointer;
    box-shadow:0 12px 28px rgba(0,0,0,.35);
  }
  .menu-toggle span{
    display:block;
    width:23px;
    height:2px;
    background:#fff;
    border-radius:5px;
  }

  .sidebar{
    position:fixed;
    inset:0 auto 0 0;
    width:min(84vw,320px);
    height:100dvh;
    transform:translateX(-105%);
    transition:transform .24s ease;
    box-shadow:18px 0 50px rgba(0,0,0,.48);
    z-index:90;
  }
  body.menu-open .sidebar{transform:translateX(0)}

  .sidebar-close{
    display:grid;
    place-items:center;
    position:absolute;
    top:10px;
    right:10px;
    width:38px;
    height:38px;
    border-radius:12px;
    border:1px solid var(--line);
    background:#202027;
    color:#fff;
    font-size:26px;
    cursor:pointer;
  }
  .sidebar-backdrop{
    display:block;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.68);
    opacity:0;
    visibility:hidden;
    transition:.2s ease;
    z-index:85;
  }
  body.menu-open .sidebar-backdrop{opacity:1;visibility:visible}

  .grid,.grid2,.grid3,.gallery,.store-grid{grid-template-columns:1fr}
  .page-header{flex-direction:column;align-items:flex-start}
  .store-toolbar{display:block}
  .store-top{grid-template-columns:82px minmax(0,1fr)}
  .store-top img{width:82px;height:82px}
  .table-list{display:block;overflow-x:auto;white-space:nowrap}
  .actions{flex-direction:row}
}

@media(min-width:1001px){
  .sidebar{display:block!important}
}


/* DIGIPLAY V3.4 - Menu mobile lateral responsivo */

*{box-sizing:border-box}
html{scroll-behavior:auto}
body{overflow-x:hidden}
body.sidebar-open{overflow:hidden}

.layout{
  display:grid;
  grid-template-columns:290px minmax(0,1fr);
  min-height:100vh;
}

.sidebar{
  position:sticky;
  top:0;
  height:100vh;
  overflow-y:auto;
  background:#0c0c10;
  border-right:1px solid rgba(255,255,255,.14);
  padding:22px;
  z-index:80;
}

.sidebar-logo{
  display:block;
  width:100%;
  max-width:205px;
  margin:0 auto 18px;
  border-radius:12px;
  background:#000;
}

.sidebar-title{
  text-align:center;
  color:#ff3040;
  font-weight:900;
  letter-spacing:2px;
  text-transform:uppercase;
  margin-bottom:18px;
}

.sidebar-menu a{
  display:flex;
  align-items:center;
  min-height:48px;
  padding:13px 14px;
  margin-bottom:9px;
  border-radius:14px;
  text-decoration:none;
  color:#fff;
  background:#17171c;
  border:1px solid rgba(255,255,255,.055);
}

.sidebar-menu a:hover{background:#222229}
.sidebar-menu a.active{
  background:linear-gradient(135deg,#f50012,#b9000d);
  border-color:rgba(255,255,255,.12);
}

.main{
  width:100%;
  min-width:0;
  padding:30px;
}

.mobile-menu-button,
.sidebar-close-button,
.sidebar-overlay{
  display:none;
}

/* Melhorias gerais de responsividade */
.page-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.page-header-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.panel,
.card,
.stat,
.store-card{
  min-width:0;
}

input,
select,
textarea,
button,
.btn{
  max-width:100%;
}

.table-list{
  width:100%;
}

@media(max-width:1000px){
  .layout{
    display:block;
    min-height:100vh;
  }

  .main{
    width:100%;
    padding:88px 14px 22px;
  }

  /* Botão circular semelhante ao exemplo */
  .mobile-menu-button{
    display:flex;
    position:fixed;
    top:18px;
    left:18px;
    z-index:120;
    width:58px;
    height:58px;
    padding:0;
    border:0;
    border-radius:50%;
    background:#bfc0c4;
    box-shadow:0 8px 24px rgba(0,0,0,.28);
    align-items:center;
    justify-content:center;
    flex-direction:column;
    gap:5px;
    cursor:pointer;
  }

  .mobile-menu-button span{
    width:27px;
    height:3px;
    background:#fff;
    border-radius:10px;
  }

  .mobile-menu-button:active{
    transform:scale(.96);
  }

  /* Menu deslizando pela esquerda */
  .sidebar{
    position:fixed;
    top:0;
    left:0;
    bottom:0;
    width:min(84vw,330px);
    height:100dvh;
    padding:24px 20px 30px;
    transform:translateX(-105%);
    transition:transform .26s ease;
    box-shadow:18px 0 50px rgba(0,0,0,.48);
    z-index:140;
  }

  body.sidebar-open .sidebar{
    transform:translateX(0);
  }

  /* Botão X no canto direito do menu */
  .sidebar-close-button{
    display:grid;
    place-items:center;
    position:absolute;
    top:0;
    right:0;
    width:58px;
    height:58px;
    border:0;
    border-radius:0 0 0 12px;
    background:#43c7b7;
    color:#fff;
    font-size:36px;
    font-weight:700;
    line-height:1;
    cursor:pointer;
  }

  .sidebar-logo{
    margin-top:18px;
    max-width:200px;
  }

  .sidebar-overlay{
    display:block;
    position:fixed;
    inset:0;
    z-index:130;
    background:rgba(0,0,0,.58);
    opacity:0;
    visibility:hidden;
    transition:opacity .22s ease, visibility .22s ease;
  }

  body.sidebar-open .sidebar-overlay{
    opacity:1;
    visibility:visible;
  }

  .grid,
  .grid2,
  .grid3,
  .gallery,
  .store-grid{
    grid-template-columns:1fr !important;
  }

  .page-header{
    align-items:flex-start;
    flex-direction:column;
  }

  .page-header h1{
    max-width:100%;
    overflow-wrap:anywhere;
    font-size:clamp(27px,9vw,38px);
  }

  .page-header-actions,
  .page-header-actions .btn{
    width:100%;
  }

  .page-header-actions .btn{
    justify-content:center;
  }

  .panel{
    padding:18px;
    border-radius:18px;
  }

  .store-top{
    grid-template-columns:78px minmax(0,1fr) !important;
  }

  .store-top img{
    width:78px !important;
    height:78px !important;
  }

  .table-list{
    display:block;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }

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

@media(max-width:420px){
  .mobile-menu-button{
    width:54px;
    height:54px;
    top:14px;
    left:14px;
  }

  .main{
    padding:80px 12px 20px;
  }

  .sidebar{
    width:88vw;
  }

  .sidebar-menu a{
    min-height:46px;
    font-size:15px;
  }
}

@media(min-width:1001px){
  .sidebar{
    transform:none !important;
  }
}



/* V3.5 FIX: força funcionamento visual do menu mobile */
@media(max-width:1000px){
  .mobile-menu-button{
    display:flex !important;
    visibility:visible !important;
    opacity:1 !important;
    pointer-events:auto !important;
  }

  .sidebar{
    display:block !important;
    position:fixed !important;
    top:0 !important;
    left:0 !important;
    bottom:0 !important;
    width:min(86vw,330px) !important;
    height:100dvh !important;
    transform:translate3d(-105%,0,0) !important;
    transition:transform .28s ease !important;
    z-index:10002 !important;
    overflow-y:auto !important;
  }

  body.sidebar-open .sidebar{
    transform:translate3d(0,0,0) !important;
  }

  .sidebar-overlay{
    display:block !important;
    position:fixed !important;
    inset:0 !important;
    z-index:10001 !important;
    background:rgba(0,0,0,.64) !important;
    opacity:0 !important;
    visibility:hidden !important;
    pointer-events:none !important;
    transition:opacity .22s ease,visibility .22s ease !important;
  }

  body.sidebar-open .sidebar-overlay{
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
  }

  .sidebar-close-button{
    display:grid !important;
    place-items:center !important;
    position:absolute !important;
    top:0 !important;
    right:0 !important;
    left:auto !important;
    width:58px !important;
    height:58px !important;
    z-index:3 !important;
  }
}

@media(min-width:1001px){
  .mobile-menu-button,
  .sidebar-overlay,
  .sidebar-close-button{
    display:none !important;
  }

  .sidebar{
    transform:none !important;
  }
}
