/* Inter and DM Mono are served by Caramund; visiting a page does not contact Google Fonts. */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url('/static/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url('/static/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/static/fonts/dm-mono-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/static/fonts/dm-mono-regular-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/static/fonts/dm-mono-medium-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/static/fonts/dm-mono-medium-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --green: #0f9c98;
  --green-dark: #062a3a;
  --green-light: #38c7c2;
  --green-bg: #e5f7f5;
  --green-hover: #0b827f;
  --orange: #20aaa6;
  --orange-light: #67d8d3;
  --orange-bg: #e9faf8;
  --yellow: #f4d98a;
  --yellow-bg: #fffaf0;
  --beige: #f4efe7;
  --beige-dark: #e8dfd2;
  --beige-light: #faf7f0;
  --white: #ffffff;
  --ink: #062a3a;
  --ink-soft: #365563;
  --muted: #78909a;
  --border: #d8e4e3;
  --border-soft: #eaf1ef;
  --shadow: 0 1px 2px rgba(0,0,0,0.03), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.03);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.03);
  --shadow-xl: 0 20px 40px -10px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --nav-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--beige-light);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--green); text-decoration: none; transition: color .2s; }
a:hover { color: var(--green-dark); text-decoration: none; }

h1, h2, h3, h4 { font-weight: 800; color: var(--ink); letter-spacing: -.03em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }

code, .mono { font-family: 'DM Mono', monospace; }

.container { width: 100%; max-width: 1100px; padding: 2rem 1.5rem; margin: 0 auto; }

.gafam-strip {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 259;
  height: calc(32px + env(safe-area-inset-bottom));
  padding: 4px 12px calc(4px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--green-bg);
  border-top: 1px solid var(--border-soft);
  color: var(--green-dark);
  font-size: .72rem;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
}
.gafam-strip:hover { color: var(--green-dark); }
.gafam-strip svg { flex: none; }
.gafam-strip strong { font-weight: 750; }
body:not(:has(.petal-launcher)) { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
@media (max-width: 420px) { .gafam-strip { font-size: .64rem; padding-left: 4px; padding-right: 4px; gap: 3px; } }

/* ============ SALES NAV (public) ============ */
.sales-nav{max-width:1380px;margin:auto;padding:18px 48px;display:flex;align-items:center;justify-content:space-between;gap:25px;background:rgba(255,255,255,0.8);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-bottom:1px solid var(--border-soft);position:sticky;top:0;z-index:200}
.sales-brand{font-size:26px;letter-spacing:-1.5px;font-weight:900;display:flex;gap:9px;align-items:center;color:var(--green);text-decoration:none}
.sales-brand:hover{text-decoration:none}
.sales-brand>span:first-child{background:var(--green);color:#fff;border-radius:10px;width:36px;height:36px;text-align:center;font-size:26px;line-height:36px}
.sales-brand .brand-dot{font-size:9px;color:var(--orange);margin:0 0 -14px -5px}
.sales-links,.sales-actions{display:flex;align-items:center;gap:24px;font-size:14px;font-weight:600;color:var(--ink-soft)}
.sales-links a:hover,.sales-actions a:hover{color:var(--green);text-decoration:none}
.lang-switcher select{background:var(--white);border:1px solid var(--border);border-radius:10px;color:var(--ink);padding:6px 10px;font-size:.82rem;cursor:pointer;font-family:'Inter',sans-serif;transition:all .2s}
.lang-switcher select:hover{border-color:var(--green)}

/* ============ NAVBAR (app) ============ */
.navbar {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  border-bottom: 1px solid var(--border-soft);
}
.nav-left { display: flex; align-items: center; gap: 0.6rem; flex: 1; }
.nav-brand {
  font-size: 1.35rem; font-weight: 900; color: var(--green);
  letter-spacing: -.05em; text-decoration: none;
  display: flex; align-items: center; gap: 0.5rem;
  transition: opacity .2s;
}
.nav-brand:hover { text-decoration: none; opacity: .8; }
.nav-brand .logo-dot {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--green);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--white); font-weight: 900;
}

.nav-center { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; }
.nav-tab {
  display: flex; align-items: center; justify-content: center;
  padding: 8px 14px; border-radius: var(--radius);
  color: var(--muted); font-size: 1.2rem;
  text-decoration: none; transition: all 0.2s;
  position: relative; height: 42px; min-width: 48px;
}
.nav-tab:hover { background: var(--border-soft); color: var(--ink); text-decoration: none; }
.nav-tab.active { color: var(--green); background: var(--green-bg); font-weight: 600; }
.nav-tab .nav-badge {
  position: absolute; top: 2px; right: 4px;
  background: var(--orange); color: var(--white);
  border-radius: 10px; padding: 0 5px; font-size: 0.65rem; font-weight: 700;
  min-width: 16px; height: 16px; display: flex; align-items: center; justify-content: center;
}

.nav-right { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: flex-end; }
.nav-icon-btn {
  width: 38px; height: 38px; border-radius: var(--radius);
  background: transparent; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 1.05rem; cursor: pointer;
  text-decoration: none; transition: all 0.2s;
  position: relative; border: none;
}
.nav-icon-btn:hover { background: var(--border-soft); color: var(--ink); text-decoration: none; }
.nav-icon-btn .nav-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--orange); color: var(--white);
  border-radius: 10px; padding: 0 5px; font-size: 0.65rem; font-weight: 700;
  min-width: 16px; height: 16px; display: flex; align-items: center; justify-content: center;
}
.nav-avatar-placeholder {
  width: 38px; height: 38px; border-radius: var(--radius);
  background: var(--green); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.82rem; cursor: pointer;
  transition: opacity .2s;
}
.nav-avatar-placeholder:hover { opacity: .85; }

.account-menu { position: relative; }
.account-menu summary { list-style: none; font-size: .8rem; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-dropdown {
  position: absolute; right: 0; top: 48px; width: 260px; padding: 12px;
  background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl); z-index: 250;
  animation: dropIn .2s ease;
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.account-dropdown a, .account-dropdown strong { display: block; padding: .7rem .8rem; border-radius: var(--radius-sm); transition: background .15s; }
.account-dropdown a { color: var(--ink-soft); font-size: .9rem; font-weight: 500; }
.account-dropdown a:hover { background: var(--border-soft); color: var(--ink); text-decoration: none; }
.account-dropdown strong { color: var(--ink); font-size: .92rem; border-bottom: 1px solid var(--border-soft); margin-bottom: 4px; }

.leaflet-container { position: relative; z-index: 1; isolation: isolate; }

.organization-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .6rem 2rem; background: var(--white); border-bottom: 1px solid var(--border-soft);
}
.organization-bar form { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.organization-bar label { font-size: .75rem; white-space: nowrap; color: var(--muted); font-weight: 500; }
.organization-bar select { max-width: 450px; border: 0; background: transparent; font-size: .9rem; font-weight: 600; padding: .5rem; text-overflow: ellipsis; }
.org-calendar { white-space: nowrap; font-size: .8rem; font-weight: 600; }
.subscription-notice { padding: .8rem 1rem; text-align: center; background: var(--orange-bg); font-size: .85rem; color: var(--orange); font-weight: 500; }
.demo-notice { background: var(--green-bg); color: var(--green-dark); padding: .5rem 1rem; text-align: center; font-size: .75rem; font-weight: 500; }

/* ============ LAYOUT ============ */
.fb-layout {
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  gap: 1.5rem;
  max-width: 1400px; margin: 0 auto;
  padding: 1.5rem;
}
.fb-left { position: sticky; top: calc(var(--nav-h) + 24px); height: fit-content; max-height: calc(100vh - var(--nav-h) - 48px); overflow-y: auto; }
.fb-center { min-width: 0; max-width: 680px; margin: 0 auto; width: 100%; }
.fb-right { position: sticky; top: calc(var(--nav-h) + 24px); height: fit-content; max-height: calc(100vh - var(--nav-h) - 48px); overflow-y: auto; }
.public-layout { width: 100%; }
.public-layout .fb-center { max-width: none; margin: 0; width: 100%; }

@media (max-width: 1100px) {
  .fb-layout { grid-template-columns: 1fr; }
  .fb-left, .fb-right { display: none; }
}

/* ============ SIDEBAR ============ */
.sidebar-card { background: transparent; padding: 0.4rem 0; }
.sidebar-item {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.55rem 0.7rem; border-radius: var(--radius);
  color: var(--ink-soft); font-weight: 500; font-size: 0.9rem;
  text-decoration: none; transition: all 0.15s; cursor: pointer;
}
.sidebar-item:hover { background: var(--white); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.sidebar-item.active { background: var(--green-bg); color: var(--green); font-weight: 600; }
.sidebar-item-icon { font-size: 1.2rem; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sidebar-item .avatar-mini { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.sidebar-divider { height: 1px; background: var(--border-soft); margin: 0.6rem 0; }
.sidebar-label { font-size: 0.75rem; color: var(--muted); font-weight: 600; padding: 0.4rem 0.7rem; text-transform: uppercase; letter-spacing: .05em; }

/* ============ FEED ============ */
.feed-toolbar { display: flex; align-items: center; justify-content: space-between; margin: 0 0 1.5rem; }
.feed-toolbar h1 { font-size: 1.5rem; font-weight: 800; }
.post-plus { width: 40px; height: 40px; border: 0; border-radius: var(--radius); color: white; background: var(--green); font-size: 1.5rem; cursor: pointer; box-shadow: var(--shadow-md); transition: all .2s; }
.post-plus:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }

.feed-post {
  background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-lg);
  margin-bottom: 1rem; box-shadow: var(--shadow); overflow: hidden; transition: box-shadow .25s;
}
.feed-post:hover { box-shadow: var(--shadow-md); }
.feed-post-header { padding: 1rem 1.2rem; display: flex; align-items: center; gap: 0.7rem; }
.feed-post-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.feed-post-avatar-ph {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--white); font-size: 1rem;
}
.feed-post-info { flex: 1; }
.feed-post-author { font-weight: 700; font-size: 0.92rem; color: var(--ink); }
.feed-post-meta { font-size: 0.76rem; color: var(--muted); }
.feed-post-body { padding: 0 1.2rem 1rem; font-size: 0.94rem; color: var(--ink); line-height: 1.6; }
.feed-post-image { width: 100%; max-height: 500px; object-fit: cover; display: block; }
.feed-post-stats { padding: 0.5rem 1.2rem; display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); }
.feed-post-actions-bar {
  padding: 0.3rem 0.8rem; border-top: 1px solid var(--border-soft);
  display: flex; justify-content: space-around;
}
.feed-action-btn {
  display: flex; align-items: center; gap: 0.35rem;
  padding: 0.5rem 0.9rem; border-radius: var(--radius);
  background: transparent; border: none; cursor: pointer;
  font-weight: 600; font-size: 0.84rem; color: var(--ink-soft);
  transition: all 0.15s; flex: 1; justify-content: center;
}
.feed-action-btn:hover { background: var(--border-soft); }
.feed-action-btn .icon { font-size: 1.15rem; }
.feed-action-btn.liked { color: var(--green); }

.comments-section { padding: 0 1.2rem 1rem; border-top: 1px solid var(--border-soft); padding-top: 0.6rem; }
.comment-item { display: flex; gap: 0.5rem; margin-bottom: 0.6rem; }
.comment-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-avatar-ph { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; color: var(--white); flex-shrink: 0; }
.comment-bubble { background: var(--border-soft); border-radius: var(--radius); padding: 0.55rem 0.9rem; flex: 1; }
.comment-author { font-weight: 600; font-size: 0.82rem; color: var(--ink); }
.comment-text { font-size: 0.88rem; color: var(--ink); }
.comment-time { font-size: 0.7rem; color: var(--muted); margin-top: 0.15rem; }

/* ============ CARDS ============ */
.card {
  background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-lg);
  padding: 1.3rem; margin-bottom: 0.8rem; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.5rem; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.6rem 1.2rem; border-radius: var(--radius);
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.88rem;
  border: none; cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); color: var(--white); }
.btn-orange { background: var(--orange); color: var(--white); }
.btn-orange:hover { background: #ea6a0f; color: var(--white); }
.btn-success { background: #16a34a; color: var(--white); }
.btn-success:hover { background: #15803d; color: var(--white); }
.btn-danger { background: #dc2626; color: var(--white); }
.btn-danger:hover { background: #b91c1c; color: var(--white); }
.btn-secondary { background: var(--white); color: var(--ink); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border-soft); }
.btn-ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--border-soft); }
.btn-ghost:hover { background: var(--white); border-color: var(--border); color: var(--ink); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { padding: 0.5rem; width: 38px; height: 38px; justify-content: center; border-radius: var(--radius); }

/* ============ FORMS ============ */
input, textarea, select {
  width: 100%; padding: 0.7rem 0.9rem; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--border);
  color: var(--ink); font-family: 'Inter', sans-serif; font-size: 0.92rem;
  transition: all 0.2s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(13,148,136,0.1); }
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { resize: vertical; min-height: 80px; }
label { display: block; margin-bottom: 0.3rem; font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); }
.form-group { margin-bottom: 0.9rem; }
small { display: block; margin-top: 0.3rem; font-size: 0.78rem; color: var(--muted); }

/* ============ BADGES ============ */
.badge {
  display: inline-flex; align-items: center; gap: 0.2rem;
  padding: 0.15rem 0.6rem; border-radius: 20px;
  font-size: 0.72rem; font-weight: 600;
}
.badge-admin, .badge-super_admin { background: var(--green-bg); color: var(--green-dark); }
.badge-prof { background: var(--orange-bg); color: var(--orange); }
.badge-parent { background: #ecfdf5; color: #059669; }
.badge-eleve { background: var(--yellow-bg); color: #a16207; }
.badge-active { background: var(--green-bg); color: var(--green-dark); }
.badge-inactive { background: #fef2f2; color: #dc2626; }

/* ============ GRID ============ */
.grid { display: grid; gap: 0.8rem; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ============ MESSANGER ============ */
.messenger-fab {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 300;
  width: 52px; height: 52px; border-radius: var(--radius-lg);
  background: var(--green); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; cursor: pointer;
  box-shadow: 0 4px 20px rgba(13,148,136,0.3);
  transition: all 0.2s; border: none;
}
.messenger-fab:hover { transform: scale(1.05); box-shadow: 0 6px 24px rgba(13,148,136,0.4); }
.messenger-fab .fab-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--orange); color: var(--white);
  border-radius: 12px; padding: 0 6px; font-size: 0.72rem; font-weight: 700;
  min-width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--white);
}

.messenger-panel {
  position: fixed; bottom: 5.5rem; right: 1.5rem; z-index: 300;
  width: 380px; max-width: calc(100vw - 2rem);
  height: 520px; max-height: calc(100vh - 120px);
  background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl); display: flex; flex-direction: column;
  overflow: hidden; animation: msPop 0.25s ease;
}
@keyframes msPop { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

.messenger-header {
  background: var(--white); color: var(--ink); padding: 0.9rem 1.1rem;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border-soft);
}
.messenger-header h3 { color: var(--ink); font-size: 1.05rem; font-weight: 700; }
.messenger-header .ms-close { background: transparent; border: none; color: var(--muted); font-size: 1.2rem; cursor: pointer; padding: 0.2rem; border-radius: var(--radius); transition: all .15s; }
.messenger-header .ms-close:hover { background: var(--border-soft); color: var(--ink); }

.ms-rooms-list { flex: 1; overflow-y: auto; }
.ms-room-item {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.7rem 1.1rem; cursor: pointer; transition: background 0.15s;
  border-bottom: 1px solid var(--border-soft);
}
.ms-room-item:hover { background: var(--border-soft); }
.ms-room-avatar { width: 44px; height: 44px; border-radius: var(--radius); background: var(--green-bg); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.ms-room-info { flex: 1; min-width: 0; }
.ms-room-name { font-weight: 600; font-size: 0.9rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-room-meta { font-size: 0.76rem; color: var(--muted); }

.ms-chat { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.ms-chat-header {
  padding: 0.7rem 1rem; background: var(--white);
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; gap: 0.5rem;
}
.ms-chat-back { background: transparent; border: none; font-size: 1.1rem; cursor: pointer; padding: 0.3rem 0.5rem; border-radius: var(--radius); color: var(--ink-soft); transition: all .15s; }
.ms-chat-back:hover { background: var(--border-soft); }
.ms-chat-avatar { width: 36px; height: 36px; border-radius: var(--radius); background: var(--green-bg); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.ms-chat-name { font-weight: 700; font-size: 0.88rem; color: var(--ink); }
.ms-chat-status { font-size: 0.72rem; color: var(--muted); }

.ms-chat-messages {
  flex: 1; overflow-y: auto; padding: 0.8rem;
  display: flex; flex-direction: column; gap: 0.35rem;
  background: #f8fafc;
}
.ms-msg-bubble {
  max-width: 75%; padding: 0.5rem 0.85rem; border-radius: var(--radius-lg);
  font-size: 0.88rem; line-height: 1.4; word-wrap: break-word;
  animation: msMsgIn 0.2s ease;
}
@keyframes msMsgIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.ms-msg-bubble.from-other { align-self: flex-start; background: var(--white); color: var(--ink); border: 1px solid var(--border-soft); border-bottom-left-radius: 4px; }
.ms-msg-bubble.from-me { align-self: flex-end; background: var(--green); color: var(--white); border-bottom-right-radius: 4px; }
.ms-msg-bubble.from-other-img { padding: 0; background: transparent; border: none; }
.ms-msg-bubble.from-me-img { padding: 0; background: transparent; border: none; }
.ms-msg-bubble img { max-width: 100%; border-radius: var(--radius); display: block; }
.ms-msg-author { font-size: 0.74rem; font-weight: 700; color: var(--green); margin-bottom: 0.1rem; }
.ms-msg-time { font-size: 0.66rem; opacity: 0.6; margin-top: 0.1rem; }

.ms-chat-input { padding: 0.6rem; background: var(--white); border-top: 1px solid var(--border-soft); display: flex; gap: 0.35rem; align-items: center; }
.ms-chat-input textarea { flex: 1; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); padding: 0.45rem 0.8rem; font-size: 0.86rem; resize: none; min-height: 38px; max-height: 80px; }
.ms-chat-input textarea:focus { border-color: var(--green); }
.ms-chat-input button { width: 38px; height: 38px; border-radius: var(--radius); border: none; background: var(--green); color: var(--white); cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .15s; }
.ms-chat-input button:hover { background: var(--green-dark); }
.ms-typing { font-size: 0.76rem; color: var(--muted); padding: 0 0.8rem; font-style: italic; min-height: 18px; }

.ms-form { padding: 1.2rem; overflow: auto; }
.ms-actions { padding: .8rem; border-top: 1px solid var(--border-soft); }
.ms-feedback { padding: .7rem; color: #dc2626; font-size: .85rem; }
#messenger-content { display: flex; flex: 1; min-height: 0; flex-direction: column; overflow: auto; }
.ms-room-item { width: 100%; text-align: left; border: 0; background: var(--white); font: inherit; }
.ms-unread-badge { background: var(--orange); color: white; border-radius: 12px; min-width: 22px; padding: 2px 6px; font-size: 12px; font-weight: 700; text-align: center; }
.ms-unread-badge[hidden] { display: none; }

/* ============ CHAT PAGE ============ */
.chat-layout { display: grid; grid-template-columns: 340px 1fr; height: calc(100vh - var(--nav-h)); }
.chat-sidebar { background: var(--white); border-right: 1px solid var(--border-soft); overflow-y: auto; }
.chat-sidebar-header { padding: 1.2rem; background: var(--white); border-bottom: 1px solid var(--border-soft); }
.chat-sidebar-header h3 { color: var(--ink); }
.chat-sidebar-search { padding: 0.6rem; border-bottom: 1px solid var(--border-soft); }
.chat-sidebar-search input { background: var(--border-soft); border: none; border-radius: var(--radius); padding: 0.55rem 1rem; font-size: 0.86rem; }
.chat-room-item { display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 1.1rem; cursor: pointer; transition: background 0.15s; }
.chat-room-item:hover { background: var(--border-soft); }
.chat-room-item.active { background: var(--green-bg); border-left: 3px solid var(--green); }
.chat-room-avatar { width: 44px; height: 44px; border-radius: var(--radius); background: var(--green-bg); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.chat-room-name { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-room-meta { font-size: 0.75rem; color: var(--muted); }

.chat-main { display: flex; flex-direction: column; overflow: hidden; background: #f8fafc; }
.chat-header { padding: 0.8rem 1.2rem; background: var(--white); border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: space-between; }
.chat-header-info { display: flex; align-items: center; gap: 0.6rem; }
.chat-header-name { font-weight: 700; font-size: 0.95rem; }
.chat-header-status { font-size: 0.75rem; color: var(--muted); }
.chat-messages { flex: 1; overflow-y: auto; padding: 1.2rem; display: flex; flex-direction: column; gap: 0.35rem; }
.chat-input-bar { padding: 0.7rem 1.2rem; background: var(--white); border-top: 1px solid var(--border-soft); display: flex; gap: 0.5rem; align-items: flex-end; }
.chat-input-bar textarea { flex: 1; min-height: 40px; max-height: 100px; resize: none; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); padding: 0.55rem 1rem; font-size: 0.9rem; }
.chat-input-bar textarea:focus { border-color: var(--green); }

@media (max-width: 768px) { .chat-layout { grid-template-columns: 1fr; } .chat-sidebar { display: none; } }

/* ============ REELS / VIDEOS ============ */
.reels-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.reel-card {
  background: var(--ink); border-radius: var(--radius-lg); overflow: hidden;
  position: relative; aspect-ratio: 9/16; cursor: pointer; box-shadow: var(--shadow-md);
  transition: transform 0.2s;
}
.reel-card:hover { transform: scale(1.02); box-shadow: var(--shadow-lg); }
.reel-video { width: 100%; height: 100%; object-fit: cover; }
.reel-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.8)); padding: 1rem; color: var(--white); }
.reel-author { font-weight: 700; font-size: 0.85rem; display: flex; align-items: center; gap: 0.3rem; }
.reel-title { font-size: 0.8rem; opacity: 0.9; margin-top: 0.2rem; }
.reel-views { font-size: 0.72rem; opacity: 0.7; margin-top: 0.15rem; }

/* ============ MARKETPLACE ============ */
.market-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.market-card {
  background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); overflow: hidden;
  cursor: pointer; box-shadow: var(--shadow); transition: all 0.2s;
}
.market-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.market-card-link { color: inherit; display: block; }
.market-card-link:hover { text-decoration: none; }
.market-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.market-card-ph { width: 100%; aspect-ratio: 1; background: var(--border-soft); display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.market-card-body { padding: 1rem 1.1rem; }
.market-price { font-weight: 700; color: var(--green); font-size: 1.1rem; }
.market-title { font-size: 0.92rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.market-meta { font-size: 0.76rem; color: var(--muted); }
.market-visual { height: 220px; background: var(--border-soft); position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.market-visual img { width: 100%; height: 100%; object-fit: cover; }
.market-object { font-size: 6rem; filter: drop-shadow(0 16px 12px rgba(0,0,0,0.1)); transform: rotate(-8deg); }
.market-type { position: absolute; top: 14px; left: 14px; border-radius: 30px; padding: .35rem .7rem; background: rgba(255,255,255,0.9); color: var(--ink); font-size: .72rem; font-weight: 700; backdrop-filter: blur(8px); }
.type-gift { background: var(--green-bg); color: var(--green-dark); }
.type-exchange { background: var(--yellow-bg); color: #a16207; }
.market-seller { display: flex; align-items: center; gap: .4rem; font-size: .72rem; padding-top: .8rem; border-top: 1px solid var(--border-soft); }
.seller-initial { display: flex; width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center; background: var(--green); color: white; flex-shrink: 0; }
.listing-state { color: var(--muted); font-size: .74rem; }
.market-seller .listing-state { margin-left: auto; }
.market-owner-actions { padding: 0 1rem 1rem; display: flex; flex-direction: column; gap: .5rem; }
.market-owner-actions form { display: flex; gap: .2rem; }
.market-owner-actions select { min-width: 0; }
.market-empty { padding: 4rem 1rem; text-align: center; background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); }
.market-empty>span { font-size: 3rem; }
.market-empty p { margin: 1rem auto; max-width: 500px; color: var(--muted); }
@media (max-width: 768px) { .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; } }

/* ============ FRIENDS ============ */
.friends-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.friend-card {
  background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); text-align: center; padding: 1.5rem 1rem; transition: box-shadow .2s;
}
.friend-card:hover { box-shadow: var(--shadow-md); }
.friend-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin: 0 auto 0.5rem; display: block; }
.friend-avatar-ph { width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 0.5rem; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 700; color: var(--white); }
.friend-name { font-weight: 600; font-size: 0.92rem; }
.friend-role { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.5rem; }

/* ============ EVENTS ============ */
.event-card {
  padding: 0.8rem 1rem; background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius);
  margin-bottom: 0.5rem; border-left: 3px solid var(--green);
  transition: box-shadow 0.2s;
}
.event-card:hover { box-shadow: var(--shadow-md); }
.event-date { font-family: 'DM Mono', monospace; font-size: 0.8rem; color: var(--green); font-weight: 600; }

/* ============ CALENDAR ============ */
.calendar-card { background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 1.2rem; }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.calendar-toolbar a { padding: .5rem .8rem; background: var(--border-soft); border-radius: var(--radius); transition: background .15s; }
.calendar-toolbar a:hover { background: var(--border); }
.calendar-toolbar h2 { font-size: 1.2rem; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekday { text-align: center; font-size: .7rem; color: var(--muted); padding: .7rem 0; font-weight: 600; }
.calendar-day { min-height: 90px; border-top: 1px solid var(--border-soft); border-right: 1px solid var(--border-soft); padding: .4rem; font-size: .8rem; min-width: 0; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day>a { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--green-bg); color: var(--green-dark); border-radius: 6px; font-size: .65rem; padding: .2rem; margin-top: .2rem; }
.calendar-day.today>span { background: var(--orange); color: white; padding: .15rem .35rem; border-radius: 50%; }
.calendar-day.outside { background: var(--border-soft); opacity: .5; }

/* ============ CONTACTS ============ */
.contact-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.55rem; border-radius: var(--radius); cursor: pointer; transition: background 0.15s; }
.contact-item:hover { background: var(--border-soft); }
.contact-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.contact-avatar-ph { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; color: var(--white); flex-shrink: 0; }
.contact-name { font-size: 0.86rem; font-weight: 500; color: var(--ink); }
.contact-online { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; border: 2px solid var(--white); margin-left: auto; }

/* ============ ROOM LIST ============ */
.section-label { font-size: .82rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .8rem; }
.room-list { display: flex; flex-direction: column; gap: .5rem; }
.room-card {
  display: flex; align-items: center; gap: .8rem;
  padding: .8rem 1rem; background: var(--white);
  border: 1px solid var(--border-soft); border-radius: var(--radius-lg);
  text-decoration: none; color: var(--ink); transition: all .2s;
}
.room-card:hover { box-shadow: var(--shadow-md); border-color: var(--border); text-decoration: none; transform: translateY(-1px); }
.room-avatar {
  width: 48px; height: 48px; border-radius: var(--radius); flex-shrink: 0;
  background: var(--green-bg); display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.room-info { flex: 1; min-width: 0; }
.room-name { font-weight: 600; font-size: .92rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-meta { font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.room-chevron { color: var(--muted); flex-shrink: 0; }
.room-card-join:hover .room-join-btn { background: var(--green-dark); }
.room-join-btn { flex-shrink: 0; }

/* ============ EMPTY STATE ============ */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state-icon { font-size: 3rem; margin-bottom: 0.8rem; opacity: 0.4; }

/* ============ TABLE ============ */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.7rem 0.9rem; text-align: left; border-bottom: 1px solid var(--border-soft); }
th { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
tr:hover { background: var(--border-soft); }

/* ============ ALERT ============ */
.alert { padding: 0.8rem 1.1rem; border-radius: var(--radius); margin-bottom: 0.8rem; font-size: 0.88rem; font-weight: 500; }
.alert-error { background: #fef2f2; color: #dc2626; }
.alert-success { background: var(--green-bg); color: var(--green-dark); }
.alert-info { background: #eff6ff; color: #2563eb; }
.alert-warning { background: var(--orange-bg); color: var(--orange); }

/* ============ AVATAR ============ */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.avatar-lg { width: 80px; height: 80px; }
.avatar-sm { width: 28px; height: 28px; }
.avatar-ph { display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--white); border-radius: 50%; }
.av-green { background: var(--green); }
.av-orange { background: var(--orange); }
.av-yellow { background: var(--yellow); color: var(--ink) !important; }
.av-dark { background: var(--green-dark); }
.av-light { background: var(--green-light); }

/* ============ TOGGLE ============ */
.toggle { position: relative; width: 44px; height: 24px; background: var(--border); border-radius: 24px; cursor: pointer; transition: background 0.2s; display: inline-block; flex-shrink: 0; }
.toggle.active { background: var(--green); }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); transition: transform 0.2s; box-shadow: var(--shadow); }
.toggle.active::after { transform: translateX(20px); }

/* ============ TABS ============ */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border-soft); margin-bottom: 1rem; }
.tab { padding: 0.6rem 1.2rem; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.2s; font-weight: 600; font-size: 0.88rem; }
.tab.active { color: var(--green); border-bottom-color: var(--green); }
.tab:hover { color: var(--ink); }

/* ============ FOOTER ============ */
.footer { padding: 2rem 1.5rem; text-align: center; color: var(--muted); font-size: 0.82rem; background: var(--white); border-top: 1px solid var(--border-soft); }
.footer p { margin: 0.3rem 0; }

/* ============ MISC ============ */
.hidden { display: none; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-green { color: var(--green); }
.text-orange { color: var(--orange); }
.text-red { color: #dc2626; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.eyebrow { display: block; font-size: .69rem; font-weight: 800; letter-spacing: .14em; color: var(--green); margin-bottom: .6rem; }
.narrow-page { max-width: 540px; margin: 2rem auto; }
.narrow-page h1 { font-size: 1.8rem; line-height: 1.2; margin: .7rem 0 1rem; }
.narrow-page form { margin-top: 1.5rem; }

.member-form { display: flex; gap: .3rem; min-width: 320px; }
.member-form select { font-size: .75rem; padding: .35rem; width: auto; }

.reaction-pill { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; border: 2px solid var(--white); margin-left: -4px; }
.reaction-pill.like { background: var(--green); color: var(--white); }
.reaction-pill.love { background: var(--orange); color: var(--white); }
.reaction-pill.haha { background: var(--yellow); color: var(--ink); }
.reactions-display { display: flex; align-items: center; gap: 0.3rem; }
.reaction-emojis { display: flex; }

:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

/* ============ LISTING DETAIL ============ */
.listing-detail-page { max-width: 1100px; margin: 2rem auto; }
.listing-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.listing-detail .market-visual { height: 450px; border-radius: var(--radius-lg); }
.listing-detail .market-object { font-size: 10rem; }
.listing-detail h1 { font-size: 1.8rem; margin-bottom: 1rem; }
.listing-detail p { margin: 1rem 0; }
.listing-description { white-space: pre-wrap; line-height: 1.7; }
.listing-form-page { max-width: 720px; margin: 2rem auto; }
.listing-form-page h1 { font-size: 1.8rem; margin-bottom: 1rem; }
.listing-form-page form { margin-top: 1.5rem; }
.market-page { max-width: 1200px; padding-top: 2.5rem; }
.market-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.market-heading h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); letter-spacing: -.04em; }
.market-heading p { color: var(--muted); margin-top: .5rem; }
.market-tabs { display: flex; gap: 1.6rem; align-items: center; border-bottom: 1px solid var(--border-soft); margin-bottom: 1.3rem; }
.market-tabs a { color: var(--muted); padding: .8rem 0; font-weight: 600; font-size: .9rem; transition: color .15s; }
.market-tabs a:hover { color: var(--ink); text-decoration: none; }
.market-tabs a.selected { color: var(--green); border-bottom: 3px solid var(--green); }
.market-tabs>span { margin-left: auto; color: var(--muted); font-size: .8rem; }
.market-filters { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.5rem; align-items: center; }
.market-filters input { flex: 2; min-width: 220px; }
.market-filters select { flex: 1; min-width: 140px; }
.filter-reset { font-size: .8rem; padding: .5rem; }
.category-livres { background: #e4dccb; }
.category-vetements { background: #dce8e0; }
.category-fournitures { background: #f1e4cc; }
.category-jeux { background: #e5dff0; }
.category-equipement { background: #dfe6ed; }

/* ============ PUBLIC PAGES ============ */
.public-nav { display: flex; align-items: center; justify-content: space-between; padding: 1.3rem 6%; }
.public-brand { font-size: 1.8rem; color: var(--green); font-weight: 900; }
.public-nav>div { display: flex; align-items: center; gap: 1.4rem; }
.saas-hero { padding: 5rem 1.5rem 4rem; text-align: center; max-width: 1050px; margin: auto; }
.saas-hero h1 { font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: 1.1; letter-spacing: -.04em; margin: 1.3rem 0; }
.saas-hero h1 em { color: var(--green); font-style: normal; }
.saas-hero>p { max-width: 620px; margin: 0 auto 2rem; line-height: 1.7; color: var(--ink-soft); font-size: 1.1rem; }
.hero-note { margin-top: 1.5rem; color: var(--muted); font-size: .8rem; }
.pricing-section { padding: 4rem 0; text-align: center; scroll-margin-top: 2rem; }
.pricing-section h2 { font-size: 2rem; margin: .6rem 0; }
.pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; max-width: 840px; margin: 2rem auto; text-align: left; }
.plan-card { padding: 2rem; border-radius: var(--radius-xl); background: var(--white); border: 1px solid var(--border-soft); }
.plan-school { border: 2px solid var(--green); }
.plan-icon { font-size: 2rem; }
.plan-card h3 { font-size: 1.5rem; margin: .6rem 0; }
.plan-card p { color: var(--muted); min-height: 3rem; }
.plan-card ul { padding-left: 1.2rem; margin: 1.5rem 0; line-height: 2; font-size: .9rem; }
.pricing-amount { white-space: nowrap; font-size: 2.5rem; color: var(--green); font-weight: 800; }
.pricing-amount span { font-size: .8rem; font-weight: 400; }

/* ============ MOBILE ============ */
@media (max-width: 768px) {
  .navbar { height: 58px; padding: 0 .8rem; }
  .nav-brand { font-size: 1.2rem; }
  .nav-brand .logo-dot { width: 30px; height: 30px; font-size: .9rem; }
  .nav-right>a:not(.nav-help), #messenger-trigger, .lang-switcher { display: none; }
  .nav-center { position: fixed; bottom: 0; left: 0; right: 0; height: calc(58px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(255,255,255,0.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); z-index: 210; justify-content: space-around; border-top: 1px solid var(--border-soft); }
  .nav-tab { flex: 1; max-width: 90px; height: 50px; color: var(--muted); border-radius: 0; }
  .nav-tab.active { color: var(--green); background: transparent; }
  .nav-tab.active::after { content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 24px; height: 3px; background: var(--green); border-radius: 2px; }
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .organization-bar { padding: .5rem .8rem; gap: .3rem; }
  .organization-bar label { display: none; }
  .organization-bar form { flex: 1; }
  .organization-bar select { width: 100%; max-width: calc(100vw - 110px); font-size: .78rem; }
  .org-calendar { font-size: .72rem; }
  .fb-layout { padding: .8rem; gap: .8rem; }
  .feed-toolbar { margin: .5rem .2rem 1rem; }
  .feed-toolbar h1 { font-size: 1.3rem; }
  .messenger-fab { width: 48px; height: 48px; right: 14px; bottom: calc(74px + env(safe-area-inset-bottom)); font-size: 1.25rem; border-radius: var(--radius); }
  .messenger-panel { right: 10px; bottom: calc(74px + env(safe-area-inset-bottom)); width: calc(100vw - 20px); max-width: 420px; height: 540px; max-height: calc(100dvh - 150px); }
  .ms-chat-input textarea, .ms-form input, .ms-form select { font-size: 16px; }
  .public-nav { padding: 1rem; }
  .public-nav>div>a:first-child { display: none; }
  .saas-hero { padding: 2.5rem 1rem; }
  .pricing-grid { grid-template-columns: 1fr; }
  .plan-card { padding: 1.5rem; }
  .narrow-page { margin: 1rem auto; }
  .market-page { padding-top: 1.2rem; }
  .market-heading { align-items: flex-start; flex-direction: column; margin-bottom: 1rem; }
  .market-heading>.btn { width: 100%; }
  .market-tabs { gap: 1rem; }
  .market-tabs>span { display: none; }
  .market-visual { height: 160px; }
  .market-object { font-size: 4rem; }
  .market-card-body { padding: .7rem; }
  .market-price { font-size: 1.1rem; }
  .market-title { font-size: .85rem; }
  .market-filters { flex-direction: column; align-items: stretch; }
  .market-filters input, .market-filters select { min-width: 0; width: 100%; }
  .market-owner-actions form { flex-direction: column; }
  .market-owner-actions { align-items: stretch; }
  .listing-detail { grid-template-columns: 1fr; }
  .listing-detail .market-visual { height: 300px; }
  .listing-detail h1 { font-size: 1.3rem; }
  .reels-grid { grid-template-columns: repeat(2, 1fr); gap: .5rem; }
  .reel-overlay { padding: .5rem; }
  .reel-author { font-size: .75rem; }
  .reel-title { font-size: .72rem; }
  .reel-views { font-size: .65rem; }
  .calendar-card { padding: .65rem; }
  .calendar-day { min-height: 55px; padding: .25rem; font-size: .72rem; }
  .calendar-day>a { font-size: .55rem; padding: .15rem; }
  .calendar-weekday { font-size: .62rem; padding: .5rem 0; }
  .market-heading h1 { font-size: 1.4rem; }
  .market-heading p { font-size: .82rem; }
  .account-dropdown { width: calc(100vw - 40px); max-width: 280px; }
  .feed-post-actions-bar { flex-wrap: wrap; }
  .feed-action-btn { flex: 0 0 auto; padding: .4rem .6rem; font-size: .8rem; }
  .feed-action-btn .icon { font-size: 1.1rem; }
  .post-modal textarea { font-size: 16px; }
  #sg-chat-btn { bottom: calc(140px + env(safe-area-inset-bottom)) !important; }
  #sg-chat-panel { bottom: calc(140px + env(safe-area-inset-bottom)) !important; width: calc(100vw - 20px) !important; max-width: 380px !important; height: 480px !important; max-height: calc(100dvh - 180px) !important; }
}

@media (max-width: 480px) {
  .reels-grid { grid-template-columns: 1fr; }
  .market-grid { grid-template-columns: 1fr; }
  .feed-post-avatar, .feed-post-avatar-ph { width: 38px; height: 38px; }
  .feed-post-header { padding: .8rem; gap: .5rem; }
  .feed-post-body { padding: 0 .8rem .8rem; font-size: .88rem; }
  .feed-post-image { max-height: 350px; }
  .nav-tab { min-width: 40px; padding: .3rem; font-size: 1rem; }
  .messenger-fab { width: 46px; height: 46px; font-size: 1.1rem; bottom: calc(70px + env(safe-area-inset-bottom)) !important; }
  .messenger-panel { width: calc(100vw - 16px) !important; right: 8px !important; bottom: calc(130px + env(safe-area-inset-bottom)) !important; }
}

/* ============ MESSENGER FAB POSITION ============ */
.messenger-fab{z-index:401;bottom:calc(20px + env(safe-area-inset-bottom));right:max(16px,env(safe-area-inset-right))}
.messenger-panel{z-index:400;bottom:calc(88px + env(safe-area-inset-bottom));max-height:calc(100dvh - 112px - env(safe-area-inset-bottom))}

/* ============ THEME SWITCHER ============ */
.theme-switcher { position: relative; }
.theme-option {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: none; background: transparent;
  border-radius: var(--radius-sm); cursor: pointer; font: inherit;
  font-size: .88rem; font-weight: 500; color: var(--ink-soft);
  transition: background .15s;
}
.theme-option:hover { background: var(--border-soft); color: var(--ink); }
.theme-swatch {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--white); box-shadow: var(--shadow);
}

/* Contextual help for non-technical setup screens */
.help-card {
  background: var(--green-bg);
  border: 1px solid rgba(13,148,136,.18);
  color: var(--ink-soft);
}
.help-card strong { color: var(--green-dark); }
.help-card ul { margin: .7rem 0 0 1.1rem; padding: 0; }
.help-card li { margin: .35rem 0; }
.invite-page .form-group small,
.commercial-page .form-group small {
  display: block;
  margin-top: .35rem;
  color: var(--ink-soft);
  font-size: .82rem;
  line-height: 1.45;
}
.commercial-maintenance-notice {
  max-width: 920px;
}
.empty-state .btn { margin-top: .9rem; }

/* ============ DASHBOARD RIGHT SHORTCUTS ============ */
.dashboard-rail { display: flex; flex-direction: column; gap: .85rem; }
.rail-card { padding: 1rem; }
.rail-heading { display: flex; align-items: flex-start; gap: .65rem; margin-bottom: .75rem; }
.rail-heading>span { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; border-radius: 12px; background: var(--green-bg); }
.rail-heading h3 { font-size: .95rem; line-height: 1.2; margin: 0; color: var(--ink); }
.rail-heading small { display: block; margin-top: .2rem; color: var(--muted); font-size: .72rem; line-height: 1.35; }
.rail-list { display: flex; flex-direction: column; gap: .45rem; }
.rail-item { display: flex; align-items: flex-start; gap: .55rem; padding: .6rem; border-radius: var(--radius); border: 1px solid var(--border-soft); background: var(--white); color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.rail-item:hover { border-color: var(--green-light); box-shadow: var(--shadow); transform: translateY(-1px); text-decoration: none; }
.rail-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 10px; background: var(--beige); font-size: 1rem; }
.rail-item b { display: block; color: var(--ink); font-size: .83rem; line-height: 1.3; }
.rail-item small { display: block; color: var(--muted); font-size: .72rem; line-height: 1.35; margin-top: .15rem; overflow-wrap: anywhere; }
.rail-empty { color: var(--ink-soft); font-size: .82rem; line-height: 1.5; margin: .2rem 0 .75rem; }
.rail-action { display: inline-flex; margin-top: .65rem; color: var(--green); font-size: .8rem; font-weight: 700; text-decoration: none; }
.rail-action:hover { text-decoration: underline; }
@media (max-width: 1100px) { .dashboard-rail { display: none; } }
.messenger-fab .fab-badge{background:#e88324;min-width:30px;width:auto;white-space:nowrap;padding:0 6px;font-variant-numeric:tabular-nums}

@media (max-width: 768px) {
  .navbar { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-center { background: var(--green); }
}

.petal-launcher { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 250; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px; border: 2px solid var(--white); border-radius: 28px; background: var(--green); color: #fff; box-shadow: 0 5px 24px #072c2540; font: inherit; font-weight: 700; cursor: pointer; }
body:has(.petal-launcher) { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
.petal-menu { width: min(370px, calc(100vw - 20px)); max-width: none; max-height: calc(100dvh - 24px); padding: 14px 8px 12px; margin: auto; overflow: auto; border: 1px solid var(--border-soft); border-radius: 30px; background: rgba(255,255,255,.3); background: color-mix(in srgb, var(--white) 30%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: var(--ink); box-shadow: 0 24px 80px #0004; }
.petal-menu::backdrop { background: rgb(7 44 37 / 30%); backdrop-filter: blur(3px); }
.petal-menu-open { overflow: hidden; }
.petal-heading { text-align: center; padding: 4px 8px; }
.petal-heading h2 { margin: 0; font-size: 1.2rem; }
.petal-heading p { margin: 5px 0 0; font-size: .75rem; color: var(--ink-soft); }
.petal-wheel { position: relative; width: min(340px, 100%); aspect-ratio: 1; margin: 4px auto; background: radial-gradient(circle, var(--green-bg) 0, var(--green-bg) 25%, transparent 26%); }
.petal { position: absolute; left: var(--petal-x); top: var(--petal-y); transform: translate(-50%, -50%); width: 80px; min-height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border-soft); border-radius: 26px 26px 20px 26px; background: var(--beige-light); color: var(--green-dark); text-decoration: none; box-shadow: 0 4px 12px #00000009; }
.petal svg { width: 23px; height: 23px; }
.petal span { max-width: 76px; font-size: .65rem; font-weight: 700; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.petal:hover, .petal[aria-current] { background: var(--green); color: #fff; text-decoration: none; }
.petal:focus-visible, .petal-center:focus-visible, .petal-launcher:focus-visible, .petal-shortcuts a:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
.petal-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 68px; height: 68px; border: 0; border-radius: 50%; background: var(--green); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; }
.petal-center>span { font-size: 28px; line-height: 1; }
.petal-center small { font-size: .6rem; color: #fff; }
.petal-shortcuts { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--border-soft); padding-top: 10px; }
.petal-shortcuts a { background: var(--white); padding: 12px 10px; color: var(--ink); font-size: .75rem; border-radius: 12px; }
.petal-menu[open] .petal { animation: petal-unfold .24s ease-out backwards; animation-delay: var(--petal-delay); }
@keyframes petal-unfold { from { opacity: 0; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.45); } to { opacity: 1; } }
@media (max-width: 768px), (max-width: 1024px) and (max-height: 600px) {
  .navbar { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .navbar .nav-center, .navbar .nav-right>a { display: none; }
  .messenger-fab { bottom: calc(18px + env(safe-area-inset-bottom)); right: max(16px, env(safe-area-inset-right)); }
  .messenger-panel { bottom: calc(82px + env(safe-area-inset-bottom)); }
  body:has(.petal-launcher) { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
}
@media (max-width: 350px) {
  .petal { width: 68px; min-height: 64px; gap: 4px; }
  .petal span { font-size: .6rem; }
  .petal-center { width: 56px; height: 56px; }
}
@media (max-height: 520px) and (min-width: 520px) {
  .petal-menu { width: 520px; padding: 10px 16px; }
  .petal-menu[open] { display: grid; grid-template-columns: 160px 1fr; align-items: center; }
  .petal-heading { grid-column: 1; grid-row: 1; }
  .petal-wheel { grid-column: 2; grid-row: 1 / 3; width: min(280px, calc(100dvh - 48px)); margin: 0; }
  .petal-shortcuts { grid-column: 1; grid-row: 2; flex-direction: column; padding: 0; border: 0; text-align: center; }
  .petal-shortcuts a { background: var(--white); padding: 8px; min-height: 40px; }
  .petal { width: 68px; min-height: 56px; gap: 3px; border-radius: 20px; }
  .petal svg { width: 19px; height: 19px; }
  .petal span { font-size: .55rem; }
  .petal-center { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) { .petal-menu[open] .petal { animation: none; } }

#legacy-top[hidden], #legacy-sidebar[hidden] { display: none !important; }
.legacy-top-shell { position: sticky; top: 0; z-index: 220; min-height: 28px; }
.nav-reveal { display: grid; place-items: center; border: 1px solid var(--border-soft); background: var(--white); color: var(--green-dark); box-shadow: 0 2px 10px #0002; cursor: pointer; z-index: 240; padding: 0; }
.nav-reveal:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.nav-reveal svg { pointer-events: none; }
.nav-reveal[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-reveal-top { position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%); width: 48px; height: 32px; border-radius: 0 0 14px 14px; }
.nav-reveal-left { position: fixed; left: 0; top: 44%; width: 32px; height: 48px; border-radius: 0 14px 14px 0; }
.legacy-layout { grid-template-columns: minmax(0, 1fr); padding-left: 40px; padding-top: 28px; }
.legacy-layout>.fb-center { max-width: none; }
.legacy-layout.sidebar-expanded { grid-template-columns: 260px minmax(0, 1fr); }
.legacy-layout>#legacy-sidebar:not([hidden]) { display: block; }
@media (max-width:1100px) {
  .legacy-layout, .legacy-layout.sidebar-expanded { grid-template-columns: minmax(0,1fr); padding-left: 36px; }
  #legacy-sidebar:not([hidden]) { position: fixed; top: 0; left: 0; width: min(280px, calc(100vw - 52px)); height: 100dvh; max-height: none; z-index: 230; padding: 18px 12px; box-sizing: border-box; background: var(--white); box-shadow: 8px 0 30px #0003; overflow-y: auto; overscroll-behavior: contain; }
  .nav-left-open .nav-reveal-left { left: min(280px, calc(100vw - 52px)); }
}
@media (max-width:768px), (max-width:1024px) and (max-height:600px) {
  #legacy-top .navbar { flex-wrap: wrap; height: auto; min-height: 58px; padding-top: 6px; }
  #legacy-top .nav-center { display: flex; position: static; order: 3; flex-basis: 100%; height: 48px; padding: 0; border: 0; background: transparent; backdrop-filter: none; }
  #legacy-top .nav-tab { height: 44px; color: inherit; }
}
.fb-layout.legacy-layout:not(.sidebar-expanded) { grid-template-columns: minmax(0,1fr); }
.fb-layout.legacy-layout.sidebar-expanded { grid-template-columns: 260px minmax(0,1fr); }
@media (min-width:1101px) {
  .fb-layout.legacy-layout:not(.sidebar-expanded):has(>.fb-right) { grid-template-columns: minmax(0,1fr) 280px; }
  .fb-layout.legacy-layout.sidebar-expanded:has(>.fb-right) { grid-template-columns: 260px minmax(0,1fr) 280px; }
}
@media (max-width:1100px) {
  .fb-layout.legacy-layout.sidebar-expanded { grid-template-columns: minmax(0,1fr); }
}

.ui-icon { display: inline-block; flex: 0 0 auto; vertical-align: middle; }
.retention-footnote { margin: 24px 0 6px; color: var(--muted); font-size: .72rem; }
.retention-footnote summary { cursor: pointer; width: fit-content; padding: 6px 0; }
.retention-footnote p { max-width: 620px; line-height: 1.6; margin: 6px 0; }
.retention-footnote a { color: var(--green); }
.drive-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-bottom: 24px; }
.drive-title { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 1.55rem; letter-spacing: -.04em; }
.drive-title-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--green-bg); color: var(--green); }
.drive-title-icon .ui-icon { width: 25px; height: 25px; }
.drive-toolbar-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.drive-toolbar-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; border-radius: 12px; }
.drive-toolbar-actions label { margin: 0; }
.drive-breadcrumbs a { display: inline-flex; align-items: center; gap: 7px; }
@media (max-width:600px) {
  .drive-toolbar { align-items: flex-start; gap: 16px; }
  .drive-toolbar-actions { width: 100%; gap: 6px; }
  .drive-toolbar-actions .btn { padding: 9px 10px; font-size: .72rem; }
  .drive-toolbar-actions .ui-icon { width: 17px; height: 17px; }
  .drive-toolbar-actions #oo-menu { right: auto !important; left: 0; }
  .drive-page { padding-left: 0; padding-right: 0; }
}

/* Persistent identity stays available while the larger menus are collapsed. */
.workspace-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 32px; min-height:74px; border-bottom:1px solid var(--border-soft); background:var(--white); }
.workspace-brand { display:flex; align-items:center; gap:10px; color:var(--green-dark); font-size:1.4rem; font-weight:800; letter-spacing:-.04em; line-height:1.15; min-width:0; }
.workspace-brand>span:last-child { min-width:0; }
.workspace-brand small { display:block; margin-top:4px; font-size:.68rem; font-weight:500; letter-spacing:0; color:var(--muted); max-width:50vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.workspace-logo { display:grid; place-items:center; flex:0 0 auto; width:36px; height:36px; border-radius:11px; background:var(--green); color:white; font-size:1.25rem; }
.appearance-picker { display:flex; align-items:center; gap:9px; margin:0; color:var(--muted); font-size:.75rem; }
.appearance-picker select { width:auto; margin:0; padding:8px 28px 8px 10px; background:var(--white); color:var(--ink); border:1px solid var(--border); border-radius:10px; font-size:.78rem; }
.mosaic-desktop { display:none; }
body>.retention-footnote { margin:16px 40px 100px; }
@media(max-width:600px) {
 .workspace-heading { padding:12px 16px; gap:8px; }
 .workspace-brand { font-size:1.25rem; }
 .workspace-brand small { max-width:42vw; }
 .appearance-picker>span { display:none; }
 .appearance-picker select { max-width:120px; }
 body>.retention-footnote { margin-left:36px; margin-right:16px; }
 .drive-toolbar-actions #oo-menu { left:auto; right:0!important; min-width:180px; }
}
.unified-navbar { position:sticky; top:0; height:auto; min-height:64px; flex-wrap:wrap; gap:8px; background:#1b6b4a!important; color:#fff; padding:10px 20px; }
.unified-navbar .nav-brand, .unified-navbar .nav-tab { color:#fff; }
.unified-navbar .nav-right { flex-wrap:wrap; flex:1 1 auto; }
.unified-navbar .nav-center { flex:0 1 auto; }
.unified-navbar .workspace-shortcut, .unified-navbar .nav-icon-btn { background:#145239; color:#fff; }
.unified-navbar .workspace-shortcuts { margin-left:0; }
.unified-navbar .organization-bar { position:static; background:transparent; border:0; padding:0; min-height:0; height:auto; flex:1 1 auto; color:#fff; }
.unified-navbar .organization-bar label, .unified-navbar .organization-bar a, .unified-navbar .organization-bar select { color:#fff; }
.unified-navbar .organization-bar select { max-width:min(450px,65vw); }
.unified-navbar .organization-bar option { color:#172b22; background:#fff; }
@media(max-width:700px) {
 .unified-navbar { padding:8px; }
 .unified-navbar .nav-right { justify-content:flex-start; }
 .unified-navbar .nav-center { display:flex; }
}
.workspace-heading { position:sticky; top:0; z-index:221; height:74px; box-sizing:border-box; }
.workspace-heading+.legacy-top-shell { top:74px; }
.ms-room-row { display:flex; align-items:center; padding-right:8px; border-bottom:1px solid var(--border-soft); }
.ms-room-row .ms-room-item { flex:1; min-width:0; border-bottom:0; }
.ms-pin-button { display:inline-grid; place-items:center; flex:0 0 auto; width:34px; height:34px; border:1px solid var(--border); border-radius:9px; background:var(--white); color:var(--muted); cursor:pointer; }
.ms-pin-button[aria-pressed="true"] { color:#b45908; border-color:#e5b17c; background:#fff0de; }
.conversation-ticker[hidden], .ticker-show[hidden] { display:none!important; }
.conversation-ticker { position:fixed; bottom:0; left:0; right:0; z-index:260; display:flex; align-items:center; gap:8px; padding:5px 12px calc(5px + env(safe-area-inset-bottom)); height:calc(44px + env(safe-area-inset-bottom)); background:var(--white); border-top:1px solid var(--border); box-shadow:0 -3px 16px #173b481a; color:var(--ink); }
.ticker-label { color:var(--green-dark); font-size:.72rem; font-weight:750; padding-right:8px; border-right:1px solid var(--border); }
.ticker-viewport { flex:1; min-width:0; overflow:hidden; }
.ticker-track { display:flex; width:max-content; }
.ticker-track.has-items { animation:ticker-scroll var(--ticker-duration,60s) linear infinite; }
.ticker-track.is-paused,.ticker-viewport:focus-within .ticker-track { animation-play-state:paused; }
.ticker-group { display:flex; align-items:center; }
.ticker-item { display:inline-flex; align-items:center; gap:12px; font-size:.75rem; white-space:nowrap; padding:4px 24px 4px 8px; color:var(--ink-soft); }
.ticker-item b { color:var(--green-dark); }
.ticker-item::after { content:'•'; color:var(--orange); margin-left:12px; }
.ticker-empty { font-size:.73rem; }
.conversation-ticker button { width:30px; height:30px; flex:0 0 auto; border:1px solid var(--border); border-radius:8px; background:var(--green-bg); color:var(--green-dark); cursor:pointer; }
.ticker-show { position:fixed; bottom:calc(36px + env(safe-area-inset-bottom)); left:12px; z-index:260; padding:6px 10px; border:1px solid var(--border); border-radius:8px; background:var(--white); color:var(--green-dark); font-size:.68rem; cursor:pointer; }
body:has(.petal-launcher):not(.has-conversation-ticker) .petal-launcher,body:has(.petal-launcher):not(.has-conversation-ticker) .messenger-fab { bottom:calc(50px + env(safe-area-inset-bottom))!important; }
body:has(.petal-launcher):not(.has-conversation-ticker) .messenger-panel { bottom:calc(114px + env(safe-area-inset-bottom))!important; max-height:calc(100dvh - 145px - env(safe-area-inset-bottom)); }
body.has-conversation-ticker { padding-bottom:calc(172px + env(safe-area-inset-bottom)); }
body.has-conversation-ticker .gafam-strip { bottom:calc(44px + env(safe-area-inset-bottom)); height:32px; padding-bottom:4px; }
body.has-conversation-ticker .petal-launcher,body.has-conversation-ticker .messenger-fab { bottom:calc(94px + env(safe-area-inset-bottom))!important; }
body.has-conversation-ticker .messenger-panel { bottom:calc(154px + env(safe-area-inset-bottom))!important; max-height:calc(100dvh - 177px - env(safe-area-inset-bottom)); }
@keyframes ticker-scroll { to { transform:translateX(-50%); } }
@media(max-width:600px) { .ticker-label { display:none; } .conversation-ticker { padding-left:6px; gap:4px; } }
@media(prefers-reduced-motion:reduce) { .ticker-track.has-items { animation:none; } .ticker-viewport { overflow-x:auto; } .ticker-group[aria-hidden="true"] { display:none; } }
/* Family overview and lost/found comfort toys */
.family-page,.plush-page { width:min(100%,1250px); margin:0 auto; padding:8px 4px 44px; }
.family-heading,.plush-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:22px; }
.family-heading h1,.plush-heading h1 { margin:3px 0; font-size:clamp(1.7rem,2.7vw,2.5rem); letter-spacing:-.045em; }
.family-heading p,.plush-heading p { margin:3px 0; color:var(--muted); }
.family-filters { display:flex; flex-wrap:wrap; gap:12px; padding:16px; margin-bottom:18px; border:1px solid var(--border-soft); border-radius:16px; background:var(--white); }
.family-filters label,.family-add-form label,.plush-create label { display:grid; gap:5px; min-width:180px; flex:1; font-size:.78rem; font-weight:650; }
.family-filters select,.family-add-form select,.family-add-form input,.plush-create select,.plush-create input,.plush-create textarea { width:100%; margin:0; }
.family-section,.plush-section,.plush-create,.plush-detail { border:1px solid var(--border-soft); border-radius:18px; background:var(--white); box-shadow:0 3px 16px #2542520c; padding:20px; margin-bottom:18px; }
.family-section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.family-section-heading h2,.plush-section h2 { margin:0; font-size:1.12rem; }
.family-section-heading>span { color:var(--muted); font-size:.75rem; }
.family-child-grid,.family-post-grid,.family-alerts { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:12px; }
.family-child-card { display:flex; align-items:center; gap:10px; border:1px solid var(--border-soft); border-radius:12px; padding:12px; }
.family-child-avatar { width:38px; height:38px; border-radius:12px; display:grid; place-items:center; background:var(--green-bg); color:var(--green-dark); font-weight:800; }
.family-child-card>div { flex:1; min-width:0; }.family-child-card small,.family-row small,.family-alert small { display:block; color:var(--muted); font-size:.72rem; margin-top:3px; }
.family-remove { border:0; background:transparent; color:var(--muted); cursor:pointer; font-size:1.2rem; }
.family-add { margin-top:15px; }.family-add summary,.plush-create summary { width:fit-content; cursor:pointer; font-weight:700; color:var(--green-dark); }
.family-add-form,.plush-create form { display:flex; flex-wrap:wrap; align-items:end; gap:12px; padding-top:14px; }
.family-empty { color:var(--muted); margin:8px 0; font-size:.9rem; }
.family-columns,.plush-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; align-items:start; }
.family-row { display:grid; grid-template-columns:42px minmax(0,1fr) 18px; align-items:center; gap:12px; width:100%; text-align:left; border:0; border-top:1px solid var(--border-soft); padding:12px 0; background:none; color:var(--ink); cursor:pointer; }
.family-row:hover,.family-post button:hover { color:var(--green); }
.family-date,.family-room-icon { display:grid; place-items:center; width:40px; height:40px; border-radius:10px; background:var(--green-bg); color:var(--green-dark); font-weight:800; line-height:1; }
.family-date small { color:inherit; font-weight:500; }.family-row strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.family-post { padding:15px; border:1px solid var(--border-soft); border-radius:12px; }.family-post>small { color:var(--muted); }.family-post p { margin:8px 0; line-height:1.45; }.family-post button { background:transparent; border:0; padding:0; color:var(--green-dark); font-weight:700; cursor:pointer; }
.rabbit-icon { flex:0 0 auto; }
.plush-heading { justify-content:flex-start; }.plush-heading>.rabbit-icon { width:55px; height:55px; padding:10px; border-radius:16px; background:var(--green-bg); color:var(--green); }
.plush-lost { --plush-accent:#b42318; --plush-bg:#fff0ec; --plush-border:#f3c0b8; }.plush-found { --plush-accent:#157a43; --plush-bg:#e9f9ee; --plush-border:#aadbb8; }
.plush-section { border-color:var(--plush-border); }.plush-section h2 { color:var(--plush-accent); margin-bottom:12px; }
.plush-card { display:grid; grid-template-columns:32px minmax(0,1fr) 14px; gap:10px; align-items:center; padding:14px; margin:10px 0; border:1px solid var(--plush-border); border-radius:13px; background:var(--plush-bg); color:var(--ink); }
.plush-card>.rabbit-icon,.plush-detail>.rabbit-icon { color:var(--plush-accent); }.plush-card span span { display:block; margin-top:7px; font-size:.77rem; line-height:1.35; }.plush-card strong { display:block; }
.plush-detail { max-width:760px; margin-top:18px; border-color:var(--plush-border); background:var(--plush-bg); }.plush-detail h1 { margin:12px 0; }.plush-detail .eyebrow { color:var(--plush-accent); }
.plush-create form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }.plush-create form label:last-of-type { grid-column:1/-1; }
.family-alert { display:flex; align-items:center; gap:10px; width:100%; border:1px solid var(--plush-border); border-radius:12px; padding:12px; background:var(--plush-bg); color:var(--plush-accent); text-align:left; cursor:pointer; }.family-alert span:nth-child(2) { flex:1; }.family-alert.is-lost,.ticker-lost { --plush-accent:#b42318; --plush-bg:#fff0ec; --plush-border:#f3c0b8; }.family-alert.is-found,.ticker-found { --plush-accent:#157a43; --plush-bg:#e9f9ee; --plush-border:#aadbb8; }
.ticker-item.ticker-lost,.ticker-item.ticker-found { background:var(--plush-bg); color:var(--plush-accent); margin:0 3px; border-radius:8px; }.ticker-item.ticker-lost b,.ticker-item.ticker-found b { color:var(--plush-accent); }
.workspace-shortcuts { display:flex; align-items:center; gap:8px; margin-left:auto; }.workspace-shortcut { position:relative; display:inline-flex; align-items:center; gap:6px; padding:7px 10px; border-radius:10px; font-size:.78rem; font-weight:700; color:var(--green-dark); background:var(--green-bg); white-space:nowrap; }.workspace-shortcut .rabbit-icon { width:19px; height:19px; }.workspace-shortcut.has-lost { background:#fff0ec; color:#b42318; }.workspace-shortcut .alert-count { position:absolute; top:-7px; right:-5px; min-width:18px; height:18px; display:grid; place-items:center; border-radius:50%; background:#b42318; color:white; font-size:.65rem; }
.workspace-language { display:inline-flex; flex:0 0 auto; align-items:center; gap:5px; margin:0; color:var(--green-dark); }
.workspace-language select { width:82px; margin:0; padding:8px 7px; border:1px solid var(--border); border-radius:10px; background:var(--white); color:var(--ink); font-size:.78rem; font-weight:700; cursor:pointer; }
.workspace-language select:focus-visible { outline:3px solid var(--orange); outline-offset:2px; }
@media(max-width:600px) {
  .workspace-heading { padding-left:10px; padding-right:10px; gap:6px; }
  .workspace-brand { font-size:1.1rem; gap:6px; }
  .workspace-logo { width:32px; height:32px; }
  .workspace-shortcuts { gap:4px; }
  .workspace-shortcut { padding:6px; }
  .appearance-picker select { max-width:84px; padding:7px 19px 7px 6px; }
  .workspace-language { gap:3px; }
  .workspace-language select { width:72px; padding:7px 4px; }
}
@media(max-width:390px) {
  .workspace-heading { padding-left:8px; padding-right:8px; gap:4px; }
  .workspace-shortcut { padding:5px; }
  .appearance-picker select { max-width:64px; }
  .workspace-language svg { display:none; }
  .workspace-language select { width:62px; }
}
@media(max-width:350px) { .workspace-shortcuts>a[href="/famille"] { display:none; } .workspace-brand { flex:0 0 auto; } }
@media(max-width:768px) { .sales-nav .lang-switcher { display:block; flex:0 0 auto; } .sales-nav .lang-switcher select { max-width:76px; padding:7px 4px; } }
@media(max-width:600px) {
  .sales-nav { flex-wrap:wrap; gap:8px; }
  .sales-nav .sales-actions { flex:1 0 100%; width:100%; margin:0; gap:6px; flex-wrap:nowrap; justify-content:space-between; }
  .sales-nav .sales-actions .sales-btn { white-space:nowrap; gap:4px; padding:9px 8px; }
  .sales-nav .sales-actions .sales-btn span { display:none; }
}
@media(max-width:700px) { .family-columns,.plush-columns { grid-template-columns:1fr; }.family-heading { align-items:start; }.family-heading>.btn { display:none; }.plush-create form { grid-template-columns:1fr; }.plush-create form label:last-of-type { grid-column:auto; }.workspace-shortcut>span.label { display:none; }.workspace-shortcut { padding:7px; }.workspace-brand small { max-width:32vw; } }

.plush-photo-thumb { width:80px; height:80px; object-fit:cover; border-radius:12px; flex-shrink:0; }
.plush-photo-detail { display:block; width:100%; max-width:520px; max-height:420px; object-fit:contain; border-radius:16px; margin:16px 0; }
.plush-photo-form { margin:16px 0; display:grid; gap:10px; }
.plush-photo-form label { display:grid; gap:6px; }
