:root{
  --bg:#07111f;
  --bg2:#0d1728;
  --card:#111d31;
  --card2:#16243d;
  --line:#263756;
  --text:#edf3ff;
  --muted:#92a3c2;
  --cyan:#67d5ff;
  --cyan2:#3db8ff;
  --green:#7ef0ae;
  --red:#ff8c8c;
  --shadow:0 20px 60px rgba(0,0,0,.35);
  --radius:22px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;font-family:Arial,sans-serif;background:linear-gradient(180deg,var(--bg),#040b16);color:var(--text)}
a{text-decoration:none;color:inherit}

.login-body{
  min-height:100vh;
  background:
    radial-gradient(circle at top right, rgba(103,213,255,.18), transparent 30%),
    radial-gradient(circle at bottom left, rgba(61,184,255,.14), transparent 28%),
    linear-gradient(180deg,var(--bg),#030914);
}

.login-screen{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}

.login-card{
  width:100%;
  max-width:460px;
  background:rgba(17,29,49,.92);
  border:1px solid var(--line);
  border-radius:28px;
  box-shadow:var(--shadow);
  padding:32px;
  backdrop-filter:blur(10px);
}

.login-logo{
  width:84px;
  height:84px;
  border-radius:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg,var(--cyan),var(--cyan2));
  color:#03101a;
  font-size:42px;
  margin-bottom:20px;
}

.login-title{
  margin:0 0 8px;
  font-size:34px;
  line-height:1.1;
}

.login-subtitle{
  margin:0 0 24px;
  color:var(--muted);
  font-size:15px;
}

.login-form{
  display:grid;
  gap:12px;
}

.login-form label{
  color:#c9d8f2;
  font-size:14px;
  font-weight:700;
}

.login-form input{
  width:100%;
  padding:14px 16px;
  border-radius:16px;
  border:1px solid var(--line);
  background:#0a1322;
  color:#fff;
  outline:none;
  font-size:15px;
}

.login-form input:focus{
  border-color:var(--cyan);
  box-shadow:0 0 0 4px rgba(103,213,255,.12);
}

.primary-btn,
.ghost-btn,
.danger-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:46px;
  padding:0 18px;
  border-radius:14px;
  font-weight:800;
  transition:.18s ease;
  border:none;
  cursor:pointer;
}

.primary-btn{
  background:linear-gradient(180deg,var(--cyan),var(--cyan2));
  color:#04111c;
}

.primary-btn:hover{transform:translateY(-1px)}

.full-btn{width:100%;margin-top:8px}

.alert-box{
  margin-top:18px;
  padding:14px 16px;
  border:1px solid rgba(255,140,140,.35);
  background:rgba(255,140,140,.08);
  color:#ffd0d0;
  border-radius:16px;
}

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

.topbar{
  position:sticky;
  top:0;
  z-index:50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 28px;
  background:rgba(9,17,31,.88);
  border-bottom:1px solid rgba(38,55,86,.8);
  backdrop-filter:blur(12px);
}

.brand-wrap{
  display:flex;
  align-items:center;
  gap:14px;
}

.brand-badge{
  width:48px;
  height:48px;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg,var(--cyan),var(--cyan2));
  color:#03101a;
  font-weight:900;
  font-size:22px;
}

.brand-title{
  font-size:20px;
  font-weight:900;
}

.brand-subtitle{
  font-size:13px;
  color:var(--muted);
}

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

.user-chip{
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#0c1525;
  color:#dce8ff;
  font-weight:700;
}

.ghost-btn{
  border:1px solid var(--line);
  background:#0c1525;
  color:#e8f2ff;
}

.ghost-btn:hover{
  border-color:var(--cyan);
  color:var(--cyan);
}

.danger-btn{
  border:1px solid rgba(255,140,140,.35);
  background:rgba(255,140,140,.08);
  color:#ffd0d0;
}

.page-wrap{
  max-width:1280px;
  margin:0 auto;
  padding:28px;
}

.hero-card{
  display:grid;
  grid-template-columns:1.4fr .6fr;
  gap:18px;
  background:linear-gradient(180deg,#12203a,#0f1b2f);
  border:1px solid var(--line);
  border-radius:30px;
  padding:28px;
  box-shadow:var(--shadow);
}

.eyebrow{
  color:var(--cyan);
  font-size:13px;
  font-weight:900;
  letter-spacing:1.4px;
}

.hero-title{
  margin:10px 0 10px;
  font-size:38px;
  line-height:1.1;
}

.hero-text{
  margin:0;
  color:var(--muted);
  max-width:780px;
  font-size:16px;
  line-height:1.8;
}

.hero-side{
  display:flex;
  align-items:center;
  justify-content:flex-end;
}

.stat-box{
  width:100%;
  min-height:160px;
  border-radius:26px;
  border:1px solid rgba(103,213,255,.22);
  background:radial-gradient(circle at top right, rgba(103,213,255,.18), transparent 40%), #0b1424;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}

.stat-number{
  font-size:52px;
  font-weight:900;
  color:var(--cyan);
  line-height:1;
}

.stat-label{
  margin-top:8px;
  color:var(--muted);
  font-size:14px;
}

.robot-strip{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  gap:14px;
  margin-top:22px;
}

.robot-chip-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:22px;
  padding:18px;
}

.robot-chip-title{
  font-size:18px;
  font-weight:800;
  margin-bottom:10px;
}

.robot-chip-meta{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:13px;
}

.robot-chip-sub{
  margin-top:10px;
  color:#bfd0ef;
  font-size:13px;
  line-height:1.7;
}

.cards-grid{
  margin-top:24px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:18px;
}

.hub-card{
  background:linear-gradient(180deg,var(--card),var(--card2));
  border:1px solid var(--line);
  border-radius:26px;
  padding:24px;
  min-height:250px;
  box-shadow:var(--shadow);
  transition:.2s ease;
}

.hub-card:hover{
  transform:translateY(-4px);
  border-color:rgba(103,213,255,.45);
  box-shadow:0 26px 70px rgba(0,0,0,.45);
}

.hub-icon{
  width:74px;
  height:74px;
  border-radius:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:36px;
  background:linear-gradient(180deg,var(--cyan),var(--cyan2));
  color:#04111c;
  margin-bottom:18px;
}

.hub-title{
  font-size:24px;
  font-weight:900;
  margin-bottom:10px;
}

.hub-desc{
  color:var(--muted);
  line-height:1.8;
  font-size:15px;
}

.section-hero{
  display:flex;
  align-items:center;
  gap:18px;
  margin-bottom:22px;
  padding:24px 26px;
  border-radius:28px;
  border:1px solid var(--line);
  background:linear-gradient(180deg,#12203a,#0f1b2f);
  box-shadow:var(--shadow);
}

.section-hero-icon{
  width:86px;
  height:86px;
  border-radius:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:42px;
  background:linear-gradient(180deg,var(--cyan),var(--cyan2));
  color:#04111c;
  flex:0 0 auto;
}

.section-hero-title{
  margin:6px 0 8px;
  font-size:34px;
  line-height:1.1;
}

.section-hero-text{
  margin:0;
  color:var(--muted);
  font-size:15px;
  line-height:1.8;
}

.details-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(360px,1fr));
  gap:18px;
}

.detail-card{
  background:linear-gradient(180deg,var(--card),var(--card2));
  border:1px solid var(--line);
  border-radius:26px;
  padding:22px;
  box-shadow:var(--shadow);
}

.detail-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:18px;
}

.detail-card-title{
  font-size:24px;
  font-weight:900;
  line-height:1.2;
}

.detail-card-sub{
  margin-top:6px;
  color:var(--muted);
  font-size:13px;
  word-break:break-word;
}

.info-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.info-item{
  padding:14px;
  border-radius:18px;
  background:#0c1525;
  border:1px solid var(--line);
  min-width:0;
}

.info-item.full-row{
  grid-column:1 / -1;
}

.info-label{
  font-size:12px;
  font-weight:800;
  letter-spacing:.3px;
  color:var(--muted);
  margin-bottom:8px;
  text-transform:uppercase;
}

.info-value{
  font-size:15px;
  font-weight:700;
  color:#eef4ff;
  line-height:1.7;
  word-break:break-word;
}

.mini-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:0 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  letter-spacing:.4px;
}

.mini-badge.good{
  background:rgba(126,240,174,.1);
  border:1px solid rgba(126,240,174,.28);
  color:var(--green);
}

.mini-badge.bad{
  background:rgba(255,140,140,.08);
  border:1px solid rgba(255,140,140,.28);
  color:var(--red);
}

.split-line{
  height:1px;
  background:var(--line);
  margin:18px 0;
}

.sub-block-title{
  font-size:14px;
  font-weight:900;
  color:var(--cyan);
  margin-bottom:14px;
  letter-spacing:.5px;
  text-transform:uppercase;
}

.control-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(380px,1fr));
  gap:18px;
}

.control-card{
  background:linear-gradient(180deg,var(--card),var(--card2));
  border:1px solid var(--line);
  border-radius:28px;
  padding:22px;
  box-shadow:var(--shadow);
}

.control-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:18px;
}

.status-stack{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:8px;
}

.camera-control-layout{
  display:grid;
  grid-template-columns:minmax(260px, 340px) 1fr;
  gap:16px;
  align-items:start;
}

.camera-box{
  position:relative;
  overflow:hidden;
  border-radius:22px;
  border:1px solid var(--line);
  background:#000;
  aspect-ratio:4/3;
}

.camera-box-small{
  max-width:340px;
  aspect-ratio:4/3;
}

.camera-frame{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
  background:#000;
}

.camera-overlay{
  position:absolute;
  left:14px;
  right:14px;
  bottom:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  background:rgba(4,10,20,.72);
  border:1px solid rgba(255,255,255,.08);
  color:#eaf3ff;
  font-size:12px;
  font-weight:800;
  backdrop-filter:blur(8px);
}

.camera-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}

.action-btn{
  min-width:120px;
}

.pad-wrap{
  margin-top:18px;
  padding:18px;
  border-radius:22px;
  background:#0c1525;
  border:1px solid var(--line);
}

.pad-wrap-tight{
  margin-top:0;
  min-height:100%;
}

.pad-title{
  font-size:14px;
  font-weight:900;
  color:var(--cyan);
  margin-bottom:14px;
  text-transform:uppercase;
  letter-spacing:.5px;
}

.dpad{
  width:100%;
  max-width:260px;
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
}

.dpad-btn{
  min-height:64px;
  border:none;
  border-radius:18px;
  background:#18243b;
  border:1px solid var(--line);
  color:#edf3ff;
  font-size:28px;
  font-weight:900;
  cursor:pointer;
  transition:.18s ease;
}

.dpad-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(103,213,255,.45);
  color:var(--cyan);
}

.center-btn{
  background:linear-gradient(180deg,var(--cyan),var(--cyan2));
  color:#04111c;
}

.position-box{
  margin-top:16px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
}

.position-item{
  padding:14px;
  border-radius:18px;
  background:#0c1525;
  border:1px solid var(--line);
}

.position-value{
  font-size:22px;
  font-weight:900;
  color:#edf3ff;
}

.position-value-small{
  font-size:14px;
  font-weight:900;
  color:#edf3ff;
  line-height:1.7;
}

.message-box{
  margin-top:14px;
  min-height:24px;
  color:#cfe2ff;
  font-size:14px;
  font-weight:700;
}

.section-card{
  background:linear-gradient(180deg,var(--card),var(--card2));
  border:1px solid var(--line);
  border-radius:30px;
  padding:34px;
  box-shadow:var(--shadow);
}

.section-icon{
  width:90px;
  height:90px;
  border-radius:26px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:46px;
  background:linear-gradient(180deg,var(--cyan),var(--cyan2));
  color:#04111c;
  margin-bottom:20px;
}

.section-title{
  margin:0 0 12px;
  font-size:36px;
}

.section-text{
  margin:0;
  color:var(--muted);
  font-size:16px;
  line-height:1.9;
}

.section-note{
  margin-top:18px;
  padding:18px 20px;
  border-radius:18px;
  background:#0c1525;
  border:1px solid var(--line);
  color:#d6e3fb;
}

.mini-list{
  margin-top:20px;
  display:grid;
  gap:12px;
}

.mini-list-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  padding:16px 18px;
  border-radius:18px;
  background:#0c1525;
  border:1px solid var(--line);
  color:#dce7fb;
}

.empty-box{
  margin-top:20px;
  padding:18px 20px;
  border-radius:18px;
  background:#0c1525;
  border:1px dashed var(--line);
  color:var(--muted);
}

.status-badge{
  padding:7px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  letter-spacing:.4px;
}

.status-badge.online{
  background:rgba(126,240,174,.1);
  border:1px solid rgba(126,240,174,.28);
  color:var(--green);
}

.status-badge.offline{
  background:rgba(255,140,140,.08);
  border:1px solid rgba(255,140,140,.28);
  color:var(--red);
}

@media (max-width: 980px){
  .hero-card{
    grid-template-columns:1fr;
  }

  .page-wrap{
    padding:18px;
  }

  .topbar{
    padding:16px 18px;
  }

  .hero-title{
    font-size:30px;
  }
}

@media (max-width: 920px){
  .camera-control-layout{
    grid-template-columns:1fr;
  }

  .camera-box-small{
    max-width:none;
  }
}

@media (max-width: 720px){
  .section-hero{
    flex-direction:column;
    align-items:flex-start;
  }

  .details-grid{
    grid-template-columns:1fr;
  }

  .info-grid{
    grid-template-columns:1fr;
  }

  .control-grid{
    grid-template-columns:1fr;
  }

  .position-box{
    grid-template-columns:1fr;
  }

  .control-card-head{
    flex-direction:column;
  }

  .status-stack{
    align-items:flex-start;
  }
}

@media (max-width: 640px){
  .login-card{
    padding:24px;
  }

  .hub-card{
    min-height:auto;
  }

  .section-card{
    padding:24px;
  }

  .section-title{
    font-size:28px;
  }
}

.modes-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(340px,1fr));
  gap:18px;
}

.mode-card{
  background:linear-gradient(180deg,var(--card),var(--card2));
  border:1px solid var(--line);
  border-radius:28px;
  padding:22px;
  box-shadow:var(--shadow);
}

.mode-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:18px;
}

.current-mode-box{
  padding:18px;
  border-radius:22px;
  background:#0c1525;
  border:1px solid var(--line);
  margin-bottom:16px;
}

.current-mode-value{
  font-size:28px;
  font-weight:900;
  color:var(--cyan);
  line-height:1.2;
}

.mode-buttons{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.mode-btn{
  min-height:56px;
  border:none;
  border-radius:18px;
  background:#18243b;
  border:1px solid var(--line);
  color:#edf3ff;
  font-size:14px;
  font-weight:900;
  letter-spacing:.5px;
  cursor:pointer;
  transition:.18s ease;
}

.mode-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(103,213,255,.45);
  color:var(--cyan);
}

.mode-btn.active{
  background:linear-gradient(180deg,var(--cyan),var(--cyan2));
  color:#04111c;
  border-color:transparent;
}

@media (max-width: 720px){
  .modes-grid{
    grid-template-columns:1fr;
  }

  .mode-card-head{
    flex-direction:column;
  }

  .mode-buttons{
    grid-template-columns:1fr;
  }
}

.current-mode-panel{
  display:flex;
  align-items:center;
  gap:16px;
  padding:18px;
  border-radius:22px;
  background:#0c1525;
  border:1px solid var(--line);
  margin-bottom:16px;
}

.current-mode-icon{
  width:72px;
  height:72px;
  border-radius:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:34px;
  background:linear-gradient(180deg,var(--cyan),var(--cyan2));
  color:#04111c;
  flex:0 0 auto;
}

.mode-tile-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.mode-tile{
  min-height:132px;
  padding:16px;
  border:none;
  border-radius:22px;
  background:#18243b;
  border:1px solid var(--line);
  color:#edf3ff;
  cursor:pointer;
  transition:.18s ease;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-start;
  text-align:left;
}

.mode-tile:hover{
  transform:translateY(-2px);
  border-color:rgba(103,213,255,.45);
}

.mode-tile.active{
  background:linear-gradient(180deg, rgba(103,213,255,.22), rgba(61,184,255,.14));
  border-color:rgba(103,213,255,.55);
  box-shadow:0 14px 30px rgba(0,0,0,.25);
}

.mode-tile-icon{
  width:52px;
  height:52px;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
  background:#0c1525;
  margin-bottom:12px;
}

.mode-tile.active .mode-tile-icon{
  background:linear-gradient(180deg,var(--cyan),var(--cyan2));
  color:#04111c;
}

.mode-tile-title{
  font-size:15px;
  font-weight:900;
  letter-spacing:.4px;
  margin-bottom:6px;
}

.mode-tile-desc{
  font-size:13px;
  line-height:1.6;
  color:var(--muted);
}

@media (max-width: 720px){
  .current-mode-panel{
    flex-direction:column;
    align-items:flex-start;
  }

  .mode-tile-grid{
    grid-template-columns:1fr;
  }
}

.secondary-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:46px;
  padding:0 18px;
  border-radius:14px;
  font-weight:800;
  transition:.18s ease;
  border:1px solid var(--line);
  background:#0c1525;
  color:#e8f2ff;
  cursor:pointer;
}

.secondary-btn:hover{
  border-color:var(--cyan);
  color:var(--cyan);
  transform:translateY(-1px);
}

.calibration-box{
  margin-top:16px;
  padding:18px;
  border-radius:22px;
  background:#0c1525;
  border:1px solid var(--line);
}

.raw-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-bottom:14px;
}

.raw-btn{
  min-height:52px;
}

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

@media (max-width: 720px){
  .raw-grid{
    grid-template-columns:1fr;
  }
}

.sip-grid-v2{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(420px,1fr));
  gap:18px;
}

.sip-card-v2{
  background:linear-gradient(180deg,var(--card),var(--card2));
  border:1px solid var(--line);
  border-radius:28px;
  padding:22px;
  box-shadow:var(--shadow);
}

.sip-status-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-bottom:16px;
}

.sip-status-item{
  padding:14px;
  border-radius:18px;
  background:#0c1525;
  border:1px solid var(--line);
}

.sip-status-item.full-row{
  grid-column:1 / -1;
}

.sip-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-bottom:16px;
}

.sip-form-item{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.form-label{
  font-size:12px;
  font-weight:800;
  letter-spacing:.3px;
  color:var(--muted);
  text-transform:uppercase;
}

.form-input{
  width:100%;
  min-height:48px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid var(--line);
  background:#0a1322;
  color:#fff;
  outline:none;
  font-size:14px;
}

.form-input:focus{
  border-color:var(--cyan);
  box-shadow:0 0 0 4px rgba(103,213,255,.12);
}

.sip-action-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

@media (max-width: 820px){
  .sip-grid-v2{
    grid-template-columns:1fr;
  }

  .sip-status-grid{
    grid-template-columns:1fr;
  }

  .sip-form-grid{
    grid-template-columns:1fr;
  }
}

.sip-top-layout{
  display:grid;
  grid-template-columns:1fr 360px;
  gap:16px;
  margin-bottom:16px;
  align-items:start;
}

.dialer-panel{
  padding:16px;
  border-radius:22px;
  background:#0c1525;
  border:1px solid var(--line);
}

.dialer-display-wrap{
  margin-bottom:14px;
}

.dialer-display{
  width:100%;
  min-height:56px;
  padding:14px 16px;
  border-radius:18px;
  border:1px solid var(--line);
  background:#08111f;
  color:#fff;
  outline:none;
  font-size:22px;
  font-weight:900;
  letter-spacing:1px;
}

.dialpad-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-bottom:12px;
}

.dialpad-btn{
  min-height:62px;
  border:none;
  border-radius:18px;
  background:#18243b;
  border:1px solid var(--line);
  color:#edf3ff;
  font-size:24px;
  font-weight:900;
  cursor:pointer;
  transition:.18s ease;
}

.dialpad-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(103,213,255,.45);
  color:var(--cyan);
}

.dialer-mini-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

.sip-action-row-big .action-btn{
  min-width:140px;
}

.sip-config-panel{
  padding:18px;
  border-radius:22px;
  background:#0c1525;
  border:1px solid var(--line);
}

.sip-config-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

@media (max-width: 980px){
  .sip-top-layout{
    grid-template-columns:1fr;
  }
}

.sip-phone-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(390px,1fr));
  gap:18px;
}

.phone-card{
  position:relative;
}

.phone-shell{
  position:relative;
  padding:18px;
  border-radius:34px;
  background:linear-gradient(180deg,#151f33,#10192c);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  overflow:hidden;
}

.phone-shell::before{
  content:"";
  display:block;
  width:120px;
  height:22px;
  border-radius:0 0 18px 18px;
  background:#0a1322;
  margin:0 auto 16px auto;
}

.phone-statusbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.phone-left-status{
  display:flex;
  align-items:center;
  gap:10px;
}

.phone-status-text{
  font-size:12px;
  font-weight:900;
  letter-spacing:.5px;
  color:var(--muted);
}

.signal-bars{
  display:flex;
  align-items:flex-end;
  gap:4px;
  height:20px;
}

.signal-bars span{
  width:6px;
  border-radius:999px;
  background:#33445f;
}

.signal-bars span:nth-child(1){height:6px}
.signal-bars span:nth-child(2){height:10px}
.signal-bars span:nth-child(3){height:14px}
.signal-bars span:nth-child(4){height:18px}

.signal-bars.low span:nth-child(1){background:var(--cyan)}
.signal-bars.mid span:nth-child(1),
.signal-bars.mid span:nth-child(2){background:var(--cyan)}
.signal-bars.full span{background:var(--cyan)}
.signal-bars.off span{background:#33445f}

.gear-btn{
  width:46px;
  height:46px;
  border:none;
  border-radius:16px;
  background:#0c1525;
  border:1px solid var(--line);
  color:#edf3ff;
  font-size:20px;
  cursor:pointer;
  transition:.18s ease;
}

.gear-btn:hover{
  transform:rotate(20deg);
  border-color:rgba(103,213,255,.45);
}

.phone-title-block{
  margin-bottom:14px;
}

.phone-robot-name{
  font-size:24px;
  font-weight:900;
  line-height:1.2;
}

.phone-robot-id{
  margin-top:4px;
  color:var(--muted);
  font-size:13px;
  word-break:break-word;
}

.phone-state-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

.state-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:36px;
  padding:0 12px;
  border-radius:999px;
  background:#0c1525;
  border:1px solid var(--line);
  color:#dbe8ff;
  font-size:12px;
  font-weight:800;
}

.state-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  display:inline-block;
}

.state-dot.on{
  background:var(--green);
  box-shadow:0 0 10px rgba(126,240,174,.55);
}

.state-dot.off{
  background:var(--red);
  box-shadow:0 0 10px rgba(255,140,140,.35);
}

.phone-screen{
  padding:16px;
  border-radius:24px;
  background:#08111f;
  border:1px solid var(--line);
  margin-bottom:14px;
}

.phone-screen-label{
  font-size:12px;
  font-weight:900;
  letter-spacing:.4px;
  color:var(--muted);
  text-transform:uppercase;
  margin-bottom:8px;
}

.phone-number-display{
  width:100%;
  min-height:60px;
  border:none;
  background:transparent;
  color:#fff;
  outline:none;
  font-size:28px;
  font-weight:900;
  letter-spacing:1px;
}

.phone-screen-sub{
  min-height:22px;
  color:#9eb1d4;
  font-size:13px;
  line-height:1.6;
}

.phone-keypad{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-bottom:14px;
}

.phone-key-btn{
  min-height:76px;
  border:none;
  border-radius:22px;
  background:#18243b;
  border:1px solid var(--line);
  color:#edf3ff;
  cursor:pointer;
  transition:.18s ease;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
}

.phone-key-btn strong{
  font-size:28px;
  line-height:1;
}

.phone-key-btn small{
  font-size:11px;
  color:var(--muted);
  letter-spacing:.6px;
}

.phone-key-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(103,213,255,.45);
  color:var(--cyan);
}

.phone-mini-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

.phone-main-actions{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-bottom:14px;
}

.phone-action{
  min-height:66px;
  border:none;
  border-radius:22px;
  cursor:pointer;
  font-size:28px;
  font-weight:900;
  transition:.18s ease;
}

.phone-action:hover{
  transform:translateY(-1px) scale(1.02);
}

.phone-action.answer{
  background:#18243b;
  border:1px solid var(--line);
  color:#eaf3ff;
}

.phone-action.dial{
  background:linear-gradient(180deg,#6df3ae,#3fd286);
  color:#082013;
}

.phone-action.hangup{
  background:linear-gradient(180deg,#ff9c9c,#f06c6c);
  color:#2a0909;
}

.phone-bottom-action{
  display:flex;
}

.wide-btn{
  width:100%;
}

.sip-modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(4,10,20,.72);
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:9999;
  backdrop-filter:blur(8px);
}

.sip-modal-overlay.show{
  display:flex;
}

.sip-modal-box{
  width:100%;
  max-width:620px;
  background:linear-gradient(180deg,#151f33,#10192c);
  border:1px solid var(--line);
  border-radius:30px;
  box-shadow:0 24px 80px rgba(0,0,0,.45);
  padding:22px;
}

.sip-modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
}

.sip-modal-title{
  font-size:24px;
  font-weight:900;
}

.sip-modal-sub{
  margin-top:4px;
  color:var(--muted);
  font-size:13px;
}

.sip-close-btn{
  width:44px;
  height:44px;
  border:none;
  border-radius:14px;
  background:#0c1525;
  border:1px solid var(--line);
  color:#edf3ff;
  cursor:pointer;
}

.sip-close-btn:hover{
  border-color:rgba(255,140,140,.35);
  color:#ffd0d0;
}

.full-span{
  grid-column:1 / -1;
}

.sip-modal-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  flex-wrap:wrap;
  margin-top:14px;
}

@media (max-width: 820px){
  .sip-phone-grid{
    grid-template-columns:1fr;
  }

  .phone-main-actions{
    grid-template-columns:1fr 1fr 1fr;
  }
}

@media (max-width: 640px){
  .phone-state-row{
    flex-direction:column;
  }

  .phone-mini-actions{
    flex-direction:column;
  }

  .phone-main-actions{
    grid-template-columns:1fr;
  }

  .sip-modal-actions{
    flex-direction:column;
  }
}

.compact-phone{
  padding:14px;
  border-radius:28px;
}

.phone-top-title{
  margin-bottom:10px;
}

.compact-statusbar{
  margin-bottom:10px;
}

.phone-statusbar-right{
  display:flex;
  align-items:center;
  gap:8px;
}

.compact-gear{
  width:40px;
  height:40px;
  border-radius:14px;
  font-size:18px;
}

.compact-state-row{
  margin-bottom:10px;
}

.compact-screen{
  padding:12px 14px;
  border-radius:20px;
  margin-bottom:10px;
}

.compact-display{
  min-height:46px;
  font-size:24px;
}

.compact-keypad{
  gap:10px;
  margin-bottom:10px;
}

.compact-key{
  min-height:64px;
  border-radius:18px;
}

.compact-key strong{
  font-size:24px;
}

.compact-mini-actions{
  margin-bottom:10px;
}

.compact-main-actions{
  gap:10px;
  margin-bottom:10px;
}

.compact-bottom-action{
  margin-bottom:8px;
}

.exact-icon-btn{
  display:flex;
  align-items:center;
  justify-content:center;
}

.phone-svg-icon{
  width:26px;
  height:26px;
  display:block;
}

.phone-action.answer .phone-svg-icon{
  transform:rotate(180deg);
}

.phone-action.hangup .phone-svg-icon{
  transform:rotate(0deg);
}

.phone-action.dial .phone-svg-icon{
  width:24px;
  height:24px;
}

@media (max-width: 640px){
  .compact-key{
    min-height:58px;
  }

  .compact-display{
    font-size:20px;
  }
}

.two-main-actions{
  grid-template-columns:1.35fr .9fr;
}

.big-call-btn{
  min-height:72px;
}

@media (max-width: 640px){
  .two-main-actions{
    grid-template-columns:1fr;
  }
}

.eye-color-panel{
  margin-top:16px;
  padding:18px;
  border-radius:22px;
  background:#0c1525;
  border:1px solid var(--line);
}

.eye-color-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}

.eye-color-name{
  font-size:24px;
  font-weight:900;
  color:var(--cyan);
  line-height:1.2;
}

.eye-preview{
  width:64px;
  height:64px;
  border-radius:20px;
  border:2px solid rgba(255,255,255,.08);
  box-shadow:0 0 18px rgba(0,0,0,.25) inset;
  flex:0 0 auto;
}

.color-palette-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.color-chip{
  width:100%;
  min-height:54px;
  border:none;
  border-radius:18px;
  cursor:pointer;
  border:2px solid transparent;
  transition:.18s ease;
}

.color-chip:hover{
  transform:translateY(-1px);
}

.color-chip.active{
  border-color:#ffffff;
  box-shadow:0 0 0 4px rgba(255,255,255,.08);
}

.eye-color-note{
  margin-top:12px;
  color:var(--muted);
  font-size:13px;
  line-height:1.6;
}

.color-chip.cyan,
.eye-preview.cyan{
  background:linear-gradient(180deg,#67d5ff,#3db8ff);
}

.color-chip.blue,
.eye-preview.blue{
  background:linear-gradient(180deg,#7ea8ff,#436dff);
}

.color-chip.green,
.eye-preview.green{
  background:linear-gradient(180deg,#78f0b0,#31c776);
}

.color-chip.purple,
.eye-preview.purple{
  background:linear-gradient(180deg,#c091ff,#7a48eb);
}

.color-chip.pink,
.eye-preview.pink{
  background:linear-gradient(180deg,#ff9cd8,#ef57b0);
}

.color-chip.amber,
.eye-preview.amber{
  background:linear-gradient(180deg,#ffc46b,#e6941d);
}

.color-chip.red,
.eye-preview.red{
  background:linear-gradient(180deg,#ff8f8f,#e24c4c);
}

.color-chip.white,
.eye-preview.white{
  background:linear-gradient(180deg,#f5f7fb,#cfd8ea);
}

@media (max-width: 720px){
  .color-palette-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .eye-color-head{
    align-items:flex-start;
    flex-direction:column;
  }
}

.move-help-text{
  margin-bottom:14px;
  color:var(--muted);
  font-size:13px;
  line-height:1.6;
}

.hold-btn{
  user-select:none;
  -webkit-user-select:none;
  touch-action:manipulation;
}

.calibration-box.collapsed{
  display:none;
}

/* ===== AI Chat History ===== */
.history-filter-card{
  background:linear-gradient(180deg,var(--card),var(--card2));
  border:1px solid var(--line);
  border-radius:26px;
  padding:22px;
  box-shadow:var(--shadow);
  margin-bottom:18px;
}

.history-filter-form{
  display:grid;
  grid-template-columns:1fr 260px auto;
  gap:14px;
  align-items:end;
}

.history-field{
  display:flex;
  flex-direction:column;
  gap:8px;
}

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

.history-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin:18px 0;
  padding:14px 18px;
  border-radius:18px;
  background:#0c1525;
  border:1px solid var(--line);
  color:#dce8ff;
}

.chat-history-list{
  display:grid;
  gap:16px;
}

.chat-history-card{
  background:linear-gradient(180deg,var(--card),var(--card2));
  border:1px solid var(--line);
  border-radius:26px;
  padding:20px;
  box-shadow:var(--shadow);
}

.chat-history-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
  padding-bottom:14px;
  border-bottom:1px solid var(--line);
}

.chat-robot-name{
  font-size:20px;
  font-weight:900;
  color:var(--cyan);
}

.chat-meta{
  margin-top:6px;
  color:var(--muted);
  font-size:13px;
  direction:ltr;
  text-align:left;
}

.chat-time-box{
  min-width:140px;
  padding:12px 14px;
  border-radius:18px;
  background:#0c1525;
  border:1px solid var(--line);
  text-align:center;
}

.chat-date{
  font-size:13px;
  color:var(--muted);
  font-weight:800;
}

.chat-time{
  margin-top:4px;
  font-size:22px;
  font-weight:900;
  color:#edf3ff;
}

.chat-bubble{
  margin-top:12px;
  padding:16px;
  border-radius:20px;
  border:1px solid var(--line);
  background:#0c1525;
}

.user-bubble{
  border-color:rgba(103,213,255,.25);
}

.ai-bubble{
  border-color:rgba(126,240,174,.25);
}

.chat-label{
  font-size:12px;
  font-weight:900;
  color:var(--muted);
  margin-bottom:8px;
  text-transform:uppercase;
}

.chat-text{
  white-space:pre-wrap;
  line-height:1.9;
  font-size:15px;
  color:#edf3ff;
}

.pagination-row{
  margin-top:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
}

.page-pill{
  min-height:42px;
  padding:10px 16px;
  border-radius:999px;
  background:#0c1525;
  border:1px solid var(--line);
  color:#dce8ff;
  font-weight:900;
}

.disabled-link{
  opacity:.45;
  pointer-events:none;
}

@media (max-width: 860px){
  .history-filter-form{
    grid-template-columns:1fr;
  }

  .chat-history-head{
    flex-direction:column;
  }

  .chat-time-box{
    width:100%;
    text-align:right;
  }
}

/* ===== Pretty AI Chat History V2 ===== */
.ai-history-hero{
  position:relative;
  overflow:hidden;
  display:grid;
  grid-template-columns:auto 1fr 180px;
  gap:20px;
  align-items:center;
  margin-bottom:22px;
  padding:28px;
  border-radius:32px;
  border:1px solid rgba(103,213,255,.22);
  background:
    radial-gradient(circle at 15% 20%, rgba(103,213,255,.22), transparent 30%),
    radial-gradient(circle at 85% 80%, rgba(126,240,174,.12), transparent 28%),
    linear-gradient(180deg,#14233f,#0d182b);
  box-shadow:var(--shadow);
}

.ai-history-hero-glow{
  position:absolute;
  width:260px;
  height:260px;
  border-radius:999px;
  background:rgba(103,213,255,.14);
  filter:blur(30px);
  left:-80px;
  top:-90px;
  pointer-events:none;
}

.ai-history-hero-icon{
  position:relative;
  width:96px;
  height:96px;
  border-radius:28px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:46px;
  background:linear-gradient(180deg,var(--cyan),var(--cyan2));
  color:#04111c;
  box-shadow:0 18px 40px rgba(61,184,255,.18);
}

.ai-history-hero-content{
  position:relative;
}

.ai-history-hero-content h1{
  margin:8px 0 10px;
  font-size:38px;
  line-height:1.15;
}

.ai-history-hero-content p{
  margin:0;
  color:var(--muted);
  font-size:15px;
  line-height:1.9;
  max-width:780px;
}

.ai-history-hero-stat{
  position:relative;
  min-height:130px;
  border-radius:26px;
  background:rgba(12,21,37,.72);
  border:1px solid rgba(103,213,255,.18);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}

.pretty-filter{
  padding:20px;
  border-radius:30px;
  background:
    linear-gradient(180deg,rgba(17,29,49,.96),rgba(22,36,61,.96));
}

.pretty-filter-form{
  grid-template-columns:1fr 320px auto;
}

.pretty-select,
.pretty-date{
  min-height:54px;
  border-radius:18px;
  font-weight:800;
}

.date-picker-wrap{
  position:relative;
  display:flex;
  align-items:center;
}

.date-picker-wrap .pretty-date{
  padding-left:58px;
}

.date-icon-btn{
  position:absolute;
  left:8px;
  width:42px;
  height:42px;
  border:none;
  border-radius:14px;
  cursor:pointer;
  background:linear-gradient(180deg,var(--cyan),var(--cyan2));
  color:#04111c;
  font-size:20px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.date-icon-btn:hover{
  transform:translateY(-1px);
}

.date-quick-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:8px;
}

.tiny-chip-btn{
  min-height:32px;
  padding:7px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#0c1525;
  color:#dce8ff;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}

.tiny-chip-btn:hover{
  border-color:var(--cyan);
  color:var(--cyan);
}

.pretty-history-actions{
  align-items:end;
}

.pretty-summary{
  background:
    linear-gradient(180deg,rgba(12,21,37,.96),rgba(9,17,31,.96));
}

.pretty-summary > div{
  display:flex;
  align-items:center;
  gap:8px;
}

.summary-label{
  color:var(--muted);
  font-size:13px;
  font-weight:900;
}

.summary-muted{
  color:var(--muted);
}

.pretty-chat-list{
  gap:18px;
}

.pretty-chat-card{
  position:relative;
  overflow:hidden;
  border-radius:30px;
  padding:22px;
  border:1px solid rgba(103,213,255,.14);
  background:
    radial-gradient(circle at top left, rgba(103,213,255,.10), transparent 28%),
    linear-gradient(180deg,var(--card),var(--card2));
}

.pretty-chat-card::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(90deg,rgba(103,213,255,.10),transparent 30%,rgba(126,240,174,.06));
  opacity:.7;
}

.pretty-chat-head{
  position:relative;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
}

.chat-avatar{
  width:58px;
  height:58px;
  border-radius:20px;
  background:#0c1525;
  border:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
}

.chat-head-main{
  min-width:0;
}

.pretty-time-box{
  min-width:160px;
  background:rgba(8,17,31,.88);
}

.pretty-bubble{
  position:relative;
  border-radius:24px;
  background:rgba(12,21,37,.88);
}

.user-bubble.pretty-bubble{
  border-color:rgba(103,213,255,.28);
}

.ai-bubble.pretty-bubble{
  border-color:rgba(126,240,174,.28);
}

.user-bubble .chat-label{
  color:var(--cyan);
}

.ai-bubble .chat-label{
  color:var(--green);
}

.pretty-pagination{
  padding:18px 0 4px;
}

.pretty-empty-box{
  margin-top:22px;
  padding:36px 24px;
  border-radius:30px;
  border:1px dashed rgba(103,213,255,.28);
  background:rgba(12,21,37,.72);
  text-align:center;
  box-shadow:var(--shadow);
}

.pretty-empty-icon{
  font-size:54px;
  margin-bottom:12px;
}

.pretty-empty-title{
  font-size:24px;
  font-weight:900;
  color:#edf3ff;
  margin-bottom:8px;
}

.pretty-empty-text{
  color:var(--muted);
  line-height:1.8;
}

@media (max-width: 980px){
  .ai-history-hero{
    grid-template-columns:1fr;
  }

  .ai-history-hero-stat{
    min-height:110px;
  }

  .pretty-filter-form{
    grid-template-columns:1fr;
  }

  .pretty-chat-head{
    grid-template-columns:auto 1fr;
  }

  .pretty-time-box{
    grid-column:1 / -1;
    width:100%;
    margin-top:12px;
  }
}

@media (max-width: 640px){
  .ai-history-hero{
    padding:22px;
  }

  .ai-history-hero-content h1{
    font-size:28px;
  }

  .chat-meta{
    direction:rtl;
    text-align:right;
  }
}

/* ===== AI Chat History Filter Layout Fix ===== */
.history-filter-card.pretty-filter{
  direction:rtl;
}

.history-filter-form.pretty-filter-form{
  display:grid !important;
  grid-template-columns:minmax(280px, 1.2fr) minmax(240px, .8fr) auto !important;
  gap:14px !important;
  align-items:end !important;
}

.history-filter-form .history-field{
  min-width:0;
}

.history-filter-form .history-actions,
.pretty-history-actions{
  display:flex !important;
  flex-direction:row !important;
  align-items:end !important;
  justify-content:flex-start !important;
  gap:10px !important;
  white-space:nowrap;
}

.date-picker-wrap{
  width:100%;
}

.date-picker-wrap .pretty-date{
  width:100%;
}

@media (max-width: 900px){
  .history-filter-form.pretty-filter-form{
    grid-template-columns:1fr !important;
  }

  .history-filter-form .history-actions,
  .pretty-history-actions{
    white-space:normal;
    flex-wrap:wrap;
  }
}

/* ===== AI Chat History Search + Filter Final Fix ===== */
.history-filter-form.ai-history-filter-4{
  display:grid !important;
  grid-template-columns:minmax(260px,1.1fr) minmax(220px,.75fr) minmax(260px,1fr) auto !important;
  gap:14px !important;
  align-items:end !important;
}

.pretty-search{
  min-height:54px;
  border-radius:18px;
  font-weight:800;
}

.history-filter-form.ai-history-filter-4 .history-actions{
  display:flex !important;
  flex-direction:row !important;
  align-items:end !important;
  justify-content:flex-start !important;
  gap:10px !important;
  white-space:nowrap;
}

.history-filter-form.ai-history-filter-4 .primary-btn,
.history-filter-form.ai-history-filter-4 .secondary-btn{
  min-width:92px;
}

@media (max-width: 1120px){
  .history-filter-form.ai-history-filter-4{
    grid-template-columns:1fr 1fr !important;
  }

  .history-filter-form.ai-history-filter-4 .history-actions{
    grid-column:1 / -1;
  }
}

@media (max-width: 700px){
  .history-filter-form.ai-history-filter-4{
    grid-template-columns:1fr !important;
  }

  .history-filter-form.ai-history-filter-4 .history-actions{
    grid-column:auto;
    flex-wrap:wrap;
  }
}

/* ===== Googooli AI Panel ===== */
.ai-panel-hero{
  display:flex;
  align-items:center;
  gap:20px;
  margin-bottom:22px;
  padding:28px;
  border-radius:32px;
  border:1px solid rgba(103,213,255,.22);
  background:
    radial-gradient(circle at 12% 18%, rgba(103,213,255,.20), transparent 32%),
    radial-gradient(circle at 85% 80%, rgba(126,240,174,.10), transparent 28%),
    linear-gradient(180deg,#14233f,#0d182b);
  box-shadow:var(--shadow);
}

.ai-panel-icon{
  width:96px;
  height:96px;
  border-radius:28px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:48px;
  background:linear-gradient(180deg,var(--cyan),var(--cyan2));
  color:#04111c;
  flex:0 0 auto;
}

.ai-panel-hero h1{
  margin:8px 0 10px;
  font-size:38px;
}

.ai-panel-hero p{
  margin:0;
  color:var(--muted);
  line-height:1.9;
}

.ai-panel-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 360px;
  gap:18px;
  align-items:start;
}

.ai-chat-card,
.ai-side-card{
  background:linear-gradient(180deg,var(--card),var(--card2));
  border:1px solid var(--line);
  border-radius:30px;
  padding:22px;
  box-shadow:var(--shadow);
}

.ai-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
}

.ai-card-title{
  font-size:24px;
  font-weight:900;
  color:#edf3ff;
}

.ai-card-sub{
  margin-top:6px;
  color:var(--muted);
  font-size:14px;
  line-height:1.8;
}

.ai-form-row{
  margin-bottom:14px;
}

.ai-field{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.ai-chat-box{
  height:480px;
  overflow:auto;
  padding:18px;
  border-radius:24px;
  border:1px solid var(--line);
  background:#08111f;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.ai-welcome{
  margin:auto;
  text-align:center;
  color:var(--muted);
}

.ai-welcome-icon{
  font-size:56px;
  margin-bottom:10px;
}

.ai-welcome-title{
  font-size:24px;
  font-weight:900;
  color:#edf3ff;
  margin-bottom:8px;
}

.ai-welcome-text{
  font-size:14px;
}

.ai-live-bubble{
  max-width:85%;
  padding:14px 16px;
  border-radius:22px;
  border:1px solid var(--line);
  background:#0c1525;
  line-height:1.9;
  white-space:pre-wrap;
}

.ai-live-user{
  align-self:flex-start;
  border-color:rgba(103,213,255,.32);
}

.ai-live-bot{
  align-self:flex-end;
  border-color:rgba(126,240,174,.32);
}

.ai-live-label{
  font-size:12px;
  font-weight:900;
  color:var(--muted);
  margin-bottom:6px;
}

.ai-live-user .ai-live-label{
  color:var(--cyan);
}

.ai-live-bot .ai-live-label{
  color:var(--green);
}

.ai-live-text{
  color:#edf3ff;
  font-size:15px;
}

.ai-input-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:12px;
  margin-top:14px;
  align-items:stretch;
}

.ai-message-input{
  width:100%;
  resize:vertical;
  min-height:72px;
  max-height:180px;
  padding:14px 16px;
  border-radius:20px;
  border:1px solid var(--line);
  background:#0a1322;
  color:#fff;
  outline:none;
  font-size:15px;
  line-height:1.8;
}

.ai-message-input:focus{
  border-color:var(--cyan);
  box-shadow:0 0 0 4px rgba(103,213,255,.12);
}

.ai-send-btn{
  min-width:110px;
  height:auto;
}

.ai-call-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}

.ai-note-box{
  margin-top:18px;
  padding:14px 16px;
  border-radius:18px;
  border:1px solid rgba(103,213,255,.18);
  background:#0c1525;
  color:#dce8ff;
  line-height:1.8;
  font-size:13px;
}

@media (max-width: 980px){
  .ai-panel-layout{
    grid-template-columns:1fr;
  }

  .ai-panel-hero{
    flex-direction:column;
    align-items:flex-start;
  }

  .ai-chat-box{
    height:420px;
  }
}

@media (max-width: 640px){
  .ai-input-row{
    grid-template-columns:1fr;
  }

  .ai-live-bubble{
    max-width:100%;
  }

  .ai-panel-hero h1{
    font-size:28px;
  }
}

/* ===== Googooli AI Voice Web Fix ===== */
.ai-chat-card-wide{
  max-width:980px;
  margin:0 auto;
}

.voice-control-panel{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin:14px 0;
  padding:14px;
  border-radius:22px;
  border:1px solid var(--line);
  background:#0c1525;
}

.voice-main-btn{
  min-width:150px;
}

.voice-toggle{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#08111f;
  color:#dce8ff;
  font-size:13px;
  font-weight:800;
}

.voice-toggle input{
  width:18px;
  height:18px;
}

.voice-status{
  flex:1;
  min-width:220px;
  color:var(--muted);
  font-size:13px;
  line-height:1.6;
}

@media (max-width: 700px){
  .voice-control-panel{
    flex-direction:column;
    align-items:stretch;
  }

  .voice-status{
    min-width:0;
  }
}

/* ===== Server STT Voice Meter ===== */
.voice-meter-wrap{
  margin:10px 0 14px;
  padding:12px 14px;
  border-radius:18px;
  background:#0c1525;
  border:1px solid var(--line);
}

.voice-meter-bg{
  height:12px;
  width:100%;
  overflow:hidden;
  border-radius:999px;
  background:#07111f;
  border:1px solid rgba(255,255,255,.06);
}

.voice-meter-fill{
  height:100%;
  width:0%;
  border-radius:999px;
  background:linear-gradient(90deg,var(--cyan),var(--green));
  transition:width .08s linear;
}

.voice-meter-text{
  margin-top:8px;
  color:var(--muted);
  font-size:12px;
  line-height:1.6;
}
