:root{
  --bg:#07070b;
  --panel:#10101a;
  --panel-2:#151522;
  --line:rgba(255,255,255,.1);
  --text:#f4f4f7;
  --muted:#9ca3af;
  --green:#9eff00;
  --purple:#cf37ff;
  --danger:#ff4d6d;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Inter,Segoe UI,Arial,sans-serif;background:radial-gradient(circle at 20% 0%,rgba(207,55,255,.22),transparent 28%),radial-gradient(circle at 100% 30%,rgba(158,255,0,.13),transparent 26%),var(--bg);color:var(--text)}
::-webkit-scrollbar{width:14px;height:14px}
::-webkit-scrollbar-track{background:#08080e;border-radius:20px}
::-webkit-scrollbar-thumb{border-radius:20px;background:linear-gradient(180deg,var(--green),var(--purple));border:3px solid #08080e}
::-webkit-scrollbar-thumb:hover{filter:brightness(1.15)}
button,input,textarea{font:inherit}
button{border:0;border-radius:14px;background:linear-gradient(135deg,var(--green),var(--purple));color:#050508;font-weight:800;padding:14px 18px;cursor:pointer;box-shadow:0 0 24px rgba(158,255,0,.16)}
button:hover{transform:translateY(-1px);filter:brightness(1.05)}
input,textarea{width:100%;margin-top:8px;border:1px solid var(--line);background:#0a0a11;color:var(--text);border-radius:14px;padding:14px 15px;outline:none}
input:focus,textarea:focus{border-color:var(--green);box-shadow:0 0 0 3px rgba(158,255,0,.10)}
label{display:block;color:#d8d8df;font-weight:700;font-size:14px;margin-bottom:18px}
textarea{resize:vertical;line-height:1.5}
.login-body{display:grid;place-items:center;padding:24px}
.login-card{width:min(440px,100%);position:relative;border:1px solid var(--line);background:rgba(16,16,26,.88);backdrop-filter:blur(18px);padding:38px;border-radius:28px;box-shadow:0 30px 100px rgba(0,0,0,.42);overflow:hidden}
.glow{position:absolute;inset:-40%;background:radial-gradient(circle,rgba(207,55,255,.18),transparent 38%);pointer-events:none}
.brand-mark{width:58px;height:58px;display:grid;place-items:center;border-radius:18px;background:linear-gradient(135deg,var(--purple),var(--green));color:#09090d;font-weight:900;font-size:28px;box-shadow:0 0 36px rgba(207,55,255,.25)}
.login-card h1{margin:22px 0 6px;font-size:30px}
.login-card p{margin:0 0 28px;color:var(--muted)}
.form-stack{position:relative;z-index:1}
.message{display:inline-block;margin-left:12px;color:var(--green);font-weight:700}.message.error{color:var(--danger)}
.app-shell{min-height:100vh;display:grid;grid-template-columns:280px 1fr}
.mobile-nav-toggle{display:none}
.sidebar{border-right:1px solid var(--line);background:rgba(10,10,17,.72);backdrop-filter:blur(20px);padding:20px;display:flex;flex-direction:column;gap:16px;position:sticky;top:0;height:100vh;min-height:0;overflow:hidden}
.brand{display:flex;align-items:center;gap:12px;flex-shrink:0}.brand .brand-mark{width:52px;height:52px;border-radius:16px;font-size:25px}.brand strong{display:block;font-size:19px}.brand span{display:block;color:var(--muted);font-size:13px;margin-top:3px}
nav{display:flex;flex-direction:column;gap:8px;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding-right:4px}
.sidebar-total{
  margin-top:2px;
  margin-left:0;
  padding:10px 12px;
  border:1px solid rgba(158,255,0,.18);
  background:rgba(158,255,0,.055);
  border-radius:14px;
  color:var(--muted);
  display:grid;
  gap:2px;
}
.sidebar-total strong{
  color:var(--green);
  font-size:24px;
  line-height:1;
}
.sidebar-total span{
  font-weight:800;
  font-size:13px;
  color:var(--text);
}
.sidebar-total small{
  color:var(--muted);
  font-size:12px;
}
nav a{padding:12px 14px;border-radius:14px;color:var(--muted);background:rgba(255,255,255,.04);flex-shrink:0}nav a.active{color:var(--green);border:1px solid rgba(158,255,0,.28);background:rgba(158,255,0,.07)}
.ghost-btn{margin-top:0;background:rgba(255,255,255,.06);color:var(--text);box-shadow:none;border:1px solid var(--line);flex-shrink:0}
.content{padding:34px;max-width:1180px;width:100%;margin:0 auto}.topbar{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:26px}.topbar h1{margin:0 0 8px;font-size:34px}.topbar p{margin:0;color:var(--muted)}
.status-card{min-width:260px;border:1px solid var(--line);background:rgba(16,16,26,.84);border-radius:22px;padding:18px;color:var(--muted);line-height:1.5}
.status-card strong{color:var(--green)}
.panel{border:1px solid var(--line);background:rgba(16,16,26,.82);border-radius:28px;padding:28px;box-shadow:0 30px 100px rgba(0,0,0,.28)}
.admin-page{display:none}
.admin-page.is-active{display:block}
.license-panel{margin-top:0}

.grid.two{display:grid;grid-template-columns:1fr 1.5fr;gap:18px}.file-sections{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:10px}.file-box{border:1px solid var(--line);background:var(--panel-2);border-radius:22px;padding:22px}.file-box h2{margin:0 0 6px}.file-box p{margin:0 0 18px;color:var(--muted)}.file-label input{padding:12px;background:#090910}.actions{display:flex;align-items:center;margin-top:24px;gap:12px}
@media(max-width:860px){.app-shell{grid-template-columns:1fr}.sidebar{position:relative;height:auto;overflow:visible}.sidebar nav{overflow:visible}.topbar{display:block}.status-card{margin-top:18px}.grid.two,.file-sections{grid-template-columns:1fr}.content{padding:22px}}

/* Chat Hook */
.chat-hook-settings-form{margin-bottom:22px}
.chat-hook-open-control{justify-content:flex-start}
.chat-hook-toggle-row,.chat-hook-retention-row{display:flex;align-items:center;gap:12px;min-height:46px}
.chat-hook-toggle-row input{width:22px;height:22px;accent-color:var(--green)}
.chat-hook-retention-row input{width:110px}
.chat-hook-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:20px 0}
.chat-hook-stats>div{display:flex;flex-direction:column;gap:5px;padding:16px;border:1px solid rgba(255,255,255,.09);border-radius:14px;background:rgba(255,255,255,.035)}
.chat-hook-stats strong{font-size:24px;color:var(--green)}
.chat-hook-stats span{font-size:12px;color:var(--muted)}
.chat-hook-admin-messages{display:flex;flex-direction:column;gap:10px;max-height:560px;overflow:auto;padding-right:5px}
.chat-hook-admin-message{display:grid;grid-template-columns:42px minmax(0,1fr);gap:11px;padding:13px;border:1px solid rgba(255,255,255,.08);border-radius:14px;background:rgba(255,255,255,.03)}
.chat-hook-admin-avatar{width:42px;height:42px;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:linear-gradient(135deg,#7d42ff,#a4ff00);color:#090b0d;font-weight:800}
.chat-hook-admin-avatar img{width:100%;height:100%;object-fit:cover}
.chat-hook-admin-body{min-width:0}
.chat-hook-admin-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.chat-hook-admin-head time{margin-left:auto;font-size:11px;color:var(--muted)}
.chat-hook-admin-body p{white-space:pre-wrap;overflow-wrap:anywhere;margin:7px 0 0;line-height:1.45}
.chat-hook-admin-image{display:block;margin-top:10px;max-width:340px}
.chat-hook-admin-image img{display:block;max-width:100%;max-height:260px;border-radius:12px;object-fit:contain;background:#08090c}
.chat-hook-live-panel{padding:0;overflow:hidden}
.chat-hook-live-shell{display:flex;flex-direction:column;height:min(78vh,820px);min-height:560px;overflow:hidden;border:1px solid rgba(207,55,255,.24);border-radius:27px;background:radial-gradient(circle at top right,rgba(207,55,255,.16),transparent 42%),linear-gradient(180deg,rgba(23,23,37,.98),rgba(11,11,18,.98));box-shadow:0 20px 65px rgba(0,0,0,.28)}
.chat-hook-live-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:0 0 auto;padding:15px 18px;border-bottom:1px solid var(--line)}
.chat-hook-live-title-row{display:flex;align-items:center;gap:12px;min-width:0}
.chat-hook-live-current-avatar{display:grid;place-items:center;flex:0 0 54px;width:54px;height:54px;overflow:hidden;border:1px solid rgba(255,255,255,.14);border-radius:50%;background:linear-gradient(135deg,rgba(207,55,255,.88),rgba(77,27,150,.96));color:#fff;font-weight:900}
.chat-hook-live-title-row h2{margin:0 0 4px;font-size:19px;line-height:1}
.chat-hook-live-title-row span{display:flex;align-items:center;gap:6px;color:#8cf5a8;font-size:11px}
.chat-hook-live-title-row span i{width:7px;height:7px;border-radius:50%;background:#62e884;box-shadow:0 0 10px rgba(98,232,132,.8)}
.chat-hook-live-refresh{display:grid;place-items:center;width:38px;height:38px;padding:0;border:1px solid rgba(255,255,255,.12);border-radius:11px;background:rgba(255,255,255,.07);box-shadow:none;color:var(--text);font-size:22px}
.chat-hook-live-pinned{flex:0 0 auto;margin:10px 12px 0;padding:10px 12px;border:1px solid rgba(158,255,0,.23);border-radius:12px;background:rgba(158,255,0,.07)}
.chat-hook-live-pinned strong{display:block;margin-bottom:4px;color:var(--green);font-size:11px}
.chat-hook-live-pinned p{margin:0;color:#e7e7ed;font-size:12px;line-height:1.35;white-space:pre-wrap;overflow-wrap:anywhere}
.chat-hook-live-messages{display:flex;flex:1 1 auto;flex-direction:column;min-height:120px;overflow-x:hidden;overflow-y:auto;padding:14px;scroll-behavior:smooth;scrollbar-color:rgba(207,55,255,.55) transparent;scrollbar-width:thin}
.chat-hook-live-message{display:flex;flex-direction:row-reverse;align-items:flex-start;gap:9px;margin:0 0 12px;padding:0;border:0;background:transparent}
.chat-hook-live-message.from-admin{flex-direction:row}
.chat-hook-live-message .chat-hook-admin-avatar{flex:0 0 44px;width:44px;height:44px;border:1px solid rgba(255,255,255,.14);background:linear-gradient(135deg,rgba(207,55,255,.88),rgba(77,27,150,.96));color:#fff}
.chat-hook-live-message .chat-hook-admin-body{min-width:0;max-width:min(76%,680px);padding:10px 11px;border:1px solid rgba(207,55,255,.22);border-radius:14px 5px 14px 14px;background:rgba(207,55,255,.11)}
.chat-hook-live-message.from-admin .chat-hook-admin-body{border-color:rgba(158,255,0,.22);border-radius:5px 14px 14px 14px;background:rgba(255,255,255,.055)}
.chat-hook-live-message .chat-hook-admin-head{display:flex;align-items:center;gap:6px;min-width:0;margin:0 0 5px;flex-wrap:nowrap}
.chat-hook-live-message .chat-hook-admin-head strong{overflow:hidden;color:#fff;font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.chat-hook-live-message .chat-hook-admin-head time{margin-left:auto;color:#737483;font-size:9px;white-space:nowrap}
.chat-hook-live-message .chat-hook-admin-head .badge{padding:3px 6px;font-size:8px}
.chat-hook-live-message .chat-hook-admin-body p{margin:0;color:#e7e7ec;font-size:13px;line-height:1.42;white-space:pre-wrap;overflow-wrap:anywhere}
.chat-hook-live-message .chat-hook-admin-image{width:min(100%,440px);max-width:none;margin-top:8px}
.chat-hook-live-message .chat-hook-admin-image img{width:100%;max-height:330px;border-radius:10px}
.chat-hook-live-video{display:block;width:min(100%,440px);max-height:330px;margin-top:8px;border-radius:10px;background:#050509}
.chat-hook-live-message-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.chat-hook-live-message-actions button{min-height:26px;padding:4px 8px;border-radius:7px;font-size:9px;margin:0}
.badge.pinned{color:#ffd65a;border:1px solid rgba(255,214,90,.32);background:rgba(255,214,90,.1)}
.chat-hook-live-composer{position:relative;flex:0 0 auto;padding:12px;border-top:1px solid var(--line);background:rgba(5,5,9,.52)}
.chat-hook-live-composer textarea{display:block;width:100%;min-height:58px;max-height:120px;margin:0;resize:vertical;padding:11px 12px;border:1px solid rgba(255,255,255,.1);border-radius:12px;background:rgba(255,255,255,.055);color:var(--text);font-size:13px}
.chat-hook-live-composer textarea:focus{border-color:rgba(207,55,255,.58);box-shadow:0 0 0 2px rgba(207,55,255,.09)}
.chat-hook-live-composer-actions{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;margin-top:8px}
.chat-hook-live-attachment-actions{display:flex;align-items:center;gap:7px}
.chat-hook-live-attach{display:grid;place-items:center;width:34px;height:34px;margin:0;border:1px solid rgba(255,255,255,.12);border-radius:10px;background:rgba(255,255,255,.07);cursor:pointer;font-size:18px}
.chat-hook-live-attach input{position:absolute;width:1px;height:1px;margin:0;padding:0;opacity:0;pointer-events:none}
.chat-hook-live-clear-media{min-height:30px;margin:0;padding:6px 9px;border:1px solid rgba(255,92,92,.24);border-radius:8px;background:rgba(255,64,64,.08);box-shadow:none;color:#ff8b8b;font-size:10px}
.chat-hook-live-composer .message{margin:0;overflow:hidden;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.chat-hook-live-send{min-width:72px;min-height:34px;padding:8px 13px;border-radius:10px;font-size:11px}
.chat-hook-live-media-preview{display:inline-flex;align-items:center;max-width:100%;margin:0 0 8px;padding:7px 10px;border:1px solid rgba(158,255,0,.2);border-radius:9px;background:rgba(158,255,0,.055);color:var(--green);font-size:11px;overflow-wrap:anywhere}
.chat-hook-live-media-preview[hidden]{display:none}
.tutorial-cards-editor{display:grid;gap:12px;margin-bottom:16px}
.tutorial-category-tabs{display:flex;gap:8px;margin:0 0 14px;padding:5px;border:1px solid rgba(255,255,255,.09);border-radius:14px;background:rgba(255,255,255,.025)}
.tutorial-category-tabs button{flex:1;border:0;border-radius:10px;padding:11px 16px;background:transparent;color:var(--muted);font-weight:800;cursor:pointer}
.tutorial-category-tabs button.active{background:linear-gradient(135deg,rgba(187,57,255,.32),rgba(141,255,31,.16));color:#fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.09)}
.tutorial-editor-card{display:grid;grid-template-columns:180px minmax(0,1fr) auto;gap:14px;align-items:center;padding:14px;border:1px solid rgba(255,255,255,.09);border-radius:14px;background:rgba(255,255,255,.03)}
.tutorial-editor-preview{height:105px;border-radius:10px;overflow:hidden;display:grid;place-items:center;background:#08090c;color:var(--muted)}
.tutorial-editor-preview img{width:100%;height:100%;object-fit:cover}
.tutorial-editor-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.tutorial-editor-fields label:last-child{grid-column:1/-1}
.tutorial-editor-order{display:grid;gap:7px;min-width:96px}
.tutorial-editor-order button{width:100%;white-space:nowrap}
.tutorial-editor-order button:disabled{opacity:.38;cursor:not-allowed}
@media(max-width:760px){.tutorial-editor-card{grid-template-columns:1fr}.tutorial-editor-fields{grid-template-columns:1fr}.tutorial-editor-fields label:last-child{grid-column:auto}}
@media(max-width:1050px){.chat-hook-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.chat-hook-stats{grid-template-columns:1fr}.chat-hook-admin-head time{width:100%;margin-left:0}}

.section-title{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:20px}.section-title h2{margin:0 0 6px}.section-title p{margin:0;color:var(--muted)}.license-panel{margin-top:0}.grid.three{display:grid;grid-template-columns:1fr 1.2fr 1.4fr;gap:18px}.compact{margin-top:4px}.ghost-inline{background:rgba(255,255,255,.06);color:var(--text);box-shadow:none;border:1px solid var(--line);padding:10px 14px}.webhook-box{display:grid;gap:8px;margin:22px 0;padding:16px;border:1px solid rgba(158,255,0,.18);background:rgba(158,255,0,.05);border-radius:18px}.webhook-box code{display:block;color:var(--green);background:#08080e;border:1px solid var(--line);border-radius:12px;padding:10px;overflow:auto}.customers-list{display:grid;gap:14px}.customer-card{border:1px solid var(--line);background:rgba(21,21,34,.72);border-radius:20px;padding:18px}.customer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.customer-head strong{display:block;font-size:17px}.customer-head span{display:block;color:var(--muted);font-size:13px;margin-top:4px}.badge{border-radius:999px;padding:6px 10px;font-weight:900;font-size:12px;text-transform:uppercase}.badge.ok{background:rgba(158,255,0,.12);color:var(--green);border:1px solid rgba(158,255,0,.28)}.badge.bad{background:rgba(255,77,109,.12);color:var(--danger);border:1px solid rgba(255,77,109,.28)}.customer-meta{margin:14px 0;color:var(--muted)}.devices{display:grid;gap:8px;margin-bottom:14px}.device-row{display:grid;gap:3px;border:1px solid var(--line);border-radius:12px;padding:10px;background:#0a0a11}.device-row small,.devices small{color:var(--muted);word-break:break-all}.danger-inline{background:rgba(255,77,109,.1);color:#ff9aaa;box-shadow:none;border:1px solid rgba(255,77,109,.28);padding:10px 14px}.success-inline{background:rgba(158,255,0,.1);color:var(--green);box-shadow:none;border:1px solid rgba(158,255,0,.28);padding:10px 14px}
.warn-inline{background:rgba(255,190,80,.1);color:#ffcb7a;box-shadow:none;border:1px solid rgba(255,190,80,.28);padding:10px 14px}.empty-state{color:var(--muted);border:1px dashed var(--line);border-radius:18px;padding:18px;text-align:center}@media(max-width:860px){.grid.three{grid-template-columns:1fr}.section-title{display:block}.ghost-inline{margin-top:14px}}

.section-actions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.section-actions a{
  text-decoration:none;
}
.webhook-box span{
  display:block;
  color:var(--muted);
  margin:4px 0 8px;
  font-size:13px;
}

.badge.warn{background:rgba(255,190,80,.12);color:#ffcb7a;border:1px solid rgba(255,190,80,.28)}
.customer-license-quantity{
  display:grid;
  grid-template-columns:minmax(190px,260px) auto;
  justify-content:start;
  align-items:end;
  gap:10px;
  margin:0 0 14px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.03);
}
.customer-license-quantity label{margin:0}
.customer-license-quantity input{margin-top:6px;padding:10px 12px}
.customer-license-quantity button{white-space:nowrap;min-height:42px}
.customer-plan-conversion{
  display:grid;
  grid-template-columns:minmax(220px,320px) auto;
  justify-content:start;
  align-items:end;
  gap:10px;
  margin:0 0 14px;
  padding:12px;
  border:1px solid rgba(255,190,80,.24);
  border-radius:14px;
  background:rgba(255,190,80,.045);
}
.customer-plan-conversion label{margin:0}
.customer-plan-conversion select{
  width:100%;
  margin-top:6px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#0a0a11;
  color:var(--text);
  outline:none;
}
.customer-plan-conversion select:focus{border-color:#ffcb7a;box-shadow:0 0 0 3px rgba(255,190,80,.1)}
.customer-plan-conversion button{white-space:nowrap;min-height:42px}
.customer-name-editor{
  display:grid;
  grid-template-columns:minmax(190px,360px) auto;
  justify-content:start;
  align-items:end;
  gap:10px;
  margin:0 0 10px;
  padding:12px;
  border:1px solid rgba(207,55,255,.2);
  border-radius:14px;
  background:rgba(207,55,255,.035);
}
.customer-name-editor label{margin:0}
.customer-name-editor input{margin-top:6px;padding:10px 12px}
.customer-name-editor button{white-space:nowrap;min-height:42px}
.customer-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.customer-warning{margin:10px 0 14px;border:1px solid rgba(255,190,80,.24);background:rgba(255,190,80,.08);color:#ffcb7a;border-radius:12px;padding:10px 12px;font-size:13px;font-weight:700}

.bulk-form{margin-top:18px;border-top:1px solid var(--line);padding-top:22px}
.hint-box{border:1px solid var(--line);background:rgba(255,255,255,.04);border-radius:14px;padding:14px 15px;color:var(--muted);font-size:13px;align-self:end;margin-bottom:18px}
label small{color:var(--muted);font-weight:600}

.customer-search {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: end;
  margin: 18px 0 16px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.03);
}

.customer-search label {
  margin: 0;
}

.customer-search input {
  width: 100%;
}

html {
  scroll-behavior: smooth;
}

@media (max-width: 760px) {
  .customer-search {
    grid-template-columns: 1fr;
  }

  .customer-license-quantity {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .customer-name-editor {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.small-title{margin-bottom:12px}
.support-form{margin-top:18px}
.support-form .hint-box{align-self:end}

.manual-license-form{margin-top:18px;border-top:1px solid var(--line);padding-top:22px}
.pagination-bar{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:18px;color:var(--muted);font-weight:800}
button:disabled{opacity:.45;cursor:not-allowed;transform:none;filter:none}


.updates-history-list {
  display: grid;
  gap: 14px;
}

.update-history-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.update-history-card p {
  white-space: pre-wrap;
  color: var(--muted);
  margin: 12px 0;
}

.update-files-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.update-files-grid > div {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
}

.file-link {
  color: #c884ff;
  text-decoration: none;
  font-weight: 700;
}

.file-link:hover {
  text-decoration: underline;
}

.file-missing {
  color: var(--muted);
  font-size: 13px;
}
.platform-badges{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.platform-badges .badge{background:rgba(255,255,255,.08);color:var(--text);border:1px solid var(--line)}
.inline-check { display:flex; align-items:center; gap:8px; margin: 8px 0 14px; font-weight:700; }
.inline-check input { width:auto; }
.file-box textarea { width:100%; resize:vertical; }

.customer-badges{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:flex-start;
}

@media(max-width:720px){
  .customer-head{flex-direction:column;align-items:stretch}
  .customer-badges{justify-content:flex-start}
}


/* Ajuste mobile do painel administrativo */
img, svg, video { max-width: 100%; height: auto; }
.content, .panel, .file-box, .customer-card, .update-history-card, .status-card { min-width: 0; }
button, a, input, textarea { -webkit-tap-highlight-color: rgba(158,255,0,.18); }

@media (max-width: 860px) {
  #navHookCenter {
    display: none;
  }

  html, body { overflow-x: hidden; }
  body { background-attachment: fixed; }

  .app-shell {
    display: block;
    min-height: 100vh;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: auto;
    min-height: 0;
    overflow: visible;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 12px 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.11);
    background: rgba(7,7,11,.94);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 44px rgba(0,0,0,.42);
  }

  .brand {
    min-width: 0;
    gap: 9px;
  }

  .brand .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    font-size: 20px;
    flex: 0 0 auto;
  }

  .brand strong {
    font-size: 15px;
    line-height: 1.05;
  }

  .brand span {
    font-size: 11px;
    margin-top: 2px;
  }

  .ghost-btn {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    width: auto;
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 12px;
    font-size: 13px;
  }

  .sidebar nav {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1px 1px 7px;
    min-height: 0;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar nav a {
    flex: 0 0 auto;
    scroll-snap-align: start;
    white-space: nowrap;
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1;
  }

  .sidebar nav a.active {
    box-shadow: inset 0 0 0 1px rgba(158,255,0,.2), 0 0 22px rgba(158,255,0,.08);
  }

  .sidebar-total {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    margin: 0;
    padding: 8px 10px;
    border-radius: 13px;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar-total strong {
    font-size: 20px;
  }

  .sidebar-total span,
  .sidebar-total small {
    font-size: 12px;
  }

  .content {
    width: 100%;
    max-width: none;
    padding: 14px 12px 28px;
  }

  .topbar {
    display: block;
    margin-bottom: 14px;
  }

  .topbar h1 {
    font-size: 25px;
    line-height: 1.1;
    margin-bottom: 5px;
  }

  .topbar p,
  .section-title p,
  .file-box p,
  .customer-meta,
  .update-history-card p {
    font-size: 13px;
    line-height: 1.45;
  }

  .status-card {
    min-width: 0;
    margin-top: 12px;
    padding: 13px;
    border-radius: 16px;
    font-size: 13px;
  }

  .panel {
    padding: 14px;
    border-radius: 20px;
    box-shadow: 0 18px 54px rgba(0,0,0,.24);
  }

  .file-box,
  .customer-card,
  .update-history-card {
    padding: 14px;
    border-radius: 18px;
  }

  .file-box h2,
  .section-title h2,
  .small-title h2 {
    font-size: 20px;
    line-height: 1.15;
  }

  .grid.two,
  .grid.three,
  .file-sections,
  .update-files-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  label {
    font-size: 13px;
    margin-bottom: 13px;
  }

  input,
  textarea,
  button {
    font-size: 16px;
  }

  input,
  textarea {
    margin-top: 6px;
    padding: 13px 13px;
    border-radius: 13px;
  }

  input[type="file"] {
    padding: 10px;
    font-size: 13px;
  }

  .hint-box,
  .webhook-box {
    padding: 12px;
    border-radius: 14px;
    font-size: 13px;
    margin-bottom: 14px;
  }

  .webhook-box code {
    font-size: 12px;
    white-space: nowrap;
  }

  .section-title {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
  }

  .section-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .section-actions button,
  .section-actions a,
  .customer-search button,
  .actions button,
  .login-card button {
    width: 100%;
  }

  .ghost-inline,
  .success-inline,
  .warn-inline,
  .danger-inline {
    margin-top: 0;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
    margin-top: 16px;
  }

  .message {
    margin-left: 0;
    font-size: 13px;
    line-height: 1.35;
  }

  .customer-search {
    grid-template-columns: 1fr;
    gap: 9px;
    margin: 12px 0 14px;
    padding: 12px;
    border-radius: 15px;
  }

  .customer-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .customer-head strong {
    font-size: 16px;
  }

  .customer-head span {
    font-size: 12px;
    line-height: 1.45;
    word-break: break-word;
  }

  .customer-badges {
    justify-content: flex-start;
    gap: 6px;
  }

  .badge {
    font-size: 10px;
    padding: 6px 8px;
  }

  .customer-meta {
    margin: 11px 0;
  }

  .device-row {
    padding: 9px;
    border-radius: 11px;
  }

  .device-row span,
  .device-row small,
  .devices small {
    word-break: break-word;
  }

  .customer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: stretch;
  }

  .customer-actions button {
    width: 100%;
    min-height: 42px;
  }

  .pagination-bar {
    gap: 8px;
    font-size: 13px;
    flex-wrap: wrap;
  }

  .pagination-bar button {
    flex: 1 1 120px;
  }

  .login-body {
    display: block;
    padding: 18px 12px;
  }

  .login-card {
    width: 100%;
    padding: 24px 18px;
    border-radius: 22px;
    margin: 0 auto;
  }

  .login-card h1 {
    margin-top: 16px;
    font-size: 26px;
  }
}

@media (max-width: 420px) {
  .content {
    padding-left: 10px;
    padding-right: 10px;
  }

  .panel,
  .file-box,
  .customer-card,
  .update-history-card {
    padding: 12px;
  }

  .section-actions,
  .customer-actions {
    grid-template-columns: 1fr;
  }

  .customer-license-quantity {
    grid-template-columns: 1fr;
  }

  .customer-license-quantity button {
    width: 100%;
  }

  .topbar h1 {
    font-size: 23px;
  }

  .sidebar {
    padding-left: 10px;
    padding-right: 10px;
  }
}


.danger-password-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(8px);
}

.danger-password-modal {
  width: min(420px, 94vw);
  border: 1px solid rgba(255, 90, 90, .45);
  border-radius: 18px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(24, 24, 34, .98), rgba(12, 12, 18, .98));
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
}

.danger-password-modal h3 {
  margin: 0 0 8px;
}

.danger-password-modal p {
  margin: 0 0 16px;
  color: #c9c9d4;
  line-height: 1.45;
}

.danger-password-modal input {
  width: 100%;
  margin-bottom: 16px;
}

.danger-password-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* Formulários otimizados para administração pelo celular. */
@media (max-width: 860px) {
  .sidebar-total {
    display: none;
  }

  .content {
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }

  .admin-page,
  .customer-form,
  .tutorial-editor-fields,
  .chat-hook-admin-body {
    min-width: 0;
  }

  .customer-name-editor,
  .customer-license-quantity,
  .customer-plan-conversion {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px;
  }

  .customer-actions button,
  .section-actions button,
  .actions button {
    min-height: 46px;
    white-space: normal;
    line-height: 1.2;
  }

  .tutorial-editor-order {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-width: 0;
  }

  .tutorial-editor-order button {
    min-width: 0;
    white-space: normal;
  }

  .chat-hook-toggle-row,
  .chat-hook-retention-row {
    flex-wrap: wrap;
  }

  .chat-hook-live-panel {
    padding: 0;
    border-radius: 18px;
  }

  .chat-hook-live-shell {
    height: calc(100dvh - 176px);
    min-height: 500px;
    border: 0;
    border-radius: 18px;
  }

  .chat-hook-live-messages {
    height: auto;
    min-height: 180px;
    padding: 10px;
  }

  .chat-hook-live-composer {
    padding: 9px;
  }

  .chat-hook-live-header {
    padding: 10px 11px;
  }

  .chat-hook-live-current-avatar {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
  }

  .chat-hook-live-message .chat-hook-admin-body {
    max-width: calc(100% - 54px);
  }

  .chat-hook-live-message .chat-hook-admin-avatar {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
    font-size: 11px;
  }

  .chat-hook-live-composer textarea {
    min-height: 48px;
    max-height: 84px;
    font-size: 16px;
  }

  .danger-password-modal {
    width: min(100%, 420px);
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
  }
}

@media (max-width: 560px) {
  .brand span {
    display: none;
  }

  .panel {
    border-radius: 16px;
  }

  .customer-name-editor,
  .customer-license-quantity,
  .customer-plan-conversion,
  .section-actions,
  .customer-actions,
  .danger-password-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .customer-name-editor button,
  .customer-license-quantity button,
  .customer-plan-conversion button,
  .danger-password-actions button {
    width: 100%;
  }

  .tutorial-category-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .chat-hook-admin-message {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 10px;
  }

  .chat-hook-admin-avatar {
    width: 34px;
    height: 34px;
  }

  .chat-hook-live-media-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .chat-hook-live-media-row label,
  .chat-hook-live-media-row button {
    width: 100%;
    min-width: 0;
  }
}

@media (hover: none) and (pointer: coarse) {
  button:hover {
    transform: none;
  }
}
