/* ===== BLACK / GREEN GLASS UI (old wrap) ===== */
:root{
  --primary:#00ff88;
  --primary-dark:#00cc6a;
  --primary-light:#66ffb3;

  --bg:#050705;
  --bg2:#070c08;

  --card: rgba(20, 28, 22, .58);
  --card2: rgba(16, 22, 18, .52);
  --text:#ffffff;
  --text2: rgba(208,255,228,.92);
  --muted: rgba(176,255,208,.60);

  --border: rgba(0,255,136,.18);
  --border2: rgba(0,255,136,.32);

  --shadow: 0 16px 55px rgba(0,0,0,.55);
  --glow: 0 0 44px rgba(0,255,136,.14);

  --r: 18px;
  --r2: 22px;

  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, -apple-system, system-ui, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 20% 0%, rgba(0,255,136,.10), transparent 55%),
    radial-gradient(900px 700px at 90% 20%, rgba(0,255,136,.07), transparent 55%),
    linear-gradient(135deg, #040604 0%, #070c08 45%, #030503 100%);
  overflow:hidden;
}

a{ color: var(--primary-light); }
.hidden{ display:none !important; }
.prewrap{ white-space:pre-wrap; }

.glass{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid var(--border);
  box-shadow: var(--shadow), var(--glow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--r2);
}

/* APP LAYOUT */
.app{
  height:100%;
  display:flex;
  flex-direction:column;
  padding: 10px 10px calc(12px + var(--safe-bottom));
  gap: 10px;
}

.topbar{
  padding: 10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-radius: 22px;
}

.brand{
  display:flex; align-items:center; gap:10px;
}
.brand__mark{
  width: 38px; height: 38px;
  border-radius: 14px;
  background:
    radial-gradient(12px 12px at 30% 30%, rgba(255,255,255,.18), transparent 65%),
    radial-gradient(16px 16px at 70% 70%, rgba(0,255,136,.22), transparent 62%),
    linear-gradient(135deg, rgba(0,255,136,.25), rgba(0,0,0,.15));
  border: 1px solid var(--border2);
  box-shadow: 0 0 35px rgba(0,255,136,.12);
}
.brand__title{ font-weight:800; letter-spacing:.3px; line-height:1.05; }
.brand__sub{ font-size:12px; color: var(--muted); margin-top:2px; }

.pill{
  border: 1px solid var(--border);
  background: rgba(0,0,0,.22);
  color: var(--text2);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight:700;
  cursor:pointer;
  transition: transform .12s ease, border-color .2s ease, background .2s ease;
}
.pill:active{ transform: scale(.98); }
.pill:hover{ border-color: var(--border2); }

.main{
  flex:1;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.view{
  height:100%;
  overflow:auto;
  padding-bottom: 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.view::-webkit-scrollbar{ display:none; }

.grid{
  display:grid;
  gap:10px;
}

.card{
  padding: 14px 14px;
}
.card__title{
  font-size: 16px;
  font-weight: 900;
  letter-spacing:.2px;
}
.card__sub{
  margin-top:6px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}

.row{ display:flex; align-items:center; }
.row.gap{ gap:10px; }
.row.wrap{ flex-wrap:wrap; }

.divider{
  height:1px;
  background: linear-gradient(90deg, transparent, rgba(0,255,136,.22), transparent);
  margin: 14px 0;
}

.btn{
  border: 1px solid var(--border);
  background: rgba(0,0,0,.22);
  color: var(--text2);
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 900;
  cursor:pointer;
  transition: transform .12s ease, border-color .2s ease, background .2s ease;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active{ transform: scale(.985); }
.btn:hover{ border-color: var(--border2); }
.btn--primary{
  background:
    radial-gradient(14px 14px at 20% 25%, rgba(255,255,255,.18), transparent 60%),
    linear-gradient(135deg, rgba(0,255,136,.36), rgba(0,0,0,.25));
  border-color: rgba(0,255,136,.45);
  box-shadow: 0 0 40px rgba(0,255,136,.12);
}

/* INPUTS */
.inp{
  flex:1;
  min-width: 160px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.24);
  color: var(--text);
  padding: 12px 12px;
  border-radius: 14px;
  outline:none;
}
.inp::placeholder{ color: rgba(176,255,208,.42); }

/* STATUS */
.statuslist{ margin-top:10px; display:flex; flex-direction:column; gap:8px; }
.status{
  display:flex; align-items:center; justify-content:space-between;
  padding: 10px 12px;
  border-radius: 14px;
  border:1px solid rgba(0,255,136,.10);
  background: rgba(0,0,0,.18);
}
.status__dot{
  width:9px; height:9px; border-radius:50%;
  background: rgba(0,255,136,.35);
  box-shadow: 0 0 12px rgba(0,255,136,.22);
  margin-right:10px;
}
.status span{ color: var(--text2); display:flex; align-items:center; gap:10px; }
.status b{ color: var(--primary-light); font-weight:900; }

/* TILES */
.tiles{ display:grid; gap:10px; margin-top:12px; }
.tile{
  text-align:left;
  padding: 12px 12px;
  border-radius: 18px;
  cursor:pointer;
}
.tile__title{ font-weight:900; }
.tile__sub{ font-size:12px; color: var(--muted); margin-top:4px; }

/* PROMO */
.promo{
  margin-top: 10px;
  padding: 12px 12px;
  border-radius: 18px;
  border:1px solid rgba(0,255,136,.16);
  background: linear-gradient(135deg, rgba(0,255,136,.10), rgba(0,0,0,.18));
}
.promo__title{ font-weight:900; }
.promo__sub{ margin-top:6px; color: var(--muted); font-size:12px; }

/* DROP */
.drop{
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px dashed rgba(0,255,136,.32);
  background: rgba(0,0,0,.16);
  position:relative;
  overflow:hidden;
}
.drop input[type="file"]{
  position:absolute; inset:0;
  opacity:0;
  cursor:pointer;
}
.drop__txt{
  font-weight:800;
  color: var(--text2);
}
.drop .muted{ margin-top:6px; font-size:12px; color: var(--muted); }

/* OUT */
.out{
  margin-top: 12px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(0,0,0,.18);
  border:1px solid rgba(0,255,136,.14);
  color: var(--text2);
}
.out b{ color: var(--primary-light); }
.out code{
  display:block;
  margin-top:8px;
  padding:10px;
  border-radius: 14px;
  background: rgba(0,0,0,.28);
  border:1px solid rgba(0,255,136,.12);
  overflow:auto;
  color: rgba(210,255,230,.95);
}

/* PICKERS */
.picker{
  flex:1;
  min-width: 220px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(0,0,0,.18);
}
.picker__label{ font-weight:900; color: var(--text2); margin-bottom:8px; }
.picker input[type="file"]{
  width:100%;
  border:1px solid rgba(0,255,136,.18);
  background: rgba(0,0,0,.22);
  color: var(--text2);
  border-radius: 14px;
  padding: 10px;
}

/* CHAT */
.chat{ display:flex; flex-direction:column; height: calc(100vh - 160px); }
.chat__body{
  flex:1;
  margin-top: 12px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap: 10px;
  padding-bottom: 10px;
}
.bubble{
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 18px;
  border:1px solid rgba(0,255,136,.14);
  background: rgba(0,0,0,.16);
  color: var(--text2);
}
.bubble--me{
  margin-left:auto;
  border-color: rgba(0,255,136,.26);
  background: linear-gradient(135deg, rgba(0,255,136,.12), rgba(0,0,0,.18));
}
.chat__composer{
  margin-top: 10px;
  padding: 10px;
  display:flex; align-items:center; gap: 10px;
  border-radius: 20px;
}
.chat__input{
  flex:1;
  border:1px solid rgba(0,255,136,.14);
  background: rgba(0,0,0,.22);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 12px;
  outline:none;
}
.iconbtn{
  width: 44px; height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(0,255,136,.14);
  background: rgba(0,0,0,.22);
  color: var(--text2);
  font-size: 18px;
  cursor:pointer;
}
.iconbtn:active{ transform: scale(.98); }

/* TABBAR */
.tabbar{
  display:flex;
  gap: 8px;
  padding: 8px;
  border-radius: 22px;
}
.tab{
  flex:1;
  border:1px solid transparent;
  background: rgba(0,0,0,.18);
  color: rgba(210,255,230,.78);
  border-radius: 18px;
  padding: 12px 10px;
  font-weight: 900;
  cursor:pointer;
  transition: transform .12s ease, border-color .2s ease, background .2s ease;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
}
.tab:active{ transform: scale(.985); }
.tab.is-active{
  color: rgba(235,255,245,.98);
  border-color: rgba(0,255,136,.36);
  background:
    radial-gradient(12px 12px at 25% 25%, rgba(255,255,255,.14), transparent 60%),
    linear-gradient(135deg, rgba(0,255,136,.22), rgba(0,0,0,.18));
}

/* PRELOADER */
.preloader{
  position:fixed; inset:0;
  display:flex; align-items:center; justify-content:center;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
  transition: opacity .35s ease;
}
.preloader__card{
  width: min(360px, calc(100vw - 28px));
  padding: 16px 14px;
  text-align:center;
}
.preloader__logo{ display:flex; justify-content:center; gap:8px; margin-bottom: 10px; }
.dot{
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(0,255,136,.35);
  box-shadow: 0 0 18px rgba(0,255,136,.18);
  animation: pulse 1.15s infinite ease-in-out;
}
.dot2{ animation-delay:.15s; }
.dot3{ animation-delay:.30s; }
@keyframes pulse{
  0%,100%{ transform: translateY(0); opacity:.55; }
  50%{ transform: translateY(-5px); opacity: 1; }
}
.preloader__text{ font-weight: 900; color: rgba(235,255,245,.92); margin-bottom: 12px; }
.preloader__bar{
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,255,136,.18);
  background: rgba(0,0,0,.22);
  overflow:hidden;
}
.preloader__bar i{
  display:block; height:100%;
  width: 42%;
  background: linear-gradient(90deg, rgba(0,255,136,.10), rgba(0,255,136,.55), rgba(0,255,136,.10));
  animation: slide 1.1s infinite ease-in-out;
}
@keyframes slide{
  0%{ transform: translateX(-110%); }
  100%{ transform: translateX(260%); }
}
