/* Store UI – v17.0 (Material Store / Google Play-like)
   هدف التصميم:
   - شكل متجر مثل Google Play (بدون تقليد حرفي للأصول).
   - No Sidebar (Option 2B): Tabs أعلى + Bottom Nav للموبايل.
   - Skin system: كل سكين يغير الـ CSS variables فقط.
*/

:root{
  /* Layout heights (synced by JS) */
  --header-h: 64px;
  --tabs-h: 48px;
  --bottom-nav-h: 0px;

  --radius: 16px;
  --radius-sm: 12px;

  /* Material-like tokens (skin overrides) */
  --md-bg: #f6f8fb;
  --md-surface: #ffffff;
  --md-surface2: #f1f3f6;
  --md-surface3: #e8eef9;
  --md-text: #202124;
  --md-muted: #5f6368;
  --md-outline: rgba(32,33,36,.14);
  --md-shadow: 0 1px 2px rgba(0,0,0,.08), 0 6px 20px rgba(0,0,0,.06);

  --md-primary: #1a73e8;
  --md-on-primary: #ffffff;
  --md-chip: rgba(26,115,232,.10);
  --md-chip-active: rgba(26,115,232,.16);
}

html{ scroll-behavior: smooth; }

body{
  background: var(--md-bg) !important;
  color: var(--md-text);
  font-family: "Tajawal", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
body.lang-en{ font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }

/* Space for fixed header/tabs and bottom nav */
body.has-fixed-header{
  /* zfix.css forces body padding-top using --nav-h.
     Keep this compatible even if zfix is removed. */
  padding-top: var(--nav-h, calc(var(--header-h) + var(--tabs-h) + 10px));
  padding-bottom: calc(var(--bottom-nav-h) + 18px);
}

/* ===== Cover (Home) ===== */
.home-cover{
  position: relative;
  border-radius: var(--radius);
  overflow: visible;
  border: 1px solid var(--md-outline);
  background: radial-gradient(1200px 420px at 20% 0%, rgba(26,115,232,.20), transparent 60%),
              radial-gradient(900px 420px at 90% 20%, rgba(52,168,83,.18), transparent 55%),
              var(--md-surface);
  box-shadow: var(--md-shadow);
  min-height: 240px;
}
.home-cover.has-img{
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.home-cover__overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.15) 55%, rgba(0,0,0,0));
  pointer-events: none;
}
body.lang-en .home-cover__overlay{
  background: linear-gradient(270deg, rgba(0,0,0,.55), rgba(0,0,0,.15) 55%, rgba(0,0,0,0));
}
.home-cover__content{
  position: relative;
  padding: 22px;
  color: #fff;
  max-width: 720px;
}
.home-cover__title{ font-size: 1.9rem; font-weight: 1000; margin: 0; }
.home-cover__sub{ margin-top: 10px; color: rgba(255,255,255,.85); line-height: 1.7; }
.home-cover__actions{ display:flex; flex-wrap:wrap; gap: 10px; margin-top: 14px; }
.home-cover__btn{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  color: #fff;
  text-decoration:none;
  font-weight: 900;
}
.home-cover__btn.primary{ background: var(--md-primary); border-color: rgba(0,0,0,0); color: var(--md-on-primary); }
.home-cover__btn:hover{ filter: brightness(1.03); }

@media (max-width: 575.98px){
  .home-cover{ min-height: 220px; }
  .home-cover__title{ font-size: 1.45rem; }
  .home-cover__content{ padding: 18px; }
}

/* ===== Appbar ===== */
.store-appbar{
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--md-outline);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
body.ui-skin-midnight .store-appbar,
body.ui-skin-carbon .store-appbar,
body.ui-skin-terminal .store-appbar,
body.ui-skin-matrix .store-appbar,
body.ui-skin-cyberpunk .store-appbar,
body.ui-skin-space .store-appbar,
body.ui-skin-boardroom .store-appbar{
  background: rgba(18,18,18,.86);
}

.store-appbar__inner{
  height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
}

/* Mobile: search gets its own full-width row (easier typing) */
@media (max-width: 768px){
  .store-appbar__inner{
    height: auto;
    flex-wrap: wrap;
    padding: 10px 12px;
    gap: 10px;
  }
  .store-search{
    order: 1;
    flex: 1 1 100%;
    max-width: none;
    width: 100%;
    height: 46px;
  }
  .store-brand{
    order: 2;
    min-width: 0;
    flex: 1 1 auto;
  }
  .store-actions{
    order: 3;
    flex: 0 0 auto;
    margin-inline-start: auto;
    gap: 6px;
  }
  .store-icon-btn{
    height: 40px;
    min-width: 40px;
    padding: 0 10px;
  }
}

.store-brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--md-text);
  min-width: 160px;
}
.store-brand__logo{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(0,0,0,.10);
}
.store-brand__logo--fallback{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--md-primary);
  color: var(--md-on-primary);
}
.store-brand__name{
  font-weight: 800;
  letter-spacing: .2px;
  line-height: 1;
}

.store-search{
  position: relative;
  flex: 1 1 auto;
  max-width: 820px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 44px;
  border-radius: 999px;
  background: var(--md-surface2);
  border: 1px solid rgba(0,0,0,.0);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.store-search i{ color: var(--md-muted); font-size: 1rem; }
.store-search__input{
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  font-size: 0.98rem;
  color: var(--md-text);
}
.store-search:focus-within{
  background: var(--md-surface);
  border-color: var(--md-outline);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.store-actions{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.store-icon-btn{
  height: 42px;
  min-width: 42px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--md-outline);
  background: var(--md-surface);
  color: var(--md-text);
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.store-icon-btn:hover{ background: var(--md-surface2); }
.store-user-avatar-img{
  width: 30px;
  height: 30px;
  border-radius: 999px;
  object-fit: cover;
  display: inline-block;
  flex: 0 0 auto;
}
.store-pill-btn{
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.0);
  background: var(--md-primary);
  color: var(--md-on-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.store-pill-btn:hover{ filter: brightness(.97); }

.store-badge{
  position: absolute;
  top: 6px;
  inset-inline-start: 24px;
  background: #ea4335;
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  padding: 1px 6px;
  display: inline-block;
  line-height: 1.4;
  border: 2px solid var(--md-surface);
  box-shadow: 0 6px 14px rgba(0,0,0,.12);
}
.store-badge.show{ display: inline-block; }
.store-lang{ font-size: 12px; font-weight: 800; opacity: .85; }
.dd-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 18px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--md-chip);
  color: var(--md-text);
  font-weight: 800;
  font-size: 11px;
  margin-inline-end: 8px;
}

@media (max-width: 575.98px){
  .store-brand{ min-width: auto; }
  .store-brand__name{ display: none !important; }
  .store-search{ height: 42px; padding: 0 12px; }
  .store-search__input{ font-size: .95rem; }
}

/* ===== Tabs ===== */
.store-tabs{
  border-top: 1px solid rgba(0,0,0,.06);
  background: transparent;
}
.store-tabs__inner{
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 10px 10px;
  scrollbar-width: none;
}
.store-tabs__inner::-webkit-scrollbar{ display:none; }

.store-tab{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--md-text);
  opacity: .82;
  background: transparent;
  border: 1px solid transparent;
  white-space: nowrap;
  font-weight: 700;
}
.store-tab i{ font-size: 1rem; }
.store-tab:hover{ background: var(--md-surface2); color: var(--md-text); opacity: 1; }
.store-tab.active{
  background: var(--md-chip-active);
  color: var(--md-text);
  opacity: 1;
  border-color: rgba(0,0,0,.04);
}

/* ===== Main ===== */
.store-main .container{ max-width: 1200px; }

.store-alert{ border-radius: var(--radius-sm); }

/* ===== Home shelves ===== */
.home-cover{
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--md-outline);
  box-shadow: var(--md-shadow);
  overflow: visible;
  background: var(--md-surface);
  background-size: cover;
  background-position: center;
  min-height: 240px;
}
.home-cover__overlay{
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.62), rgba(0,0,0,.25) 55%, rgba(0,0,0,.05)),
    linear-gradient(135deg, rgba(26,115,232,.15), rgba(0,230,118,.10));
}
.home-cover__content{
  position: relative;
  z-index: 1;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.home-cover__title{
  margin: 0;
  font-size: 1.6rem;
  font-weight: 950;
  letter-spacing: .2px;
}
.home-cover__sub{ margin: 8px 0 0; color: rgba(255,255,255,.86); max-width: 54rem; }
.home-cover__actions{ display: flex; flex-wrap: wrap; gap: 10px; }

/* Make cover text readable across skins */
.home-cover, .home-cover *{ color: #fff; }
.home-cover .btn-outline-primary{ color: #fff; border-color: rgba(255,255,255,.55); }
.home-cover .btn-outline-primary:hover{ background: rgba(255,255,255,.10); }
.home-cover .chip{ background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
.home-cover .chip:hover{ background: rgba(255,255,255,.12); }

@media (max-width: 560px){
  .home-cover{ min-height: 200px; }
  .home-cover__title{ font-size: 1.3rem; }
  .home-cover__sub{ font-size: .95rem; }
}

.home-hero{
  background: var(--md-surface);
  border: 1px solid var(--md-outline);
  border-radius: var(--radius);
  box-shadow: var(--md-shadow);
  padding: 18px;
}
.home-hero__row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.home-hero__title{ font-size: 1.4rem; font-weight: 900; margin: 0; }
.home-hero__sub{ color: var(--md-muted); margin-top: 6px; }

.chip-row{
  display:flex;
  align-items:center;
  gap: 8px;
  overflow-x:auto;
  padding: 6px 2px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar{ display:none; }
.chip{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: var(--md-surface);
  border: 1px solid var(--md-outline);
  color: var(--md-text);
  text-decoration:none;
  font-weight: 700;
  white-space: nowrap;
}
.chip:hover{ background: var(--md-surface2); }
.chip.active{ background: var(--md-chip-active); border-color: rgba(0,0,0,.06); }

/* Home cover category menu: main category + hover sub-menu */
.home-cat-menu{
  position: relative;
  z-index: 3;
  overflow: visible;
}
.home-cat-menu .chip-dropdown{
  position: relative;
  display: inline-flex;
}
.home-cat-menu .chip-main--menu{
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.home-cat-menu .chip-main--menu i{
  font-size: .72rem;
  opacity: .9;
}
.home-cat-menu .chip-dropdown__menu{
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: calc(100% + 8px);
  inset-block-end: auto;
  min-width: 190px;
  display: none !important;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(21,24,30,.95);
  box-shadow: 0 14px 30px rgba(0,0,0,.28);
  backdrop-filter: blur(8px);
}
.home-cat-menu .chip-dropdown:hover .chip-dropdown__menu{
  display: flex !important;
}
.home-cat-menu .chip-dropdown__item{
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
.home-cat-menu .chip-dropdown__item:hover{
  background: rgba(255,255,255,.12);
  color: #fff;
}

.shelf{ margin-top: 18px; }
.shelf-head{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.shelf-title{ margin:0; font-size: 1.1rem; font-weight: 900; }
.shelf-more{ text-decoration:none; color: var(--md-primary); font-weight: 800; }
.shelf-more:hover{ text-decoration: underline; }

.shelf-row{
  display:flex;
  gap: 12px;
  overflow-x:auto;
  padding: 2px 2px 10px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.shelf-row::-webkit-scrollbar{ display:none; }

/* Card (tile) */
.app-tile{
  width: 190px;
  min-width: 190px;
  background: var(--md-surface);
  border: 1px solid var(--md-outline);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  scroll-snap-align: start;
  text-decoration: none;
  color: var(--md-text);
}
.app-tile:hover{ transform: translateY(-2px); box-shadow: var(--md-shadow); border-color: rgba(0,0,0,.18); }
.app-tile__img{
  width:100%;
  height: 120px;
  object-fit: cover;
  background: var(--md-surface2);
}
.app-tile__body{ padding: 12px 12px 14px; }
.app-tile__title{ font-weight: 900; font-size: .98rem; margin: 0 0 4px; }
.app-tile__sub{ font-size: .86rem; color: var(--md-muted); margin: 0; }
.app-tile__meta{ display:flex; align-items:center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.price-badge{
  display:inline-flex;
  align-items:center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--md-chip);
  color: var(--md-text);
  font-weight: 900;
  font-size: .82rem;
}
.pill-free{ background: rgba(52,168,83,.14); }
.pill-discount{ background: rgba(234,67,53,.10); }

@media (max-width: 575.98px){
  .app-tile{ width: 165px; min-width: 165px; }
  .app-tile__img{ height: 108px; }
}

/* Grid pages */
.app-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}
.app-grid .app-tile{ width: 100%; min-width: 0; }
@media (max-width: 575.98px){
  .app-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.page-head{
  background: var(--md-surface);
  border: 1px solid var(--md-outline);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
  margin-bottom: 14px;
}
.page-head__title{ font-weight: 900; margin: 0; }
.page-head__sub{ color: var(--md-muted); margin-top: 4px; }

/* Compatibility: old project-card -> map to tiles */
.project-card{
  border-radius: 18px !important;
  border: 1px solid var(--md-outline) !important;
  box-shadow: 0 1px 0 rgba(0,0,0,.02) !important;
}
.project-card:hover{ box-shadow: var(--md-shadow) !important; }
.project-media{ position: relative; }
.project-cover{ width: 100%; height: 170px; object-fit: cover; background: var(--md-surface2); }
.price-pill{
  position:absolute;
  top: 10px;
  inset-inline-start: 10px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.08);
  color: var(--md-text);
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: .82rem;
}
.project-action{
  position:absolute;
  top: 10px;
  inset-inline-end: 10px;
}

/* ===== Footer ===== */
.store-footer{ border-top: 1px solid var(--md-outline); background: transparent; }

/* ===== Bottom nav (mobile) ===== */
.bottom-nav{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147482000;
  background: rgba(255,255,255,.94);
  border-top: 1px solid var(--md-outline);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.bottom-nav__inner{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 6px 6px 8px;
}
.bn-item{
  display:flex;
  flex-direction: column;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color: var(--md-muted);
  border-radius: 14px;
  padding: 6px 6px;
  gap: 3px;
  font-weight: 800;
  font-size: 11px;
}
.bn-item i{ font-size: 1.05rem; }
.bn-item.active{ background: var(--md-chip-active); color: var(--md-text); }
.bn-item:hover{ background: var(--md-surface2); color: var(--md-text); }

/* Keep chat bubble above bottom nav */
.chat-fab{ bottom: calc(var(--bottom-nav-h) + 18px) !important; }

/* ===== Notifications panel (make it match Material) ===== */
.notif-panel{
  border-radius: 18px !important;
  border: 1px solid var(--md-outline) !important;
  box-shadow: var(--md-shadow) !important;
  background: var(--md-surface) !important;
}
.notif-item{ border-bottom: 1px solid rgba(0,0,0,.06); }
.notif-item.unread{ background: rgba(26,115,232,.06); }

/* ===== Page loader (Material-ish) ===== */
#pageLoader .pl-card{
  border-radius: 18px;
  border: 1px solid var(--md-outline);
  background: var(--md-surface);
  box-shadow: var(--md-shadow);
}

/* Dark skins baseline adjustments */
body.ui-skin-midnight,
body.ui-skin-carbon,
body.ui-skin-terminal,
body.ui-skin-matrix,
body.ui-skin-cyberpunk,
body.ui-skin-space,
body.ui-skin-boardroom{
  --md-bg: #0f1115;
  --md-surface: #151821;
  --md-surface2: #1b2030;
  --md-surface3: #21263a;
  --md-text: #e7e9ee;
  --md-muted: rgba(231,233,238,.72);
  --md-outline: rgba(231,233,238,.12);
  --md-shadow: 0 2px 14px rgba(0,0,0,.35);
}
body.ui-skin-midnight .bottom-nav,
body.ui-skin-carbon .bottom-nav,
body.ui-skin-terminal .bottom-nav,
body.ui-skin-matrix .bottom-nav,
body.ui-skin-cyberpunk .bottom-nav,
body.ui-skin-space .bottom-nav,
body.ui-skin-boardroom .bottom-nav{
  background: rgba(21,24,33,.92);
}
body.ui-skin-midnight .store-appbar,
body.ui-skin-carbon .store-appbar,
body.ui-skin-terminal .store-appbar,
body.ui-skin-matrix .store-appbar,
body.ui-skin-cyberpunk .store-appbar,
body.ui-skin-space .store-appbar,
body.ui-skin-boardroom .store-appbar{
  border-bottom-color: rgba(231,233,238,.10);
}

/* Bootstrap buttons harmonization */
.btn-primary{
  background: var(--md-primary) !important;
  border-color: rgba(0,0,0,.0) !important;
  color: var(--md-on-primary) !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:focus-visible{
  color: var(--md-on-primary) !important;
}
.btn-outline-primary{
  color: var(--md-primary) !important;
  border-color: var(--md-primary) !important;
}
.btn-outline-primary:hover{
  background: var(--md-primary) !important;
  color: var(--md-on-primary) !important;
}
.bg-primary,
.text-bg-primary,
.badge.bg-primary,
.badge.text-bg-primary,
.page-item.active .page-link,
.page-link.active,
.nav-pills .nav-link.active,
.dropdown-item.active,
.dropdown-item:active,
.list-group-item.active{
  background: var(--md-primary) !important;
  color: var(--md-on-primary) !important;
  border-color: rgba(0,0,0,0) !important;
}

/* Make generic cards look consistent */
.card{ border-color: var(--md-outline); border-radius: var(--radius); }
.card.shadow-sm{ box-shadow: 0 1px 0 rgba(0,0,0,.02); }

/* ===== Support tickets and AI assistant – Messenger-like ===== */

/* Layout wrapper used by AI assistant and support tickets */
.doulab-chat-wrap{
  width: min(1200px, calc(100% - 28px));
  margin: 18px auto;
  display: grid;
  gap: 14px;
  align-items: stretch;
}

.doulab-panel{
  background: var(--md-surface);
  border: 1px solid var(--md-outline);
  border-radius: var(--radius);
  box-shadow: var(--md-shadow);
  overflow: hidden;
}

.doulab-panel .hd{
  padding: 12px 14px;
  border-bottom: 1px solid var(--md-outline);
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(180deg, rgba(0,0,0,.02), transparent);
}

.doulab-panel .hd .ttl{
  font-weight: 900;
  display:flex;
  align-items:center;
  gap: 10px;
}

.doulab-chat{
  display:flex;
  flex-direction: column;
  /* Take the remaining viewport height under the fixed header */
  height: calc(100vh - var(--nav-h, 130px) - 48px);
  min-height: 560px;
}

.doulab-msgs{
  flex: 1;
  overflow: auto;
  padding: 14px 14px 18px;
  /* Force predictable left/right alignment across RTL/LTR */
  direction: ltr;
  background:
    radial-gradient(900px 420px at 20% 0%, rgba(26,115,232,.12), transparent 60%),
    radial-gradient(700px 360px at 90% 20%, rgba(52,168,83,.10), transparent 55%),
    var(--md-bg);
}

.dmsg{
  display:flex;
  gap: 10px;
  margin: 10px 0;
  align-items: flex-end;
  justify-content: flex-start;
}
.dmsg.mine{ flex-direction: row-reverse; justify-content: flex-end; }

/* Keep Arabic message text RTL while layout stays LTR */
body.lang-ar .doulab-msgs :is(.bubble,.meta){ direction: rtl; text-align: right; }

.dmsg .avatar{
  width: 36px; height: 36px;
  border-radius: 999px;
  display:grid;
  place-items:center;
  border: 1px solid var(--md-outline);
  background: var(--md-surface);
  color: var(--md-muted);
  flex: 0 0 auto;
}
.dmsg.mine .avatar{
  border-color: rgba(26,115,232,.22);
  background: rgba(26,115,232,.12);
  color: var(--md-primary);
}
.dmsg .avatar i{ font-size: 14px; opacity: .95; }

.dmsg .bubble{
  max-width: min(78%, 680px);
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid var(--md-outline);
  background: var(--md-surface);
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
  position: relative;
  word-break: break-word;
}
.dmsg.mine .bubble{
  background: rgba(26,115,232,.12);
  border-color: rgba(26,115,232,.22);
}

.dmsg .bubble > div{ white-space: pre-wrap; }

.dmsg .meta{
  font-size: 12px;
  color: var(--md-muted);
  margin-top: 6px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}
.dmsg.mine .meta{ justify-content: flex-start; }

.dmsg .attach img{
  max-width: 100%;
  border-radius: 14px;
  border: 1px solid var(--md-outline);
  display:block;
  margin-top: 8px;
}

.dmsg .attach a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  text-decoration:none;
  margin-top: 8px;
  font-weight: 800;
  color: var(--md-primary);
}

.dmsg.typing .bubble{ opacity: .92; }

.doulab-form{
  display:flex;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid var(--md-outline);
  background: var(--md-surface);
  align-items:center;
}

.doulab-form input[type=text]{
  flex: 1;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--md-outline);
  border-radius: 999px;
  background: var(--md-surface2);
  color: var(--md-text);
  outline: 0;
}

.doulab-form input[type=text]::placeholder{ color: rgba(95,99,104,.85); }

body.ui-skin-midnight .doulab-form input[type=text]::placeholder,
body.ui-skin-carbon .doulab-form input[type=text]::placeholder,
body.ui-skin-terminal .doulab-form input[type=text]::placeholder,
body.ui-skin-matrix .doulab-form input[type=text]::placeholder,
body.ui-skin-cyberpunk .doulab-form input[type=text]::placeholder,
body.ui-skin-space .doulab-form input[type=text]::placeholder,
body.ui-skin-boardroom .doulab-form input[type=text]::placeholder{
  color: rgba(231,233,238,.55);
}

.doulab-form input[type=text]:focus{
  background: var(--md-surface);
  border-color: rgba(26,115,232,.35);
  box-shadow: 0 0 0 3px rgba(26,115,232,.18);
}

.doulab-icon-btn{
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid var(--md-outline);
  background: var(--md-surface2);
  color: var(--md-primary);
  display:grid;
  place-items:center;
  cursor:pointer;
  user-select:none;
}

.doulab-icon-btn i{ color: currentColor; }
.doulab-icon-btn:hover{ background: var(--md-surface3); color: var(--md-primary); }

.doulab-form .btn{
  height: 44px;
  border-radius: 999px !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}
.doulab-form .btn i{ margin: 0; }
.doulab-form :is(input,button)[disabled]{ opacity: .65; cursor: not-allowed; }

.doulab-note{
  padding: 10px 12px;
  font-size: 12px;
  color: var(--md-muted);
  border-top: 1px solid var(--md-outline);
  background: linear-gradient(180deg, rgba(0,0,0,.01), transparent);
}

/* Admin list panel inside chat (customers) */
.doulab-chat-wrap .list-group{
  border-radius: 0;
}
.doulab-chat-wrap .list-group-item{
  border-color: var(--md-outline);
}
.doulab-chat-wrap .list-group-item.active{
  background: rgba(26,115,232,.14);
  border-color: rgba(26,115,232,.18);
  color: var(--md-text);
}

/* Responsive: stack panels and increase message width */
@media (max-width: 992px){
  .doulab-chat-wrap{ grid-template-columns: 1fr !important; }
}

@media (max-width: 768px){
  .doulab-chat-wrap{ width: calc(100% - 18px); margin: 12px auto; gap: 12px; }
  .doulab-chat{ height: calc(100vh - var(--nav-h, 150px) - 24px); min-height: 520px; }
  .dmsg .bubble{ max-width: 88%; }
  .doulab-msgs{ padding: 12px 12px 14px; }
}



/* =========================
   v17 – fixes requested
   - Auth pages layout
   - Verified badge
   - Publish button ghost style
   - Stars rating input
   - Notifications panel position
========================= */

.store-pill-btn--ghost{
  background: transparent !important;
  color: var(--md-text) !important;
  border: 1px solid var(--md-outline) !important;
}
.store-pill-btn--ghost:hover{ background: var(--md-surface2) !important; }

.verified-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-inline-start: 6px;
  font-size: 14px;
  color: #1a73e8;
}
.verified-badge i{ filter: drop-shadow(0 1px 0 rgba(0,0,0,.08)); }

/* Developer line under title (Google Play-like) */
.app-devline{
  display:flex;
  align-items:center;
  gap:6px;
  color: var(--md-muted);
  font-size: 12.5px;
  margin-top: 3px;
}
.app-devline a{ color: inherit; text-decoration: none; }
.app-devline a:hover{ text-decoration: underline; }

/* Auth pages */
.auth-shell{
  max-width: 1040px;
  margin: 18px auto 24px;
  padding: 0 12px;
}
.auth-split{
  display:grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
  align-items: stretch;
}
.auth-card{
  background: var(--md-surface);
  border: 1px solid var(--md-outline);
  border-radius: var(--radius);
  box-shadow: var(--md-shadow);
  padding: 18px;
}
.auth-hero{
  border-radius: var(--radius);
  overflow:hidden;
  border: 1px solid var(--md-outline);
  background: radial-gradient(1200px 420px at 20% 0%, rgba(26,115,232,.18), transparent 60%),
              radial-gradient(900px 420px at 90% 20%, rgba(52,168,83,.16), transparent 55%),
              var(--md-surface);
  box-shadow: var(--md-shadow);
  position: relative;
  min-height: 360px;
}
.auth-hero img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
  opacity: .9;
}
.auth-hero .auth-hero__overlay{
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.02));
}
.auth-hero .auth-hero__text{
  position:absolute; inset-inline: 16px;
  bottom: 16px;
  color: #fff;
  text-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.auth-hero .auth-hero__text h2{ margin:0 0 4px; font-weight: 900; font-size: 22px; }
.auth-hero .auth-hero__text p{ margin:0; opacity:.95; font-size: 13px; }

@media (max-width: 992px){
  .auth-split{ grid-template-columns: 1fr; }
  .auth-hero{ min-height: 220px; order: -1; }
}

/* Stars rating input */
.star-input{
  display:inline-flex;
  gap: 6px;
  align-items:center;
  padding: 8px 10px;
  border: 1px solid var(--md-outline);
  border-radius: 14px;
  background: var(--md-surface);
}
.star-input button{
  appearance:none;
  border:0;
  background:transparent;
  padding: 2px;
  line-height:1;
  cursor:pointer;
  font-size: 18px;
  color: rgba(26,115,232,.28);
}
.star-input button.on{ color: #1a73e8; }
.star-input .star-val{
  margin-inline-start: 8px;
  font-size: 12px;
  color: var(--md-muted);
}

/* Fix notifications panel position under fixed header/tabs */
.notif-panel{
  top: calc(var(--header-h, 64px) + var(--tabs-h, 0px) + 12px) !important;
}

/* On very small screens, make search bar FULL width and FIRST always */
@media (max-width: 520px){
  .store-appbar__inner{ flex-wrap: wrap; gap: 10px; }
  .store-search{ order: -1; width: 100%; min-width: 0; }
  .store-search__input{ width: 100%; }
}

/* Like button (Facebook-like) */
.btn-like{
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  color: #111;
  border-radius: 999px;
}
.btn-like i{ color: #9aa0a6; }
.btn-like .badge{ background: rgba(0,0,0,.06) !important; }
.btn-like.is-liked{
  border-color: rgba(234,67,53,.35);
  background: rgba(234,67,53,.08);
  color: #d93025;
}
.btn-like.is-liked i{ color: #d93025; }
.btn-like.is-liked .badge{ background: rgba(234,67,53,.12) !important; }

/* Project gallery thumbs + viewer */
.proj-thumbs{ overflow-x: auto; padding-bottom: 4px; }
.hero-thumb{
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.15);
  border-radius: 14px;
  padding: 0;
  width: 92px;
  height: 62px;
  overflow: hidden;
}
.hero-thumb img{ width:100%; height:100%; object-fit: cover; display:block; }
.hero-thumb.active{ outline: 2px solid rgba(26,115,232,.95); outline-offset: 1px; }
.proj-zoom{ position: absolute; top: 12px; right: 12px; z-index: 5; border-radius: 999px; }
.viewer-img{ max-height: calc(100vh - 120px); object-fit: contain; }
.viewer-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.35);
  color: #fff;
}
.viewer-nav.prev{ left: 12px; }
.viewer-nav.next{ right: 12px; }
