  :root{
    --bg:#D3D3D3;
    --dark:#343a40;
    --title:#4a5e80;
    --red:#e5625e;
    --green:#198754;

    --card:#c9c9c9;
    --card2:#bdbdbd;
    --ink:#111417;
    --muted:rgba(17,20,23,.72);

    --radius:14px;
    --shadow:0 12px 26px rgba(0,0,0,.16);
  }

  *{ box-sizing:border-box; }
  body{
    margin:0;
    min-height:100vh;
    color:var(--ink);
    font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;

    background:
      radial-gradient(circle at center, rgba(0,0,0,0) 70%, rgba(0,0,0,0.25) 100%),
      linear-gradient(to bottom, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.75) 60%, rgba(74,94,128,.50) 80%),
      url("img/double-bubble.webp");

    background-repeat: no-repeat, no-repeat, repeat;
    background-size: cover, cover, 180px;
    background-color: var(--bg);
  }
  a{ color:inherit; }
  .wrap{ max-width:1500px; margin:0 auto; padding:18px; }

  .topbar{
    display:flex; gap:12px; align-items:center; justify-content:space-between;
    margin-bottom:14px;
    padding:12px 14px;
    border-radius:var(--radius);
    background:var(--dark);
    border:2px solid rgba(0,0,0,.18);
    box-shadow:var(--shadow);
    color:#d3d3d3;
  }
  .brand{ display:flex; gap:12px; align-items:center; }
  .logo{
    width:42px; height:42px; border-radius:12px;
    display:grid; place-items:center;
    background:linear-gradient(135deg, var(--title), rgba(255,255,255,.08));
    border:2px solid rgba(255,255,255,.20);
    color:#fff;
    font-size:1.1rem;
    box-shadow:0 10px 24px rgba(0,0,0,.25);
  }
  .brand h1{ margin:0; font-size:1.08rem; letter-spacing:.2px; color:#d3d3d3; font-weight:550; }
  .brand p{ margin:0; color:rgba(255,255,255,.78); font-size:.9rem; font-weight:700; }

  .grid{ display:grid; grid-template-columns:1fr; gap:14px; }

  .card{
    background:var(--dark);
    border:2px solid rgba(0,0,0,.18);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    overflow:hidden;
    color:#fff;
  }
  .cardHeader{
    padding:14px;
    border-bottom:2px solid rgba(255,255,255,.10);
    display:flex; align-items:flex-start; justify-content:space-between; gap:10px;
    background:
      linear-gradient(180deg, rgba(74,94,128,.40), rgba(74,94,128,.08)),
      rgba(0,0,0,.08);
  }
  .cardHeader h2{ margin:0; font-size:1rem; color:#fff; font-weight:550; }
  .sub{ margin:4px 0 0; font-size:.9rem; color:rgba(255,255,255,.78); font-weight:700; }
  .cardBody{ padding:14px; background:rgba(0,0,0,.10); }

  .row{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; }

  .btn{
    appearance:none;
    border:2px solid rgba(255,255,255,.18);
    background:rgba(255,255,255,.06);
    color:#fff;
    padding:9px 12px;
    border-radius:12px;
    cursor:pointer;
    font-weight:550;
    font-size:.9rem;
    transition:.12s transform ease, .12s background ease, .12s filter ease;
  }
  .btn:hover{ background:rgba(255,255,255,.10); transform:translateY(-1px); }
  .btn:active{ transform:translateY(0); }

  .btnPrimary{
    border-color:rgba(25,135,84,.45);
    background:linear-gradient(135deg, rgba(25,135,84,.28), rgba(255,255,255,.06));
    color:#eafff3;
  }
  .btnPrimary:hover{ filter:brightness(1.05); }



  .btnCheck{
    border-color: rgba(233,125,73,.45);

    background:
      linear-gradient(
        135deg,
        rgba(233,125,73,.28),
        rgba(255,255,255,.06)
      );

    color: #fff3ec; /* warm off-white to match orange tone */
  }

  .btnCheck:hover{
    filter: brightness(1.05);
  }

  .btnParts{
  border-color: rgba(13,110,253,.45); /* Bootstrap primary blue tone */

  background:
    linear-gradient(
      135deg,
      rgba(13,110,253,.28),
      rgba(255,255,255,.06)
    );

  color: #eaf2ff; /* cool white to match blue tone */
}

.btnParts:hover{
  filter: brightness(1.05);
}

  .btnDanger{
    border-color:rgba(229,98,94,.55);
    background:linear-gradient(135deg, rgba(229,98,94,.28), rgba(255,255,255,.06));
    color:#ffeceb;
  }
  .btnSmall{ padding:7px 10px; font-size:.85rem; border-radius:10px; }

  .notice{
    border:2px dashed rgba(255,255,255,.18);
    background:rgba(0,0,0,.12);
    border-radius:12px;
    padding:12px;
    color:rgba(255,255,255,.85);
    font-size:.95rem;
    font-weight:300;
  }
  .notice.error{
    border-color:rgba(229,98,94,.70);
    background:rgba(229,98,94,.14);
    color:#fff2f2;
  }
  .hidden{ display:none !important; }

  input{
    background:rgba(255,255,255,.10);
    border:2px solid rgba(255,255,255,.18);
    color:#fff;
    padding:10px 12px;
    border-radius:12px;
    outline:none;
    width:100%;
    font-weight:300;
  }
  input::placeholder{ color:rgba(255,255,255,.65); }
  input:focus{
    border-color:rgba(74,94,128,.95);
    box-shadow:0 0 0 3px rgba(74,94,128,.28);
  }
  label{ color:rgba(255,255,255,.88); font-size:.85rem; font-weight:550; display:block; margin:0 0 6px; }

  /* Orders list */
  .orderList{ display:grid; gap:12px; }
  .orderItem{
display:flex;
flex-direction:column;
    border:2px solid rgba(255,255,255,.12);
    background:linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.10));
    border-radius:14px;
    padding:12px;
    box-shadow:0 10px 24px rgba(0,0,0,.18);
    overflow:hidden;
    color:#fff;
    cursor:pointer;

    transition:
      transform .18s ease,
      box-shadow .18s ease,
      border-color .18s ease,
      background .18s ease;
  }
.orderItem:hover {
  transform: translateY(-4px) scale(1.01);

  border-color: rgba(255,255,255,.28);

  box-shadow:
    0 18px 38px rgba(0,0,0,.28),
    0 0 0 1px rgba(255,255,255,.05) inset;
}
  .orderTop{ display:flex; justify-content:space-between; gap:10px; align-items:flex-start; }
  .orderTitle{ font-weight:550; letter-spacing:.2px; color:#fff; }
  .orderRight{ text-align:right; white-space:nowrap; color:rgba(255,255,255,.78); font-size:.9rem; font-weight:500; }

  .divider{ height:2px; background:rgba(255,255,255,.10); margin:12px 0; border-radius:2px; }

  .orderItem.hueGreen{
    border-color:rgba(25,135,84,.55);
    background:
      radial-gradient(700px 200px at 10% 0%, rgba(25,135,84,.18), transparent 60%),
      linear-gradient(180deg, rgba(0,0,0,.20), rgba(0,0,0,.10));
  }
  .orderItem.huePurple{
    border-color: rgba(156,39,176,.55); /* #9C27B0 */
    background:
      radial-gradient(
        700px 200px at 10% 0%,
        rgba(156,39,176,.28),
        transparent 60%
      ),
      linear-gradient(
        180deg,
        rgba(0,0,0,.20),
        rgba(0,0,0,.10)
      );
  }
  .orderItem.hueYellow{
    border-color: rgba(255,193,7,.55); /* Bootstrap yellow */
    background:
      radial-gradient(
        700px 200px at 10% 0%,
        rgba(255,193,7,.22),
        transparent 60%
      ),
      linear-gradient(
        180deg,
        rgba(0,0,0,.20),
        rgba(0,0,0,.10)
      );
  }

  /* Accepted (Blue) */
  .orderItem.hueBlue{
    border-color: rgba(33,150,243,.55);
    background:
      radial-gradient(
        700px 200px at 10% 0%,
        rgba(33,150,243,.22),
        transparent 60%
      ),
      linear-gradient(
        180deg,
        rgba(0,0,0,.20),
        rgba(0,0,0,.10)
      );
  }

  /* Confirmed (Teal / Cyan) */
  .orderItem.hueTeal{
    border-color: rgba(0,188,212,.55);
    background:
      radial-gradient(
        700px 200px at 10% 0%,
        rgba(0,188,212,.22),
        transparent 60%
      ),
      linear-gradient(
        180deg,
        rgba(0,0,0,.20),
        rgba(0,0,0,.10)
      );
  }
  /* Ordered (Grey) */
  .orderItem.hueGrey{
    border-color: rgba(173,181,189,.45); /* #ADB5BD */
    background:
      radial-gradient(
        700px 200px at 10% 0%,
        rgba(173,181,189,.18),
        transparent 60%
      ),
      linear-gradient(
        180deg,
        rgba(0,0,0,.20),
        rgba(0,0,0,.10)
      );
  }

  .orderItem.hueOrange{
    border-color: rgba(233,125,73,.45); /* based on your orange */

    background:
      radial-gradient(
        700px 200px at 10% 0%,
        rgba(233,125,73,.22),   /* soft glow like grey */
        transparent 60%
      ),
      linear-gradient(
        180deg,
        rgba(0,0,0,.20),
        rgba(0,0,0,.10)
      );
  }

  .orderDetailsGrid{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:10px;
    margin-top:12px;
  }
  @media (max-width: 900px){
    .orderDetailsGrid{ grid-template-columns:1fr; }
  }

  .miniSection{
    border:2px solid rgba(255,255,255,.12);
    background:rgba(0,0,0,.14);
    border-radius:14px;
    padding:10px;
  }
  .miniTitle{
    display:flex; align-items:center; justify-content:space-between; gap:10px;
    font-weight:550;
    font-size:.92rem;
    margin-bottom:8px;
    color:rgba(255,255,255,.92);
  }
  .miniTitle::after{
    content:"";
    flex:1;
    height:2px;
    margin-left:10px;
    background:linear-gradient(90deg, rgba(74,94,128,.8), rgba(255,255,255,0));
    border-radius:2px;
  }

  .miniKv{
    display:grid;
    grid-template-columns: 120px 1fr 120px 1fr;
    gap:6px 12px;
    font-size:.88rem;
  }
  @media (max-width: 900px){
    .miniKv{ grid-template-columns: 120px 1fr; }
  }
  .miniKv div:nth-child(odd){
    color:rgba(255,255,255,.72);
    font-weight:300;
    border-bottom: 1px solid rgba(25, 135, 84, 0.6);
  }
  .miniKv div:nth-child(even){
    color:#fff;
  }

  .miniNote{
    margin-top:8px;
    color:rgba(255,255,255,.82);
    font-size:.9rem;
    white-space:pre-wrap;
    font-weight:300;
  }

  .statusPill{
    display:inline-flex; align-items:center; gap:8px;
    padding:6px 10px;
    border-radius:999px;
    border:2px solid rgba(255,255,255,.16);
    background:rgba(0,0,0,.18);
    color:#fff;
    font-size:.82rem;
    font-weight:550;
  }
  .statusDot{
    width:10px; height:10px; border-radius:50%;
    background:var(--title);
    box-shadow:0 0 0 4px rgba(74,94,128,.18);
    display:inline-block;
  }

  .warImage{
    height:3rem;
    border-radius:12px;
    border:2px solid rgba(255,255,255,.14);
    background:rgba(255,255,255,.06);
    cursor:pointer;
    transition:.12s transform ease, .12s filter ease;
  }
  .warImage:hover{ transform:translateY(-1px); filter:brightness(1.06); }
  .miniRow{ display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }

  .docRow{ display:grid; gap:8px; margin-top:8px; }
  .docRow a{
    font-size:.82rem;
    text-decoration:none;
    color:#fff;
    display:flex; align-items:center; gap:8px;
    padding:8px 10px;
    border-radius:12px;
    border:2px solid rgba(255,255,255,.14);
    background:rgba(255,255,255,.06);
    font-weight:550;
    max-width: 100%;
    overflow: hidden;
  }
  .docRow a:hover{ background:rgba(255,255,255,.10); }

  /* Accept modal */
  #acceptModal{ position:fixed; inset:0; z-index:9999; }
  #acceptModal.hidden{ display:none; }
  .am-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.55); }
  .am-card{
    position:relative;
    width:min(760px, calc(100% - 24px));
    margin:60px auto;
    border-radius:16px;
    border:2px solid rgba(255,255,255,.14);
    background:var(--dark);
    box-shadow:0 22px 80px rgba(0,0,0,.45);
    overflow:hidden;
    color:#fff;
  }
  .am-head{
    padding:14px;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    border-bottom:2px solid rgba(255,255,255,.10);
    background:
      linear-gradient(180deg, rgba(74,94,128,.40), rgba(74,94,128,.12)),
      rgba(0,0,0,.08);
  }
  .am-title{ font-weight:550; letter-spacing:.2px; color:#fff; }
  .am-sub{ color:rgba(255,255,255,.78); font-size:.95rem; margin-top:4px; font-weight:300; }
  .am-body{ padding:14px; }

  .detailSection{
    border:2px solid rgba(255,255,255,.12);
    border-radius:14px;
    padding:10px;
    background:rgba(0,0,0,.14);
    overflow-y:scroll;
    max-height:45vh;
  }
  .detailSection h3{
    margin:0 0 10px;
    font-size:.95rem;
    color:rgba(255,255,255,.92);
    font-weight:550;
  }
  .kv{
    display:grid;
    grid-template-columns: 150px 1fr;
    gap:8px 10px;
    font-size:.92rem;
  }
  .kv div:nth-child(odd){ color:rgba(255,255,255,.72); font-weight:550; }
  .kv div:nth-child(even){ color:#fff; font-weight:350; }

  /* Collapsible orders */
  .orderCollapse{ display:none; margin-top:10px; }
  .orderItem.open .orderCollapse{ display:block; }
  .orderChevron{ font-weight:550; opacity:.85; margin-left:10px; display:inline-block; }
  .orderItem.open .orderChevron{ transform:rotate(90deg); }

  /* Change Password modal */
  #pwModal{ position:fixed; inset:0; z-index:9999; }
  #pwModal.hidden{ display:none; }
  .pw-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.55); }
  .pw-card{
    position:relative;
    width:min(520px, calc(100% - 24px));
    margin:80px auto;
    border-radius:16px;
    border:2px solid rgba(255,255,255,.14);
    background:var(--dark);
    box-shadow:0 22px 80px rgba(0,0,0,.45);
    overflow:hidden;
    color:#fff;
  }
  .pw-head{
    padding:14px;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    border-bottom:2px solid rgba(255,255,255,.10);
    background:
      linear-gradient(180deg, rgba(74,94,128,.40), rgba(74,94,128,.12)),
      rgba(0,0,0,.08);
  }
  .pw-title{ font-weight:550; letter-spacing:.2px; color:#fff; }
  .pw-sub{ color:rgba(255,255,255,.78); font-size:.95rem; margin-top:4px; font-weight:300; }
  .pw-body{ padding:14px; }
  .pw-grid{ display:grid; grid-template-columns: 1fr; gap:12px; }

  /* ---------- New Order modal (overlay + pro form styling) ---------- */
  #newOrderModal{ position:fixed; inset:0; z-index:1000; }
  #newOrderModal.hidden{ display:none; }
  .no-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.60); }

  .no-card{
    position:relative;
    width:min(1100px, calc(100% - 24px));
    margin:40px auto;
    border-radius:16px;
    border:2px solid rgba(255,255,255,.14);
    background:var(--dark);
    box-shadow:0 22px 80px rgba(0,0,0,.45);
    overflow:hidden;
    color:#fff;
  }
  .no-head{
    padding:14px;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    border-bottom:2px solid rgba(255,255,255,.10);
    background:
      linear-gradient(180deg, rgba(74,94,128,.40), rgba(74,94,128,.12)),
      rgba(0,0,0,.08);
  }
  .no-title{ font-weight:550; letter-spacing:.2px; color:#fff; }
  .no-sub{ color:rgba(255,255,255,.78); font-size:.95rem; margin-top:4px; font-weight:300; }

  .no-body{
    padding:14px;
    max-height: calc(100vh - 170px);
    overflow:auto;
    background:rgba(0,0,0,.10);
  }

  /* Form layout */
  .no-section{
    border:2px solid rgba(255,255,255,.12);
    background:rgba(0,0,0,.14);
    border-radius:14px;
    padding:12px;
    margin-bottom:12px;
  }
  .no-section h3{
    margin:0 0 10px;
    font-size:.95rem;
    color:rgba(255,255,255,.92);
    font-weight:550;
  }
  .no-grid{
    display:grid;
    grid-template-columns: repeat(12, 1fr);
    gap:12px;
  }
  .no-col-3{ grid-column: span 3; }
  .no-col-4{ grid-column: span 4; }
  .no-col-6{ grid-column: span 6; }
  .no-col-12{ grid-column: span 12; }
  @media (max-width: 900px){
    .no-col-3,.no-col-4,.no-col-6{ grid-column: span 12; }
  }

  .no-field label{
    display:block;
    margin:0 0 6px;
    color:rgba(255,255,255,.88);
    font-size:.85rem;
    font-weight:300;
  }
  .no-input, .no-select, .no-textarea{
    width:100%;
    background:rgba(255,255,255,.10);
    border:2px solid rgba(255,255,255,.18);
    color:#fff;
    padding:10px 12px;
    border-radius:12px;
    outline:none;
    font-weight:300;
  }
  .no-textarea{ min-height:90px; resize:vertical; }
  .no-input::placeholder{ color:rgba(255,255,255,.65); }
  .no-input:focus, .no-select:focus, .no-textarea:focus{
    border-color:rgba(74,94,128,.95);
    box-shadow:0 0 0 3px rgba(74,94,128,.28);
  }

  /* Switches */
  .no-switchRow{
    display:flex;
    gap:14px;
    flex-wrap:wrap;
    align-items:center;
    margin-top:8px;
  }
  .no-switch{
    display:flex;
    gap:10px;
    align-items:center;
    border:2px solid rgba(255,255,255,.12);
    background:rgba(255,255,255,.06);
    padding:10px 12px;
    border-radius:14px;
  }
  .no-switch input{
    width:52px;
    height:26px;
    accent-color: var(--green);
  }
  .no-switch span{
    font-weight:300;
    color:rgba(255,255,255,.90);
    font-size:.9rem;
  }

  /* Footer buttons */
  .no-actions{
    display:flex;
    justify-content:flex-end;
    gap:10px;
    margin-top:12px;
  }

  /* Fix select + dropdown option colours */
  .no-select { background-color: rgba(255,255,255,.10); color: #fff; }
  .no-select option { background-color: var(--dark); color: #fff; }
  .no-select option:checked,
  .no-select option:hover { background-color: var(--title); color: #fff; }
  select { color-scheme: dark; }

  .logo {
    width:150px;
    height:42px;
    border-radius:12px;
    display:grid;
    place-items:center;
    background:transparent;
    border:none;
    box-shadow:none;
  }
  .logo-img { width:150px; height:28px; display:block; }

  /* How To modal */
  #howToModal{ position:fixed; inset:0; z-index:10001; }
  #howToModal.hidden{ display:none; }
  .ht-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.60); }

  .ht-card{
    position:relative;
    width:min(860px, calc(100% - 24px));
    margin:60px auto;
    border-radius:16px;
    border:2px solid rgba(255,255,255,.14);
    background:var(--dark);
    box-shadow:0 22px 80px rgba(0,0,0,.45);
    overflow:hidden;
    color:#fff;
  }
  .ht-head{
    padding:14px;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    border-bottom:2px solid rgba(255,255,255,.10);
    background:
      linear-gradient(180deg, rgba(74,94,128,.40), rgba(74,94,128,.12)),
      rgba(0,0,0,.08);
  }
  .ht-title{ font-weight:550; letter-spacing:.2px; color:#fff; }
  .ht-sub{ color:rgba(255,255,255,.78); font-size:.95rem; margin-top:4px; font-weight:300; }

  .ht-body{
    padding:14px;
    max-height: calc(100vh - 180px);
    overflow:auto;
    background:rgba(0,0,0,.10);
  }

  .ht-section{
    border:2px solid rgba(255,255,255,.12);
    background:rgba(0,0,0,.14);
    border-radius:14px;
    padding:12px;
    margin-bottom:12px;
  }
  .ht-section h3{
    margin:0 0 8px;
    font-size:1rem;
    color:rgba(255,255,255,.92);
    font-weight:550;
  }
  .ht-section p, .ht-section li{
    color:rgba(255,255,255,.86);
    font-weight:300;
    line-height:1.45;
    font-size:1rem;
  }
  .ht-section ul{ margin:8px 0 0; padding-left:18px; }

  .filesGrid{
    display:grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap:12px;
    margin-top:8px;
  }
  @media (max-width: 900px){
    .filesGrid{ grid-template-columns:1fr; }
  }
  .filesCol{
    border:2px solid rgba(255,255,255,.10);
    background:rgba(0,0,0,.10);
    border-radius:14px;
    padding:10px;
    min-width:0;
  }
  .filesSub{
    font-weight:800;
    color:rgba(255,255,255,.78);
    margin:6px 0 8px;
    font-size:.85rem;
  }
  .filesEmpty{
    font-weight:900;
    color:rgba(255,255,255,.55);
    padding:8px 0;
  }

  /* =========================
     Mobile-friendly overrides
     ========================= */

  html, body { overflow-x: hidden; }
  img, svg { max-width: 100%; height: auto; }
  .wrap { padding: 14px; }

  .topbar{
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
  }
  .brand{
    flex: 1 1 360px;
    min-width: 0;
  }
  .brand h1{ line-height:1.15; }
  .brand p{ line-height:1.2; }
  .topbar .row{
    flex: 1 1 260px;
    justify-content: flex-end;
  }

  .btn{ min-height: 44px; padding: 10px 12px; }
  .btnSmall{ min-height: 40px; padding: 8px 10px; }

  input, select, textarea{ min-height: 44px; font-size: 16px; }

  @media (max-width: 720px){
    .wrap{ padding: 12px; }

    #loginCard .cardBody .grid{ grid-template-columns: 1fr !important; }

    .cardBody > .row{ flex-wrap: wrap; }

    .cardHeader{ flex-wrap: wrap; align-items: flex-start; }
    .cardHeader .row{ width: 100%; justify-content: flex-start; }

    .orderTop{ flex-direction: column; align-items: stretch; }
    .orderRight{
      text-align: left;
      white-space: normal;
      margin-top: 6px;
    }

    .miniKv{ grid-template-columns: 120px 1fr; }

    .filesGrid{ grid-template-columns: 1fr; }

    .miniRow{ gap:10px; }
    .warImage{ height: 3.4rem; }

    .am-card, .pw-card, .ht-card, .no-card{
      width: calc(100% - 16px) !important;
      margin: 10px auto !important;
    }
    .am-body, .pw-body, .ht-body, .no-body{
      max-height: calc(100vh - 140px) !important;
    }

    .no-grid{ grid-template-columns: 1fr !important; }
    .no-col-3,.no-col-4,.no-col-6,.no-col-12{ grid-column: auto !important; }

    .no-switchRow{ flex-direction: column; align-items: stretch; }
    .no-switch{ width: 100%; justify-content: space-between; }
  }

  @media (max-width: 1024px){
    .wrap{ max-width: 100%; }
  }

  .docRow a{ word-break: break-word; }

  /* Warranty previews */
  #warrantyModal img{
    height: 3.4rem;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.06);
  }

  #warrantyModal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #warrantyModal.hidden { display: none !important; }

  #warrantyModal .am-card {
    margin: 0;
    max-height: 90vh;
    overflow: auto;
  }
  .no-select {
    background-color: rgba(255,255,255,.10);
    color: #fff;
    color-scheme: dark;   /* 👈 THIS is key */
  }

  .no-select optgroup {
    background-color: var(--dark);
    color: #fff;
  }

  .no-select option {
    background-color: var(--dark);
    color: #fff;
  }
  /* Header (clickable area) */
  .orderTop {
    cursor: pointer;
  }

  /* Expanded content should NOT look clickable */
  .orderCollapse {
    cursor: default;
  }

  /* If .orderItem had pointer before, override it */
  .orderItem {
    cursor: default;
  }
  .progressWrap{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    align-items:center;
  }

  .progressStep{
    display:flex;
    align-items:center;
    gap:8px;
    font-size:.6rem;
    opacity:.28;
    padding:6px 10px;
    border-radius:999px;
    border:2px solid rgba(255,255,255,.10);
    background:rgba(0,0,0,.10);
    transition: .15s ease;
  }

  .progressStep .dot{
    width:10px;
    height:10px;
    border-radius:50%;
    background:rgba(255,255,255,.20);
  }

  .progressStep .label{
    font-weight:650;
    color:rgba(255,255,255,.55);
  }

  .progressStep.done{
    opacity:.55;
    border-color: rgba(255,255,255,.14);
    background: rgba(255,255,255,.06);
  }

  .progressStep.done .label{
    color: rgba(255,255,255,.85);
  }

  /* ⭐ CURRENT step pops */
  .progressStep.current{
    opacity:1;
    font-size:.78rem;
    border-color: rgba(255,255,255,.24);
    background: rgba(255,255,255,.10);
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(0,0,0,.18);
  }

  .progressStep.current .dot{
    width:14px;
    height:14px;
    box-shadow: 0 0 0 5px rgba(255,255,255,.10);
  }

  .progressStep.current .label{
    color:#fff;
    letter-spacing:.2px;
  }
  .warrantyBadge {
    display:inline-block;
    padding:4px 10px;
    border-radius:20px;
    font-size:.7rem;
    font-weight:600;
    color:#000;
    margin-left:10px;
  }
/* Compact filter bar */
.filtersBar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
  padding:10px;
  border:2px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.14);
  border-radius:14px;
}

.filtersLeft{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  min-width:0;
  flex:1;
}

.filtersRight{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.f-search{
  flex:1;
  min-width: 240px;
  max-width: 520px;
  position:relative;
}
.f-search input{
  width:100%;
  padding-left: 38px;
}
.f-search::before{
  content:"🔎";
  position:absolute;
  left:12px;
  top:50%;
  transform:translateY(-50%);
  opacity:.85;
  font-size: 14px;
  pointer-events:none;
}

.f-select{
  min-width: 180px;
  max-width: 240px;
}

.f-meta{
  color:rgba(255,255,255,.78);
  font-size:.85rem;
  font-weight:600;
  white-space:nowrap;
}

.f-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:12px;
  border:2px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
}

.f-chip input{
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin:0;
}

@media (max-width: 720px){
  .filtersBar{ padding:10px; }
  .f-search{ min-width: 100%; max-width: 100%; }
  .f-select{ min-width: 100%; max-width: 100%; }
  .filtersRight{ width:100%; justify-content:space-between; }
}

.warrantyCard {
margin-top:10px;
padding:10px;
border-radius:12px;
background:rgba(255,255,255,.05);
border:1px solid rgba(255,255,255,.08);
}

.warrantyTop {
display:flex;
justify-content:space-between;
align-items:center;
gap:8px;
}

.warrantyChip {
padding:3px 10px;
border-radius:999px;
font-weight:650;
font-size:.75rem;
}

.warrantyMeta {
font-size:.75rem;
opacity:.7;
}

.warrantyDesc {
margin-top:6px;
font-size:.85rem;
opacity:.9;
}

.warrantyPhotos {
margin-top:8px;
display:flex;
gap:6px;
flex-wrap:wrap;
}

.warrantyPhotos img {
width:56px;
height:56px;
object-fit:cover;
border-radius:8px;
border:1px solid rgba(255,255,255,.1);
}

.warrantyActionRow {
display:flex;
align-items:center;
justify-content:space-between;
gap:12px;
margin-top:6px;
}

.warrantyActionRow .miniNote {
flex:1;
font-size:.9rem;
opacity:.85;
}

.warrantyActionRow .btnSmall {
white-space:nowrap;
}

/* Parts list (per order) */
.partsWrap{
margin-top:10px;
border:2px solid rgba(255,255,255,.10);
background:rgba(0,0,0,.10);
border-radius:14px;
padding:10px;
}
.partsTitle{
font-weight:650;
color:rgba(255,255,255,.92);
font-size:.9rem;
display:flex;
align-items:center;
justify-content:space-between;
gap:10px;
}
.partsList{
margin-top:8px;
display:grid;
gap:6px;
}
.partLine{
display:flex;
align-items:center;
justify-content:space-between;
gap:10px;
padding:7px 9px;
border-radius:12px;
border:2px solid rgba(255,255,255,.10);
background:rgba(255,255,255,.05);
font-size:.85rem;
}
.partName{
font-weight:650;
color:rgba(255,255,255,.88);
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
.partQty{
font-weight:300;
color:#fff;
padding:3px 10px;
border-radius:999px;
border:2px solid rgba(255,255,255,.14);
background:rgba(0,0,0,.18);
white-space:nowrap;
}
.partEmpty{
margin-top:8px;
font-weight:300;
color:rgba(255,255,255,.70);
font-size:.9rem;
}

/* Make the Overview panel a flex column that can push the bottom block down */
.miniSection{
display:flex;
flex-direction:column;
}

/* The warranty block (divider + title + content) gets pushed down */
.warrantySection{
margin-top:auto;
}
.trackLink{
  display:inline-flex;
  align-items:center;
  gap:8px;
  text-decoration:none;
  padding:6px 10px;
  border-radius:12px;
  border:2px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  font-weight:650;
  font-size:.85rem;
  color:#fff;
}
.trackSlot{
  margin-left:8px;
  font-weight:700;
  font-size:.85rem;
  color:rgba(255,255,255,.85);
}
.designKv{
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: .88rem;
}

.designGroup{
  background: rgba(255,255,255,.04);
  padding: 10px;
  border-radius: 8px;
}

.designGroupTitle{
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .5px;
  opacity: .8;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.designRow{
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px 12px;
}

.designRow div:first-child{
  opacity: .65;
}
.kvHead{
  font-weight:700;
  opacity:.9;
  margin-top:2px;
}

.kvDivider{
  grid-column: 1 / -1;
  height:1px;
  background: rgba(255,255,255,.10);
  margin:8px 0;
}
.hidden{ display:none !important; }

.typeGroups,
.typeBtns{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  padding-bottom:0.25rem;
}
/* -----------------------------
   Type picker: 4-wide grid
   Targets:
   - #typeGroupBtns  (group buttons)
   - #typeBtns       (type buttons)
----------------------------- */

/* 4 columns, centered block, consistent gaps */
#typeGroupBtns,
#typeBtns{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  width: min(1000px, 100%);     /* keeps it centered + not too wide on desktop */
  margin: 0 auto;              /* center */
  margin-bottom: 1rem;
  align-items: stretch;
}

/* Make every button the same size and nicely aligned */
#typeGroupBtns .typeBtn,
#typeBtns .typeBtn{
  width: 100%;
  min-height: 74px;            /* consistent height */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 12px;
  border-radius: 12px;
  line-height: 1.15;
  white-space: normal;         /* allow wrap */
  word-break: break-word;      /* long names won't overflow */
  background-color: rgba(255,255,255,.10);
  border: 2px solid rgba(255,255,255,.18);
  color: #fff;
}

/* Optional: if some labels are very long, keep height stable by clamping */
#typeBtns .typeBtn{
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;       /* max 2 lines */
  -webkit-box-orient: vertical;
}

.typeHint {
  display: none;
}
/* -----------------------------
   Hover state (lighter)
----------------------------- */
#typeGroupBtns .typeBtn:hover,
#typeBtns .typeBtn:hover{
  background-color: rgba(255,255,255,.20);
  border-color: rgba(255,255,255,.35);
  transform: translateY(-1px);
  transition: all .15s ease;
}

/* -----------------------------
   Selected state (GREEN)
----------------------------- */
#typeGroupBtns .typeBtn.isActive,
#typeBtns .typeBtn.isChosen{
  background-color: rgba(25,135,84,.20);   /* subtle green */
  border-color: #198754;                   /* solid green border */
  color: #198754;
  font-weight: 600;
}

/* Slight stronger hover when already selected */
#typeGroupBtns .typeBtn.isActive:hover,
#typeBtns .typeBtn.isChosen:hover{
  background-color: rgba(25,135,84,.28);
}

/* Optional: pressed feel */
#typeGroupBtns .typeBtn:active,
#typeBtns .typeBtn:active{
  transform: translateY(0);
}
.typeHeading{
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .75;
  margin: 1rem 0 .5rem 0;
}

/* generic picker UI (Frame/Panel/etc) */
.pickSection{ margin-top:8px; }
.pickHeading{
  font-size: .85rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .75;
  margin: 0 0 .5rem 0;
}

/* 5 wide like your type picker */
.pickGrid{
  display:grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap:10px;
  width: min(900px, 100%);
  margin: 0 auto;
  align-items: stretch;
}

.pickGrid .pickBtn{
  width:100%;
  min-height: 74px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:10px 12px;
  border-radius:12px;
  line-height:1.15;
  white-space:normal;
  word-break:break-word;
  background-color: rgba(255,255,255,.10);
  border:2px solid rgba(255,255,255,.18);
  cursor:pointer;
  transition: background-color .12s ease, border-color .12s ease, transform .06s ease;
  color:#fff;
}

/* hover = lighter */
.pickGrid .pickBtn:hover{
  background-color: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.26);
}

/* selected = green */
.pickGrid .pickBtn.isChosen{
  background-color: rgba(25,135,84,.20);   /* subtle green */
  border-color: #198754;                   /* solid green border */
  color: #198754;
  font-weight: 600;
}

.styleBtnInner{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  height:100%;
}

.styleName{
  font-size:.85rem;
  font-weight:600;
  text-align:center;
}

.styleImg{
  width:52px;
  height:52px;
  object-fit:contain;
  pointer-events:none;
  opacity:.9;
  transition: transform .15s ease, opacity .15s ease;
}

/* Slight lift on hover */
#typeBtns .typeBtn:hover .styleImg{
  transform: scale(1.05);
  opacity:1;
}

/* Subtle green tint when selected */
#typeBtns .typeBtn.isChosen .styleImg{
  filter: brightness(1.05);
}

/* ===============================
   3-TIER DOOR PICKER
   =============================== */

/* Row spacing */
#typeGroupBtns {
  margin-top: 6px;
}

#typeCategoryBtns {
  margin-top: 8px;
}

#typeBtns {
  margin-top: 12px;
}

/* Sub group row slightly softer */
#typeCategoryBtns .typeBtn {
  opacity: 0.92;
}

/* Active main group stronger */
#typeGroupBtns .typeBtn.isActive {
  background: rgba(13,110,253,.25);
  border-color: rgba(13,110,253,.65);
}

/* Style button layout */
.styleBtnInner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* Image sizing */
.styleImg {
  width: 100%;
  max-width: 180px;
  height: 90px;
  object-fit: contain;
  border-radius: 10px;
  transition: transform .15s ease;
}

.typeBtn:hover .styleImg {
  transform: scale(1.03);
}
/* Sub-groups row (Categories) should look/flow like the main group row */
.typeCategoryRow{
  margin-top: 6px; /* matches your .typeGroups spacing */
}

/* Optional: if you want a little more separation before Styles */
#typeBtns{
  margin-top: 10px;
}

/* Ensure the NEW sub-group row matches the main group row styling */
#typeCategoryBtns{
  display: grid;
grid-template-columns: repeat(5, minmax(0, 1fr));
gap: 10px;
width: min(1000px, 100%);
margin: 0 auto;
  margin-top: 0px;
  margin-bottom: 0px;
margin-bottom: 1rem;
align-items: stretch;
}

/* If any CSS in your project scopes .typeBtn styles to a parent, force it here too */
#typeCategoryBtns .typeBtn{
  border:1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  padding:10px 12px;
  border-radius:12px;
  font-size:.8rem;
  cursor:pointer;
  transition: transform .05s ease, background .15s ease, border-color .15s ease;
  user-select:none;
}
#typeCategoryBtns .typeBtn:hover{  background-color: rgba(255,255,255,.20);
  border-color: rgba(255,255,255,.28);  transform: translateY(-1px);
  transition: all .15s ease;
}
#typeCategoryBtns .typeBtn:active{ transform: scale(.99); }
#typeCategoryBtns .typeBtn.isActive{  background: rgba(13,110,253,.25);
  border-color: rgba(13,110,253,.65);
  color: #198754;
  font-weight: 600;
}

#typeCategoryBtns .typeBtn.isActive:hover{
  background-color: rgba(25,135,84,.28);  transform: translateY(-1px);
    transition: all .15s ease;
}

#typeCategoryBtns .typeBtn.isChosen{
  background: rgba(25,135,84,.18);
  border-color: rgba(25,135,84,.55);
}

.disabled-motor{
  opacity: 0.5;
  cursor: not-allowed;
}

.typeBtn {
  white-space: pre-line;
}

.h3span {  font-size: 0.7rem;
  font-weight: 300;
}

/* Allow pop outside button */
#typeBtns .typeBtn{
  position: relative;
  overflow: visible; /* important */
}

/* Default image state */
.styleImg{
  width: 100%;
  max-width: 120px;
  margin-top: 6px;
  transition: transform .25s ease, box-shadow .25s ease;
  transform-origin: center;
  position: relative;
  z-index: 1;
}

/* Pop out on hover */
#typeBtns .typeBtn:hover .styleImg{
  transform: scale(1.8) translateY(-10px);
  z-index: 999;
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
}

#typeBtns{
  overflow: visible;
}

/* ------------------------------
   Parts Order Modal
------------------------------ */
#partsModal { position: fixed; inset: 0; z-index: 9999; }
#partsModal.hidden { display: none; }

.pm-backdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(3px);
}

.pm-card{
  position: relative;
  width: min(1180px, calc(100% - 26px));
  height: min(95vh);
  margin: 2.5vh auto 0;
  background: rgba(30,33,38,.98);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(0,0,0,.45);
  overflow: hidden;
}

.pm-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.pm-title{ font-weight: 750; font-size: 1.05rem; color: rgba(255,255,255,.96); }
.pm-sub{ font-size:.9rem; color: rgba(255,255,255,.65); margin-top:2px; }

.pm-body{
  display:grid;
  grid-template-columns: 1fr 360px;
  gap: 14px;
  padding: 14px;
  height: calc(100% - 58px);
}

.pm-left{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap: 10px;
  height: 100%;
  overflow: hidden;          /* IMPORTANT */
}

.pm-toolbar{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap:wrap;
}

.pm-search{
  flex: 1;
  min-width: 240px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.92);
  outline:none;
}
.pm-search:focus{
  border-color: rgba(13,110,253,.55);
  box-shadow: 0 0 0 3px rgba(13,110,253,.15);
}

.pm-select{
  min-width: 200px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.92);
  outline:none;
}

.pm-partsWrap{
  flex: 1;                   /* Take remaining height */
  min-height: 0;             /* CRITICAL for flex scroll */
  overflow-y: auto;          /* Vertical scroll */
  overflow-x: hidden;
  padding-right: 6px;
  border-radius: 14px;
}

.pm-group{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow:hidden;
}

.pm-groupHead{
  padding: 10px 12px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.pm-groupTitle{
  font-weight: 700;
  color: rgba(255,255,255,.92);
  font-size:.95rem;
}
.pm-groupCount{
  color: rgba(255,255,255,.62);
  font-size:.86rem;
}

.pm-item{
  display:grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.pm-item:first-child{ border-top:none; }

.pm-itemName{
  color: rgba(255,255,255,.92);
  font-weight: 550;
}
.pm-itemMeta{
  color: rgba(255,255,255,.60);
  font-size: .85rem;
  margin-top: 2px;
}

.pm-itemActions{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:flex-end;
}

.pm-qty{
  width: 80px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.92);
}

/* Cart side */
.pm-right{
  height: 100%;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius: 14px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.pm-cartHeader{
  padding: 12px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.pm-cartTitle{
  font-weight: 800;
  color: rgba(255,255,255,.95);
}
.pm-cartSub{
  margin-top:2px;
  color: rgba(255,255,255,.62);
  font-size:.86rem;
}

.pm-cartItems{
  flex:1;
  overflow:auto;
  padding: 10px 10px 6px;
}

.pm-cartRow{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 10px;
}

.pm-cartRowTop{
  display:flex;
  justify-content:space-between;
  gap:10px;
}
.pm-cartName{
  font-weight: 650;
  color: rgba(255,255,255,.92);
  min-width:0;
}
.pm-cartGroup{
  color: rgba(255,255,255,.60);
  font-size:.84rem;
  margin-top:2px;
}
.pm-cartControls{
  display:flex;
  gap:8px;
  align-items:center;
}
.pm-cartQty{
  width: 72px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.92);
}

.pm-cartFooter{
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 12px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.pm-cartMeta{
  color: rgba(255,255,255,.70);
  font-size:.9rem;
}

.pm-cartHint{
  color: rgba(255,255,255,.55);
  font-size:.82rem;
  line-height: 1.35;
}

/* ---- Right column becomes: header / cart scroll / address scroll / footer ---- */
.pm-right{
  height: 100%;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius: 14px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height:0; /* important for nested scroll areas */
}

.pm-cartItems{
  flex: 1;
  min-height: 0;
  overflow:auto;
  padding: 10px 10px 6px;
}

/* ---- Address panel (sits between cart + submit) ---- */
.pm-addressPanel{
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 10px;
  background: rgba(0,0,0,.10);
  min-height: 140px;   /* stops it collapsing too much */
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:0;
}

.pm-panelTitle{
  font-weight: 800;
  color: rgba(255,255,255,.92);
  font-size: .95rem;
}

.pm-panelBody{
  min-height:0;
  overflow:auto;        /* address scrolls if long */
  padding-right: 6px;
}

/* buttons row */
.pm-addrModes{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  margin-bottom: 10px;
}


.pm-addrModes .btnSmall{
  font-size: .75rem;
}


/* address blocks inside */
.pm-addrBlock{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  border-radius: 12px;
  padding: 5px;
}

/* compact form styling (separate from your .no-* so it stays consistent in modal) */
.pm-label{
  display:block;
  font-size: .82rem;
  color: rgba(255,255,255,.70);
  margin-bottom: 6px;
}

.pm-input,
.pm-select2{
  width:100%;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.92);
  outline:none;
  font-size:0.75rem;
}

.pm-select2 option, .pm-select option {
  background-color: var(--dark);
  color: #fff;
}

.pm-select2 option:checked, .pm-select2 option:hover, .pm-select option:checked, .pm-select option:hover {
  background-color: var(--title);
  color: #fff;
}

.pm-input:focus,
.pm-select2:focus{
  border-color: rgba(13,110,253,.55);
  box-shadow: 0 0 0 3px rgba(13,110,253,.15);
}

.pm-hint{
  margin-top:8px;
  color: rgba(255,255,255,.60);
  font-size: .82rem;
  line-height: 1.35;
}

.pm-sectionTitle{
  font-weight: 750;
  color: rgba(255,255,255,.88);
  font-size: .88rem;
  margin: 4px 0 8px;
}

.pm-divider,
.pm-divider::before{
  display:block;
}

.pm-divider{
  height:1px;
  background: rgba(255,255,255,.10);
  margin: 10px 0;
}

/* grid for address inputs */
.pm-formGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pm-field{ min-width:0; }
.pm-col-12{ grid-column: 1 / -1; }

.pm-addrModes .btn.isActive{
  background: rgba(13,110,253,.20);
  border-color: rgba(13,110,253,.55);
}

/* ==============================
   Right column: Cart + Address
   ============================== */

.pm-right{
  height: 100%;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius: 14px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

/* NEW: body stack (cart + address) */
.pm-rightBody{
  flex:1;
  min-height:0; /* critical for nested scroll areas */
  display:flex;
  flex-direction:column;
  gap:10px;
  padding: 10px;
  overflow:hidden;
}

/* Pane wrappers */
.pm-cartPane,
.pm-addrPane{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  border-radius: 14px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height:0;
}

/* Give cart more space than address */
.pm-cartPane{ flex: 1.25; }
.pm-addrPane{ flex: 1; }

/* Pane headers */
.pm-paneTitleRow{
  padding: 10px 12px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.pm-paneTitle{
  font-weight: 800;
  color: rgba(255,255,255,.95);
}
.pm-paneMeta{
  color: rgba(255,255,255,.62);
  font-size:.86rem;
}

/* Cart items now scroll within its pane */
.pm-cartItems{
  flex:1;
  min-height:0;
  overflow:auto;
  padding: 10px 10px 6px;
}

/* Address area scroll */
.pm-addrScroll{
  flex:1;
  min-height:0;
  overflow:auto;
  padding: 10px 12px;
}

/* Submit pinned bar */
.pm-submitBar{
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  background: rgba(30,33,38,.98);
}

/* Optional: reduce address spacing a touch */
.pm-addressPanel .pm-formGrid{
  gap:10px;
}
.pm-addressPanel .pm-field{
  margin-bottom: 8px;
}

/* Notification bell states */
.btnBellOn{
  background: rgba(25,135,84,.22) !important;
  border: 1px solid rgba(25,135,84,.55) !important;
}
.btnBellOff{
  background: rgba(108,117,125,.18) !important;
  border: 1px solid rgba(108,117,125,.45) !important;
}

.pushPrefRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 0;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.pushPrefRow:last-child{
  border-bottom:none;
}

.pushPrefText{
  min-width:0;
}

.pushPrefTitle{
  font-weight:600;
  color:#fff;
}

.pushPrefSub{
  font-size:.85rem;
  opacity:.75;
}

.pushToggle{
  width:18px;
  height:18px;
  cursor:pointer;
}

/* Mobile: stack columns */
@media (max-width: 980px){
  .pm-body{
    grid-template-columns: 1fr;
    height: auto;
  }
  .pm-card{
    height: auto;
    margin: 16px auto;
  }
  .pm-right{
    height: auto;
  }
  .pm-rightBody{
    max-height: 60vh; /* keeps things usable on mobile */
  }
}


@media (max-width: 520px){
  .pm-formGrid{
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 980px){
  .pm-body{ grid-template-columns: 1fr; height: calc(100% - 58px); }
  .pm-right{ height: 320px; }
}
/* responsive */
@media (max-width: 900px){
  .pickGrid{ grid-template-columns: repeat(3, minmax(0, 1fr)); width:100%; }
}
@media (max-width: 620px){
  .pickGrid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Responsive fallback (still centered) */
@media (max-width: 900px){
  #typeGroupBtns,
  #typeBtns{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }
}
@media (max-width: 620px){
  #typeGroupBtns,
  #typeBtns{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Push Preferences modal */
#pushPrefsBackdrop{
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(0,0,0,.60);
  backdrop-filter: blur(3px);
}
#pushPrefsBackdrop.hidden{ display:none !important; }

#pushPrefsModal{
  position: fixed;
  inset: 0;
  z-index: 10021;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
}
#pushPrefsModal.hidden{ display:none !important; }

#pushPrefsModal .pw-card,
#pushPrefsModal .am-card,
#pushPrefsModal .pm-card{
  width: min(640px, calc(100% - 24px));
  max-height: min(80vh, 720px);
  margin: 0;
  overflow: auto;
  pointer-events: auto;
  z-index: 2;
}

@media (max-width: 720px){
  #pushPrefsModal{
    align-items: flex-start;
    padding: 10px;
  }

  #pushPrefsModal .pw-card,
  #pushPrefsModal .am-card,
  #pushPrefsModal .pm-card{
    width: calc(100% - 4px);
    max-height: calc(100vh - 20px);
  }
}
/* modern slide-reveal icon buttons */
.iconSlide{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:0;
  min-width:2.4rem;
  padding-left:.7rem;
  padding-right:.7rem;
  overflow:hidden;
  white-space:nowrap;
  transition:
    width .25s ease,
    max-width .25s ease,
    padding .25s ease,
    gap .25s ease,
    background-color .2s ease,
    border-color .2s ease,
    transform .12s ease;
}

.iconSlide .icon{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
}

.iconSlide .label{
  display:inline-block;
  max-width:0;
  opacity:0;
  overflow:hidden;
  white-space:nowrap;
  transform:translateX(-8px);
  transition:
    max-width .25s ease,
    opacity .18s ease,
    transform .25s ease,
    margin-left .25s ease;
  margin-left:0;
}

/* reveal text on hover/focus */
.iconSlide:hover,
.iconSlide:focus-visible{
  gap:.45rem;
  padding-right:.95rem;
}

.iconSlide:hover .label,
.iconSlide:focus-visible .label{
  max-width:220px;
  opacity:1;
  transform:translateX(0);
  margin-left:.1rem;
}

/* optional polish */
.iconSlide:hover,
.iconSlide:focus-visible{
  transform:translateY(-1px);
}

/* mobile / touch: keep icon-only */
@media (hover: none){
  .iconSlide .label{
    max-width:0 !important;
    opacity:0 !important;
    transform:translateX(-8px) !important;
    margin-left:0 !important;
  }

  .iconSlide:hover,
  .iconSlide:focus-visible{
    gap:0;
    padding-right:.7rem;
    transform:none;
  }
}

#btnPushPrefs:hover,
#btnPushPrefs:focus-visible{
  background:rgba(13,110,253,.14);
  border-color:rgba(13,110,253,.35);
}

#btnChangePw:hover,
#btnChangePw:focus-visible{
  background:rgba(255,193,7,.14);
  border-color:rgba(255,193,7,.35);
}

#btnLogout:hover,
#btnLogout:focus-visible{
  background:rgba(220,53,69,.14);
  border-color:rgba(220,53,69,.35);
}

.no-toggle {
  display: flex;
  background-color: rgba(255,255,255,.10);
    color: #fff;
    color-scheme: dark;
  padding: 4px;
  gap: 4px;
  border: 2px solid rgba(255,255,255,.18);
  border-radius: 12px;
}

.toggle-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  color: #fff;
  transition: all 0.2s ease;
}

.toggle-btn:hover {
  background: rgba(0,0,0,0.35);
}

.toggle-btn.active {
  background-color: rgba(25,135,84,.20);
    border-color: #198754;
    color: #198754;
    font-weight: 600;
}

#windowImg {
  width: 6rem;
  height: 6rem;
  display: inherit;
  border: 2px solid rgba(255,255,255,.18);
  border-radius: 12px;
  background-color: rgba(255,255,255,.10);
  padding:0.25rem;
  float: right;
  right: -17rem;
  position: relative;
  top:-1.75rem;
  margin-bottom:-2rem;
}
#windowImg::before {
  content: "Glass Sample";
  position: absolute;
  left: -6rem; /* adjust spacing */
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: #fff;
  white-space: nowrap;
}

#windowImg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px; /* slightly smaller than parent */
}

#hingeSection {
  display: hidden;
}
.input-minmax{
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.2;
  color: rgba(255,255,255,.68);
}

@media (max-width: 900px){
  .statusPill {
      border-radius: 9px;
  }
}
.no-field{
  position: relative;
}

.limit-hint{
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 50;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.35;
  background: #222;
  color: #fff;
  border: 1px solid #444;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  white-space: nowrap;
}

.limit-hint.valid{
  background: #eaf8ee;
  color: #187a35;
  border-color: #7bc58f;
}

.limit-hint.invalid{
  background: #fff1f1;
  color: #b42318;
  border-color: #f1aeb5;
}

.no-input.input-limit-error{
  border-color: #d92d20 !important;
  box-shadow: 0 0 0 3px rgba(217,45,32,0.12);
  background: #fff5f5;
  color:#000;
}

.no-input.input-limit-ok{
  border-color: #16a34a;
}
.hinge-wrap{
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;

  border: 1px solid #e5e7eb;
}

.hinge-title{
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.hinge-image-box{
  display: flex;
  justify-content: center;
  align-items: center;
 background: rgba(153,152,151,0.24);
  border-radius: 8px;
  padding: 10px;
  border: 1px dashed #e5e7eb;
}

#hingePhoto{
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
}
.custChatBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9998;
}

.custChatModal {
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(920px, calc(100vw - 24px));
  height: min(82vh, 760px);
  background: #f7f9fc;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.28);
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

.custChatHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.custChatHeadMain {
  min-width: 0;
}

.custChatTitle {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f2937;
}

.custChatSub {
  margin-top: 3px;
  font-size: 0.84rem;
  color: #667085;
  line-height: 1.35;
}

.custChatClose {
  border: 0;
  background: #eef2f7;
  color: #333;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
}

.custChatClose:hover {
  background: #e2e8f0;
}

.custChatThread {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background:
    linear-gradient(rgba(255,255,255,0.84), rgba(255,255,255,0.84)),
    url('../img/double-bubble.webp') repeat;
}

.custMsgRow {
  display: flex;
  margin-bottom: 12px;
}

.custMsgRow.customer {
  justify-content: flex-end;
}

.custMsgRow.staff {
  justify-content: flex-start;
}

.custMsgBubble {
  max-width: min(76%, 640px);
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.94rem;
  line-height: 1.45;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  word-break: break-word;
}

.custMsgRow.customer .custMsgBubble {
  background: #d8e4ff;
  color: #111827;
  border-bottom-right-radius: 6px;
  text-align: right;
}

.custMsgRow.staff .custMsgBubble {
  background: #e8ffe8;
  color: #1f2937;
  border-bottom-left-radius: 6px;
  text-align: left;
}

.custMsgMeta {
  display: block;
  margin-top: 6px;
  font-size: 0.72rem;
  opacity: 0.72;
}

.custChatComposer {
  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 14px;
}

.custChatInput {
  width: 100%;
  min-height: 54px;
  max-height: 180px;
  resize: vertical;
  border: 1px solid #d7dce2;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.95rem;
  line-height: 1.45;
  box-sizing: border-box;
}

.custChatActions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.custChatStatus {
  font-size: 0.84rem;
  color: #666;
  min-height: 18px;
}

.custChatSend {
  border: 0;
  background: #198754;
  color: #fff;
  border-radius: 12px;
  padding: 11px 18px;
  font-weight: 700;
  cursor: pointer;
}

.custChatSend:hover {
  background: #157347;
}

.custChatSend:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.custChatEmpty {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  color: #666;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.btnAmendChat {
  background: #6f42c1;
  color: #fff;
}

.btnAmendChat:hover {
  background: #5e35b1;
}

@media (max-width: 640px) {
  .custChatModal {
    width: calc(100vw - 12px);
    height: calc(100vh - 12px);
    border-radius: 14px;
  }

  .custMsgBubble {
    max-width: 86%;
  }

  .custChatActions {
    flex-direction: column;
    align-items: stretch;
  }

  .custChatSend {
    width: 100%;
  }
}

.custChatModal {
  background: #343a40;
  color: #e9ecef;
}

/* Header */
.custChatHeader {
  background: #2f343a;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.custChatTitle {
  color: #f1f3f5;
}

.custChatSub {
  color: #adb5bd;
}

.custChatClose {
  background: #495057;
  color: #f1f3f5;
}

.custChatClose:hover {
  background: #5c636a;
}

/* Chat background */
.custChatThread {
  background:
    linear-gradient(rgba(52,58,64,0.92), rgba(52,58,64,0.92)),
    url('../img/double-bubble.webp') repeat;
}

/* Customer (you) */
.custMsgRow.customer .custMsgBubble {
  background: #3b82f6;
  color: #fff;
}

/* Staff */
.custMsgRow.staff .custMsgBubble {
  background: #495057;
  color: #f1f3f5;
}

/* Meta text */
.custMsgMeta {
  color: #ced4da;
  opacity: 0.7;
}

/* Composer */
.custChatComposer {
  background: #2f343a;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* Input */
.custChatInput {
  background: #495057;
  color: #f1f3f5;
  border: 1px solid rgba(255,255,255,0.12);
}

.custChatInput::placeholder {
  color: #adb5bd;
}

/* Status */
.custChatStatus {
  color: #adb5bd;
}

/* Send button */
.custChatSend {
  background: #198754;
}

.custChatSend:hover {
  background: #157347;
}

/* Empty state */
.custChatEmpty {
  background: #2f343a;
  color: #adb5bd;
}

.portalChatAlert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #6f42c1;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  vertical-align: middle;
}

.portalChatAlertIcon {
  font-size: 0.9rem;
  line-height: 1;
}

.portalChatAlertCount {
  min-width: 16px;
  text-align: center;
}
