/* ═══════════════════════════════════════════════════════════
   T-Go Settings · v18.3.0 styles
   ═══════════════════════════════════════════════════════════ */

#tgoSettingsPage{ padding:0; background:#F8F7F4; }

.tgs-shell{
  display:grid;
  grid-template-columns:300px 1fr;
  gap:0;
  min-height:calc(100vh - 60px);
}

/* ── Side panel ─────────────────────────────────────────── */
.tgs-side{
  background:#fff;
  border-right:1px solid #e5e7eb;
  padding:20px 12px;
  overflow-y:auto;
}
.tgs-side-head{
  padding:0 8px 16px;
  border-bottom:1px solid #f1f5f9;
  margin-bottom:12px;
}
.tgs-side-head h2{
  margin:0 0 4px;
  font-size:18px;
  font-weight:700;
  color:#1e293b;
}
.tgs-side-sub{
  font-size:11px;
  color:#94a3b8;
  font-weight:500;
  letter-spacing:.5px;
  text-transform:uppercase;
}

.tgs-side-item{
  display:flex;
  align-items:flex-start;
  gap:10px;
  width:100%;
  padding:10px 12px;
  margin-bottom:4px;
  background:transparent;
  border:1px solid transparent;
  border-radius:10px;
  cursor:pointer;
  text-align:left;
  font:inherit;
  color:#334155;
  transition:all .15s;
}
.tgs-side-item:hover{
  background:#f8fafc;
  border-color:#e2e8f0;
}
.tgs-side-item.active{
  background:#eff6ff;
  border-color:#bfdbfe;
  color:#1d4ed8;
}
.tgs-side-icon{
  font-size:20px;
  flex:0 0 28px;
  text-align:center;
  line-height:1;
  padding-top:2px;
}
.tgs-side-text{ flex:1; min-width:0; }
.tgs-side-label{
  font-weight:600;
  font-size:14px;
  margin-bottom:2px;
  display:flex;
  align-items:center;
  gap:6px;
}
.tgs-side-desc{
  font-size:12px;
  color:#64748b;
  line-height:1.4;
}
.tgs-soon{
  display:inline-block;
  padding:1px 8px;
  font-size:10px;
  background:#fef3c7;
  color:#92400e;
  border-radius:10px;
  font-weight:600;
}

/* ── Main panel ─────────────────────────────────────────── */
.tgs-main{
  padding:28px 32px;
  overflow-y:auto;
}
.tgs-page-head{ margin-bottom:20px; }
.tgs-page-head h2{
  margin:0 0 6px;
  font-size:24px;
  font-weight:700;
  color:#0f172a;
}
.tgs-page-head p{
  margin:0;
  color:#64748b;
  font-size:14px;
}

.tgs-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:20px;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}

/* ── Module list ────────────────────────────────────────── */
.tgs-mod-list{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.tgs-mod-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 16px;
  border-radius:10px;
  transition:background .15s;
}
.tgs-mod-row:hover{ background:#f8fafc; }
.tgs-mod-info{ flex:1; min-width:0; }
.tgs-mod-name{
  font-weight:600;
  font-size:15px;
  color:#0f172a;
  margin-bottom:2px;
}
.tgs-mod-desc{
  font-size:13px;
  color:#64748b;
}

/* ── Toggle switch ──────────────────────────────────────── */
.tgs-switch{
  position:relative;
  display:inline-block;
  width:46px;
  height:26px;
  flex:0 0 46px;
}
.tgs-switch input{ opacity:0; width:0; height:0; }
.tgs-slider{
  position:absolute;
  cursor:pointer;
  inset:0;
  background:#cbd5e1;
  border-radius:26px;
  transition:.2s;
}
.tgs-slider:before{
  content:"";
  position:absolute;
  height:20px; width:20px;
  left:3px; bottom:3px;
  background:#fff;
  border-radius:50%;
  transition:.2s;
  box-shadow:0 2px 4px rgba(15,23,42,.2);
}
.tgs-switch input:checked + .tgs-slider{ background:#10b981; }
.tgs-switch input:checked + .tgs-slider:before{ transform:translateX(20px); }
.tgs-switch input:focus + .tgs-slider{ box-shadow:0 0 0 3px rgba(16,185,129,.2); }

/* ── Notes ──────────────────────────────────────────────── */
.tgs-note{
  margin-top:16px;
  padding:12px 14px;
  background:#f0f9ff;
  border:1px solid #bae6fd;
  border-radius:10px;
  font-size:13px;
  color:#0369a1;
  line-height:1.5;
}

/* ── Tiles (sub-menu cards) ─────────────────────────────── */
.tgs-tile-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(240px, 1fr));
  gap:12px;
  margin-top:8px;
}
.tgs-tile{
  display:block;
  width:100%;
  padding:18px;
  background:#fafafa;
  border:1px solid #e5e7eb;
  border-radius:12px;
  text-align:left;
  cursor:pointer;
  font:inherit;
  transition:all .15s;
}
.tgs-tile:hover{
  background:#fff;
  border-color:#3b82f6;
  box-shadow:0 4px 12px rgba(59,130,246,.15);
  transform:translateY(-1px);
}
.tgs-tile-icon{
  font-size:28px;
  margin-bottom:8px;
}
.tgs-tile-label{
  font-weight:600;
  color:#1e293b;
  margin-bottom:4px;
  font-size:15px;
}
.tgs-tile-desc{
  font-size:13px;
  color:#64748b;
  line-height:1.4;
}

/* ── Coming Soon card ───────────────────────────────────── */
.tgs-soon-card{
  text-align:center;
  padding:48px 24px;
}
.tgs-soon-card h3{
  margin:0 0 6px;
  color:#475569;
  font-size:18px;
}
.tgs-soon-card p{
  margin:0;
  color:#94a3b8;
  font-size:14px;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width:900px){
  .tgs-shell{ grid-template-columns:1fr; }
  .tgs-side{
    border-right:0;
    border-bottom:1px solid #e5e7eb;
  }
  .tgs-main{ padding:20px 16px; }
}


/* v18.3.2: Back / Close controls for System Management menus */
.tgs-page-head-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
.tgs-page-actions,
.tgo-system-actions,
.tgo31-header-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.tgo-system-btn{
  font:13px inherit;
  border:1px solid #d1d5db;
  background:#fff;
  color:#334155;
  border-radius:999px;
  padding:8px 13px;
  cursor:pointer;
  font-weight:800;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}
.tgo-system-btn:hover{ background:#f8fafc; border-color:#94a3b8; }
.tgo-system-btn.danger{ border-color:#fecaca; color:#b91c1c; background:#fff5f5; }
.tgo-system-btn.danger:hover{ background:#fee2e2; border-color:#fca5a5; }
@media (max-width:640px){
  .tgs-page-head-row{ flex-direction:column; }
  .tgs-page-actions,
  .tgo-system-actions,
  .tgo31-header-actions{ width:100%; justify-content:flex-start; }
}
