/* SMMGEEK Terminal Theme */

:root{
  --bg-main:#050B07;
  --bg-panel:#07120C;
  --bg-elev:#0B1B12;

  --accent:#20FF7A;
  --accent-dim:#10C85C;

  --text-main:#D9FFE9;
  --text-muted:#7BE6AA;
  --text-dim:#2E6A49;

  --border:rgba(32,255,122,.18);
  --border-strong:rgba(32,255,122,.35);
}

/* ✅ Global sizing + kill horizontal overflow (mobile) */
*,
*::before,
*::after{ box-sizing:border-box; }

html,body{
  height:100%;
  width:100%;
  overflow-x:hidden; /* important: fixes random 1-5px overflow on mobile */
}

body{
  min-height:100vh;
  display:flex;
  flex-direction:column;

  background:var(--bg-main)!important;
  color:var(--text-main)!important;
  font-family:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace!important;
  position:relative;
}

main.page-content{flex:1 0 auto; display:block;}
.terminal-footer{flex-shrink:0;}

/* Atmosphere (side pattern) */
body::before,
body::after{
  content:"";
  position:fixed;
  top:0; bottom:0;
  width:22vw;
  max-width:360px;
  pointer-events:none;
  opacity:.38;
  z-index:0;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(32,255,122,.08),
      rgba(32,255,122,.08) 1px,
      transparent 1px,
      transparent 7px
    ),
    radial-gradient(circle at 30% 20%, rgba(32,255,122,.10), transparent 45%),
    radial-gradient(circle at 70% 80%, rgba(32,255,122,.08), transparent 50%);
}
body::before{left:0;}
body::after{right:0; transform:scaleX(-1);}

.container,.navbar,.well,.panel,.card,footer{
  position:relative;
  z-index:1;
}

/* Navbar */
.navbar,
.navbar-default{
  background:var(--bg-panel)!important;
  border-bottom:1px solid var(--border);
  margin-bottom:0!important;

  /* ✅ prevent navbar internal overflow from creating horizontal scroll */
  overflow-x:hidden;
}

.navbar .active>a,
.navbar .active>a:focus,
.navbar .active>a:hover,
.navbar-nav>.active>a{
  background:rgba(32,255,122,.10)!important;
  border-bottom:1px solid rgba(32,255,122,.45)!important;
  color:rgba(217,255,233,.95)!important;
}

/* ✅ Make navbar paddings nicer on mobile */
.navbar .container,
.navbar .container-fluid{
  padding-left:12px;
  padding-right:12px;
}

/* Brand (SVG) alignment */
.navbar .navbar-brand{
  display:flex!important;
  align-items:center!important;
  height:50px;
  padding:0!important;
  line-height:1!important;

  /* ✅ allow shrinking so logo doesn't push navbar wider than viewport */
  min-width:0;
  max-width:100%;
}

.navbar .navbar-brand img,
.navbar .navbar-brand svg{
  display:block;
  height:26px;
  width:auto;
  max-width:100%;
}

.smmgeek-logo{
  display:inline-block;
  vertical-align:middle;
  max-width:210px;
}

/* ✅ Mobile navbar: reliable burger click + centered logo */
@media (max-width: 768px){

  /* keep navbar header as positioning context */
  .navbar-header{
    position:relative;
    width:100%;
    min-height:50px;
  }

  /* Brand centered, cannot overlap burger click */
  .navbar .navbar-brand{
    float:none !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    height:50px !important;
    width:100% !important;
    padding:0 !important;
    margin:0 auto !important;
    max-width:100% !important;
    position:relative;
    z-index:1;
    pointer-events:auto;
  }

  /* shrink logo a bit */
  .smmgeek-logo{
    max-width:170px;
    width:100%;
    height:auto;
  }

  /* Burger: absolute + top layer => always tappable */
  .navbar-toggle{
    position:absolute !important;
    left:12px !important;
    top:8px !important;
    z-index:10 !important;

    float:none !important;
    margin:0 !important;

    padding:12px 12px !important;
    border-radius:10px !important;
    border:1px solid rgba(32,255,122,.35) !important;
    background:rgba(32,255,122,.08) !important;

    cursor:pointer;
    pointer-events:auto;
  }

  .navbar-toggle:hover,
  .navbar-toggle:focus{
    background:rgba(32,255,122,.12) !important;
    box-shadow:0 0 18px rgba(32,255,122,.22);
    outline:none !important;
  }

  .navbar-toggle .icon-bar{
    width:26px !important;
    height:2px !important;
  }
  .navbar-toggle .icon-bar + .icon-bar{
    margin-top:5px !important;
  }
}

/* Panels / wells */
.panel,.card,.well{
  background:rgba(7,18,12,.65)!important;
  border:1px solid var(--border)!important;
  border-radius:14px!important;
  box-shadow:0 10px 30px rgba(0,0,0,.45);
}

/* Buttons */
.btn-primary,
.terminal-btn{
  background:rgba(32,255,122,.12)!important;
  border:1px solid rgba(32,255,122,.45)!important;
  color:rgba(217,255,233,.95)!important;
  border-radius:10px!important;
}
.btn-primary:hover,
.terminal-btn:hover{
  background:rgba(32,255,122,.18)!important;
  box-shadow:0 0 22px rgba(32,255,122,.35);
}

/* Links */
a{
  color:rgba(32,255,122,.9)!important;
  text-decoration-color:rgba(32,255,122,.25);
}
a:hover{
  color:var(--accent)!important;
  text-shadow:0 0 10px rgba(32,255,122,.15);
}

/* Form controls */
input[type="text"],
input[type="email"],
input[type="password"],
.form-control,
select.form-control{
  background:#050B07!important;
  color:var(--accent)!important;
  border:1px solid rgba(32,255,122,.38)!important;
  border-radius:10px!important;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.65);
  font-family:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace!important;
}
input::placeholder,
.form-control::placeholder{
  color:rgba(123,230,170,.55)!important;
}
input:focus,
.form-control:focus,
select.form-control:focus{
  outline:none!important;
  border-color:rgba(32,255,122,.80)!important;
  box-shadow:0 0 0 3px rgba(32,255,122,.12), 0 0 18px rgba(32,255,122,.22)!important;
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus{
  -webkit-text-fill-color:var(--accent)!important;
  box-shadow:0 0 0px 1000px #050B07 inset!important;
  transition:background-color 9999s ease-in-out 0s;
}

/* Password reset link */
.form-group__password{position:relative;}
.forgot-password{
  position:absolute;
  right:14px;
  top:38px;
  color:rgba(32,255,122,.9)!important;
  text-decoration:underline;
  text-decoration-color:rgba(32,255,122,.35);
  text-underline-offset:3px;
  font-size:14px;
}
.forgot-password:hover{
  color:var(--accent)!important;
  text-shadow:0 0 10px rgba(32,255,122,.25);
  text-decoration-color:rgba(32,255,122,.85);
}

/* Dropdowns / filters / search buttons */
.input-group-btn .btn,
.input-group-addon,
.btn-default{
  background:rgba(7,18,12,.65)!important;
  border:1px solid rgba(32,255,122,.28)!important;
  color:rgba(217,255,233,.9)!important;
  border-radius:10px;
}
.input-group-btn .btn:hover,
.btn-default:hover{
  background:rgba(32,255,122,.10)!important;
  box-shadow:0 0 14px rgba(32,255,122,.20);
}
select,
.dropdown-menu,
.dropdown-toggle{
  background:rgba(7,18,12,.85)!important;
  color:rgba(217,255,233,.9)!important;
  border-color:rgba(32,255,122,.28)!important;
}
.dropdown-menu>li>a{color:rgba(217,255,233,.85)!important;}
.dropdown-menu>li>a:hover,
.dropdown-menu>li.active>a{
  background:rgba(32,255,122,.12)!important;
  color:rgba(217,255,233,.95)!important;
}

/* Login layout */
.login-shell{
  max-width:980px;
  margin:70px auto 0;
  padding:0 12px;
  display:grid;
  grid-template-columns:1fr;
  gap:18px;

  /* ✅ extra safety for mobile overflow */
  max-width:100%;
}

.login-hero{
  border:1px solid rgba(32,255,122,.18);
  border-radius:14px;
  background:linear-gradient(180deg, rgba(32,255,122,.06), transparent 55%), rgba(7,18,12,.55);
  padding:20px;
}
.hero-title{
  font-size:30px;
  letter-spacing:.4px;
  color:rgba(217,255,233,.95);
  text-shadow:0 0 18px rgba(32,255,122,.12);
}
.hero-sub{
  margin-top:10px;
  color:rgba(123,230,170,.85);
  line-height:1.5;
}
.hero-grid{
  margin-top:14px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
.hero-art{
  border:1px solid rgba(32,255,122,.18);
  border-radius:12px;
  background:rgba(5,11,7,.55);
  min-height:140px;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  overflow:hidden;
}
.hero-art::before{
  content:"";
  position:absolute;
  inset:0;
  background:repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,.03),
    rgba(255,255,255,.03) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity:.28;
  pointer-events:none;
}
.hero-art__inner{
  position:relative;
  z-index:1;
  color:rgba(217,255,233,.9);
  width:100%;
  padding:14px 16px;
}
.hero-art__line{margin:6px 0;}
.ok{color:var(--accent); text-shadow:0 0 12px rgba(32,255,122,.18);}
.hero-box{
  border:1px solid rgba(32,255,122,.18);
  border-radius:12px;
  background:rgba(5,11,7,.35);
  padding:14px 16px;
  color:rgba(217,255,233,.88);
  line-height:1.6;
}
.hero-ascii{
  margin-top:14px;
  padding:12px 14px;
  border-left:3px solid rgba(32,255,122,.35);
  background:rgba(5,11,7,.28);
  border-radius:10px;
  color:rgba(217,255,233,.82);
}

/* Console divider */
.console-divider{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 14px;
  border:1px solid rgba(32,255,122,.18);
  border-radius:12px;
  background:rgba(5,11,7,.28);

  /* ✅ prevent divider text from forcing overflow */
  min-width:0;
}
.console-divider::before,
.console-divider::after{
  content:"";
  flex:1;
  height:1px;
  background:linear-gradient(90deg, transparent, rgba(32,255,122,.35), transparent);
}
.console-divider__label{
  padding:2px 8px;
  border:1px solid rgba(32,255,122,.25);
  border-radius:999px;
  color:rgba(217,255,233,.85);
  background:rgba(32,255,122,.06);
  font-size:12px;
  letter-spacing:.6px;
  flex:0 0 auto;
}
.console-divider__text{
  color:rgba(123,230,170,.75);
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:55%;
  min-width:0;
}

/* Footer */
.terminal-footer{
  margin-top:18px!important;
  padding:18px 0;
  border-top:1px solid rgba(32,255,122,.18);
  background:rgba(7,18,12,.55);
}
.terminal-footer__inner{
  display:flex;
  gap:14px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  color:rgba(217,255,233,.78);
  font-size:13px;
}
.terminal-footer__right a{
  color:rgba(32,255,122,.9)!important;
  text-decoration:underline;
  text-decoration-color:rgba(32,255,122,.25);
  text-underline-offset:3px;
}
.tg-ico{
  display:inline-block;
  width:10px;
  height:10px;
  margin-right:6px;
  border-radius:2px;
  border:1px solid rgba(32,255,122,.45);
  box-shadow:0 0 10px rgba(32,255,122,.12);
  transform:translateY(1px);
}

/* Guest-only compaction */
.is-guest .login-shell{margin:16px auto 0!important; gap:14px!important;}
.is-guest .login-hero{padding:16px!important;}
.is-guest .hero-sub{margin-top:8px!important;}
.is-guest .hero-grid{margin-top:10px!important; gap:12px!important;}
.is-guest .hero-ascii{margin-top:10px!important; padding:10px 12px!important;}
.is-guest .terminal-well{padding:14px!important;}
.is-guest .form-group{margin-bottom:12px!important;}

/* Responsive tweaks */
@media (max-width:900px){
  .hero-grid{grid-template-columns:1fr;}
}
@media (max-width:700px){
  .console-divider__text{max-width:100%;}
}

/* ✅ Extra-small phones: remove nowrap that can create overflow + tighten layout */
@media (max-width:480px){
  .login-shell{ margin:56px auto 0; }
  .hero-title{ font-size:24px; }
  .console-divider{
    flex-wrap:wrap;
  }
  .console-divider__text{
    white-space:normal;
    overflow:visible;
    text-overflow:unset;
    max-width:100%;
  }
  .forgot-password{
    right:10px;
    top:36px;
    font-size:13px;
  }
}

/* Optional hero tg link */
.hero-tg-link{
  color:rgba(32,255,122,.95)!important;
  text-decoration:underline;
  text-decoration-color:rgba(32,255,122,.25);
  text-underline-offset:3px;
}
.hero-tg-link:hover{
  color:var(--accent)!important;
  text-shadow:0 0 12px rgba(32,255,122,.20);
  text-decoration-color:rgba(32,255,122,.75);
}

/* === FORCE DARK SERVICE DESCRIPTION (panel-level override) === */

/* textarea (even readonly / inline styled) */
textarea.form-control,
textarea[readonly],
textarea[disabled] {
  background: #050B07 !important;
  background-color: #050B07 !important;
  color: #20FF7A !important;
}

/* div-based descriptions (very common in SMM panels) */
.form-control[readonly],
.form-control[disabled],
.form-control[contenteditable],
.form-control:not(input):not(select) {
  background: #050B07 !important;
  background-color: #050B07 !important;
  color: #20FF7A !important;
}

/* ultra-specific: description blocks by id / name */
#description,
#service_description,
#service-desc,
#neworder_description,
#new-order-description {
  background: #050B07 !important;
  background-color: #050B07 !important;
  color: #20FF7A !important;
}

/* kill panel white shadow / glow */
.form-control,
textarea {
  box-shadow: inset 0 0 0 1px rgba(32,255,122,.45) !important;
  border: 1px solid rgba(32,255,122,.45) !important;
}

/* Chrome autofill / readonly hack */
textarea:-webkit-autofill,
.form-control:-webkit-autofill {
  -webkit-text-fill-color: #20FF7A !important;
  box-shadow: 0 0 0px 1000px #050B07 inset !important;
}

/* Terminal success alert */
.alert,
.alert-success {
  background: rgba(32,255,122,.10) !important;
  color: #D9FFE9 !important;
  border: 1px solid rgba(32,255,122,.45) !important;
  border-radius: 14px !important;
  box-shadow: 0 0 22px rgba(32,255,122,.18) !important;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace !important;
}

/* Close button inside alert */
.alert .close {
  color: #20FF7A !important;
  opacity: .65 !important;
}
.alert .close:hover {
  opacity: 1 !important;
}