/* Enterprise B theme (Deep Gray + Tech Blue) */
:root{
      --bg:#0A0F1C;
      --panel:#101827;
      --card:#111E33;
      --text:#F3F7FF;
      --muted:rgba(243,247,255,.78);
      --line:rgba(255,255,255,.10);
      --brand:#2563EB;
      --brand2:#22D3EE;
      --shadow:0 18px 60px rgba(0,0,0,.45);
      --radius:18px;
      /* bottom offset sync */
      --bottom-bar-h: 72px;  /* fallback */
      --float-gap: 12px;     /* gap between bottom-bar and floating widgets */
    }
    *{box-sizing:border-box}
    body{
      margin:0;
      font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "PingFang SC","Noto Sans CJK SC","Microsoft YaHei",sans-serif;
      background:
        radial-gradient(1200px 600px at 20% -10%, rgba(37,99,235,.18), transparent 60%),
        radial-gradient(800px 500px at 90% 0%, rgba(37,99,235,.18), transparent 55%),
        var(--bg);
      color:var(--text);
    }
    a{color:inherit}
    code{color:#bfe7ff}
    .container{max-width:1120px;margin:0 auto;padding:0 18px}

    .nav{
      position:sticky; top:0; z-index:50;
      backdrop-filter: blur(10px);
      background:rgba(10,15,28,.78);
      border-bottom:1px solid rgba(255,255,255,.08);
    }
    .nav-inner{
      display:flex; align-items:center; justify-content:space-between;
      gap:12px; padding:12px 0;
    }
    .brand{
      display:flex; align-items:center; gap:10px; min-width:240px;
    }

    /* Logo now uses generated image */
    .logo{
      width:38px;height:38px;border-radius:12px;
      background:rgba(255,255,255,.06);
      border:1px solid rgba(255,255,255,.14);
      box-shadow:0 14px 40px rgba(37,99,235,.18);
      display:grid; place-items:center;
      overflow:hidden;
    }
    .logo img{width:100%;height:100%;object-fit:contain;display:block}

    .brand h1{font-size:15px; margin:0; line-height:1.15}
    .brand p{margin:2px 0 0; font-size:12px; color:var(--muted)}
    .nav-right{display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end}

    .pill{
      display:inline-flex; align-items:center; gap:8px;
      padding:10px 12px; border-radius:999px;
      border:1px solid rgba(255,255,255,.14);
      background:rgba(255,255,255,.06);
      text-decoration:none;
      font-size:13px;
      white-space:nowrap;
    }
    .pill.primary{
      background:linear-gradient(135deg,var(--brand),var(--brand2));
      color:#07101f; font-weight:900;
      border-color:transparent;
    }
    .pill.ghost{background:transparent}

    .select-mini{
      padding:10px 12px; border-radius:999px;
      border:1px solid rgba(255,255,255,.14);
      background:rgba(255,255,255,.06);
      color:var(--text);
      font-size:13px;
      outline:none;
    }

    .hero{padding:26px 0 18px}
    .hero-grid{display:grid; grid-template-columns: 1.15fr .85fr; gap:16px;}
    @media (max-width: 980px){ .hero-grid{grid-template-columns:1fr} .brand{min-width:auto} }

    .panel{
      border:1px solid rgba(37,99,235,.18);
      background:rgba(16,24,39,.78);
      box-shadow:var(--shadow);
      border-radius:var(--radius);
      overflow:hidden;
    }

    .hero-left{padding:18px}
    .badge{
      display:inline-flex; align-items:center; gap:8px;
      padding:7px 10px; border-radius:999px;
      font-size:12px; font-weight:900;
      border:1px solid rgba(255,255,255,.14);
      background:rgba(255,255,255,.06);
    }
    .badge.brand{border-color:rgba(37,99,235,.18); background:rgba(37,99,235,.18);}

    .headline{font-size:34px; margin:12px 0 10px; line-height:1.12}
    .sub{color:var(--muted); margin:0 0 14px; font-size:14px; line-height:1.55}

    .hero-img{
      margin-top:14px;
      border-radius:16px;
      border:1px solid rgba(255,255,255,.12);
      overflow:hidden;
      background:#0B1220;
    }
    .hero-img img{width:100%; height:220px; object-fit:cover; display:block}

    .stats{display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:14px;}
    .stat{padding:12px; border-radius:16px; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.10);} 
    .stat b{display:block; font-size:14px}
    .stat span{display:block; font-size:12px; color:var(--muted); margin-top:4px}

    .hero-right{padding:18px}
    .form-title{display:flex; align-items:flex-end; justify-content:space-between; gap:12px}
    .form-title h2{margin:0; font-size:16px}
    .form-title p{margin:0; font-size:12px; color:var(--muted)}
    form{margin-top:12px}

    label{display:block; font-size:12px; color:var(--muted); margin:0 0 6px}
    .input,.select,.textarea{
      width:100%;
      padding:12px 12px;
      border-radius:14px;
      border:1px solid rgba(255,255,255,.14);
      background:rgba(255,255,255,.06);
      color:var(--text);
      outline:none;
    }
    .textarea{min-height:90px; resize:vertical}
    .row{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:10px}
    @media (max-width: 560px){ .row{grid-template-columns:1fr} }

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

    .btn{
      cursor:pointer;
      border:1px solid rgba(255,255,255,.14);
      background:rgba(255,255,255,.08);
      color:var(--text);
      padding:12px 12px; border-radius:14px;
      font-weight:900; font-size:13px;
      text-decoration:none;
      display:inline-flex;
      align-items:center;
      justify-content:center;
      min-height:44px;
    }
    .btn.primary{background:linear-gradient(135deg,var(--brand),var(--brand2)); border-color:transparent; color:#07101f;}
    .btn.small{padding:10px 12px;border-radius:12px; min-height:44px}

    .hint{font-size:12px;color:var(--muted); margin-top:8px; line-height:1.45}
    .gps-status{margin-top:8px; font-size:12px; color:rgba(234,255,244,.82)}
    .divider{height:1px; background:rgba(255,255,255,.08); margin:14px 0}

    .section{padding:14px 0}
    .section h3{margin:0 0 10px; font-size:16px}

    .grid{display:grid; grid-template-columns:repeat(3,1fr); gap:12px;}
    @media (max-width: 980px){ .grid{grid-template-columns:repeat(2,1fr)} }
    @media (max-width: 560px){ .grid{grid-template-columns:1fr} }

    .card{
      padding:14px;
      border-radius:18px;
      background:rgba(255,255,255,.05);
      border:1px solid rgba(255,255,255,.10);
    }
    .card h4{margin:0 0 6px; font-size:14px}
    .card p{margin:0; font-size:12px; color:var(--muted); line-height:1.55}
    .card .mini{margin-top:10px; display:flex; gap:10px; flex-wrap:wrap}
    .mini a{font-size:12px; padding:8px 10px}

    /* Pricing */
    .price-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:12px}
    @media (max-width: 980px){ .price-grid{grid-template-columns:1fr} }
    .price-card{
      padding:16px;
      border-radius:18px;
      border:1px solid rgba(37,99,235,.18);
      background:linear-gradient(180deg, rgba(37,99,235,.18), rgba(255,255,255,.04));
    }
    .price-card b{font-size:14px}
    .price-card .price{font-size:26px; margin-top:6px; font-weight:1000}
    .price-card .desc{margin-top:8px; color:var(--muted); font-size:12px; line-height:1.55}

    .price-table{
      margin-top:12px;
      overflow:auto;
      border-radius:18px;
      border:1px solid rgba(255,255,255,.10);
      background:rgba(255,255,255,.03);
    }
    table{width:100%; border-collapse:collapse; min-width:720px}
    th,td{padding:12px; border-bottom:1px solid rgba(255,255,255,.08); text-align:left; font-size:12px}
    th{font-size:12px; color:rgba(234,255,244,.85); background:rgba(255,255,255,.04)}
    tr:hover td{background:rgba(255,255,255,.03)}

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

    /* Toast */
    .toast{position:fixed; left:50%; transform:translateX(-50%);
      bottom: calc(var(--bottom-bar-h) + var(--float-gap) + env(safe-area-inset-bottom, 0px));
      z-index:10040; display:none;}
    .toast .inner{
      max-width:min(720px, calc(100vw - 28px));
      border:1px solid rgba(255,255,255,.16);
      background:rgba(10,31,23,.92);
      color:var(--text);
      padding:12px 14px;
      border-radius:14px;
      box-shadow:0 18px 60px rgba(0,0,0,.45);
      backdrop-filter: blur(10px);
      font-size:13px;
      line-height:1.4;
      white-space:pre-line;
    }

    /* Bottom bar */
    .bottom-bar{
      position:fixed; left:0; right:0; bottom:0;
      background:rgba(10,15,28,.78);
      backdrop-filter: blur(10px);
      border-top:1px solid rgba(255,255,255,.08);
      padding:10px 0;
      padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
      z-index:10020;
    }
    .bottom-inner{display:flex; align-items:center; justify-content:space-between; gap:10px;}

    /* 24H ribbon */
    .ribbon-24h{
      position:fixed; top:14px; right:-52px; z-index:10060;
      width:180px; text-align:center; padding:10px 0;
      background:linear-gradient(135deg,var(--brand),var(--brand2));
      color:#072012; font-weight:1000; letter-spacing:1px; text-decoration:none;
      transform:rotate(45deg);
      border:1px solid rgba(255,255,255,.22);
      box-shadow:0 18px 45px rgba(37,99,235,.18);
    }
    .ribbon-24h small{display:block; font-size:11px; font-weight:900; opacity:.92; margin-top:2px}
    @media (max-width:900px){
      .ribbon-24h{top:10px; right:-60px; width:160px; padding:8px 0; font-size:13px;}
    }

    /* Photos preview */
    .preview-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-top:10px;}
    @media (max-width:560px){ .preview-grid{grid-template-columns:repeat(3,1fr)} }
    .thumb{position:relative; border-radius:14px; overflow:hidden; border:1px solid rgba(255,255,255,.14); background:rgba(255,255,255,.05); aspect-ratio: 1 / 1;}
    .thumb img{width:100%; height:100%; object-fit:cover; display:block}
    .thumb button{position:absolute; top:8px; right:8px; border:none; cursor:pointer; width:28px;height:28px;border-radius:999px; background:rgba(0,0,0,.45); color:#fff; display:grid; place-items:center; font-weight:1000;}

    /* Photo hint overlay */
    .photo-hint{position:fixed; inset:0; z-index:10070; background:rgba(0,0,0,.55); display:none; align-items:center; justify-content:center; padding:18px;}
    .photo-hint .box{width:min(780px, calc(100vw - 28px)); border-radius:18px; border:1px solid rgba(255,255,255,.16); background:rgba(10,31,23,.96); box-shadow:0 18px 60px rgba(0,0,0,.55); overflow:hidden;}
    .photo-hint header{padding:14px 14px; display:flex; align-items:center; justify-content:space-between; gap:10px; border-bottom:1px solid rgba(255,255,255,.08);}
    .photo-hint header b{font-size:14px}
    .photo-hint header button{border:1px solid rgba(255,255,255,.14); background:rgba(255,255,255,.08); color:var(--text); padding:8px 10px; border-radius:12px; cursor:pointer; font-weight:1000; min-height:44px;}
    .photo-hint .content{padding:14px}
    .photo-hint .content p{margin:0 0 10px; color:var(--muted); font-size:13px; line-height:1.5}
    .photo-hint .content .preview-grid{grid-template-columns:repeat(6,1fr)}
    @media (max-width:560px){ .photo-hint .content .preview-grid{grid-template-columns:repeat(3,1fr)} }

    /* ===== Collapsible Debug Widget ===== */
    .dbg-widget{
      position:fixed;
      right:14px;
      bottom: calc(var(--bottom-bar-h) + var(--float-gap) + env(safe-area-inset-bottom, 0px));
      z-index:10080;
      width:min(560px, calc(100vw - 28px));
      border:1px solid rgba(37,99,235,.18);
      background:rgba(10,31,23,.95);
      color:#eafff4;
      border-radius:18px;
      backdrop-filter:blur(10px);
      box-shadow:0 18px 60px rgba(0,0,0,.45);
      overflow:hidden;
    }
    .dbg-toggle{width:100%; display:flex; align-items:center; justify-content:space-between; gap:10px; cursor:pointer; border:none; background:rgba(255,255,255,.03); color:#eafff4; padding:12px 14px; font-weight:1000; font-size:13px;}
    .dbg-pill{display:inline-flex; align-items:center; padding:4px 8px; border-radius:999px; border:1px solid rgba(255,255,255,.14); background:rgba(255,255,255,.06); font-size:12px; opacity:.92;}
    .dbg-body{padding:14px; border-top:1px solid rgba(255,255,255,.08);}
    .dbg-head{display:flex; align-items:baseline; gap:10px; margin-bottom:10px;}
    .dbg-head b{font-size:14px}
    .dbg-sub{font-size:12px; opacity:.78}
    .dbg-grid{display:grid; grid-template-columns:1fr; gap:10px;}
    .dbg-kv{border:1px solid rgba(255,255,255,.10); background:rgba(255,255,255,.04); border-radius:16px; padding:12px;}
    .dbg-kv .k{font-size:12px; opacity:.75}
    .dbg-kv .v{margin-top:6px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size:12px; white-space:pre-wrap; word-break:break-word;}
    .dbg-actions{display:flex; flex-wrap:wrap; gap:10px; margin-top:10px;}
    .dbg-actions button{border:1px solid rgba(255,255,255,.14); background:rgba(255,255,255,.08); color:#eafff4; padding:10px 12px; border-radius:14px; cursor:pointer; font-weight:1000; font-size:12px; min-height:44px;}
    .dbg-actions button.primary{background:linear-gradient(135deg,var(--brand),var(--brand2)); color:#07101f; border-color:transparent;}
    .dbg-note{margin:10px 0 0; font-size:12px; opacity:.78; line-height:1.5;}
    .dbg-note a{color:#b8ffd7; margin-left:8px; text-decoration:none;}
    .dbg-note a:hover{text-decoration:underline;}

    .dbg-widget.collapsed{width:auto; max-width:calc(100vw - 28px); border-radius:999px;}
    .dbg-widget.collapsed .dbg-toggle{border-radius:999px; padding:10px 12px; min-height:44px;}
    .dbg-widget.collapsed .dbg-body{display:none;}

    @media (max-width: 560px){
      .dbg-widget{left:10px; right:10px; width:auto;}
      .dbg-widget.collapsed{border-radius:999px; overflow:hidden;}
      .dbg-widget.collapsed .dbg-toggle{padding:10px 12px; min-height:44px; font-size:13px;}
      .dbg-widget.collapsed .dbg-pill{font-size:11px; padding:3px 8px;}
      .dbg-widget:not(.collapsed){border-radius:16px; box-shadow: 0 26px 80px rgba(0,0,0,.55); border-color: rgba(37,99,235,.18);}
      .dbg-widget:not(.collapsed) .dbg-toggle{min-height:48px; padding:12px 14px; font-size:14px;}
      .dbg-widget:not(.collapsed) .dbg-body{max-height: min(70vh, 560px); overflow:auto; -webkit-overflow-scrolling: touch; padding:12px;}
      .dbg-grid{gap:8px}
      .dbg-kv{padding:10px;border-radius:14px}
      .dbg-kv .k{font-size:11px; letter-spacing:.2px}
      .dbg-kv .v{font-size:11px; line-height:1.35}
      .dbg-actions{gap:8px; margin-top:10px; position: sticky; bottom:0; padding-top:10px; padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
        background: linear-gradient(180deg, rgba(10,31,23,0) 0%, rgba(10,31,23,.86) 25%, rgba(10,31,23,.95) 100%);
        backdrop-filter: blur(8px);
      }
      .dbg-actions button{flex:1 1 calc(50% - 8px); min-height:44px; padding:10px 10px; font-size:12px; border-radius:14px;}
      .dbg-note{font-size:11px; line-height:1.45}
    }


/* Safety notice */
.safety{
  margin:14px 0 10px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(34,211,238,.22);
  background:rgba(34,211,238,.08);
  color:var(--text);
  font-size:12.5px;
  line-height:1.45;
}
.safety b{display:block;margin-bottom:4px;color:#9be8ff}
