/* ==========================================================================
   Mirro app-shell demo — agenti-ai.ro/mirro
   A faithful recreation of the "My Mirro" dashboard layout/styling so the
   live HubSpot support agent feels native inside the app. Self-contained,
   scoped under .mirro-page. Brand: Montserrat + pink/purple/teal.
   ========================================================================== */

.mirro-page {
  --m-pink:      #E6007E;   /* logo + accents          */
  --m-pink-soft: #FCE3F0;   /* tints, illustration blob */
  --m-purple:    #735284;   /* kudos / create / links   */
  --m-teal:      #3FBFA0;   /* avatar / kudos badge     */
  --m-blue:      #4A86C7;   /* feedback action          */
  --m-ink:       #3A3F51;   /* headings / strong text   */
  --m-text:      #5b6072;   /* body                     */
  --m-muted:     #9aa0b0;   /* secondary / labels       */
  --m-bg:        #F4F5F8;   /* app background           */
  --m-card:      #FFFFFF;   /* surfaces                 */
  --m-rule:      #ECECF1;   /* hairline borders         */
  --m-shadow:    0 6px 24px -16px rgba(40, 30, 60, .35);
  --m-radius:    10px;
  --m-bar-h:     64px;

  margin: 0;
  background: var(--m-bg);
  color: var(--m-text);
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.mirro-page *, .mirro-page *::before, .mirro-page *::after { box-sizing: border-box; }
.mirro-page h1,.mirro-page h2,.mirro-page h3,.mirro-page h4 { color: var(--m-ink); margin: 0; font-weight: 600; }
.mirro-page p { margin: 0; }
.mirro-page a { color: var(--m-purple); text-decoration: none; }
.mirro-page svg { display: block; }

/* ---------------- top app bar ---------------- */
.m-appbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--m-bar-h); background: #fff;
  border-bottom: 1px solid var(--m-rule);
  display: flex; align-items: center; gap: 18px;
  padding: 0 22px;
}
.m-logo { display: flex; align-items: center; gap: 12px; }
.m-logo .mark {
  font-weight: 800; font-size: 30px; color: var(--m-pink);
  letter-spacing: -.06em; line-height: 1; font-family: "Montserrat", sans-serif;
}
.m-logo .chev { color: var(--m-muted); }
.m-appbar .title { font-weight: 600; color: var(--m-ink); font-size: 16px; }
.m-appbar .spacer { flex: 1; }
.m-search {
  display: flex; align-items: center; gap: 10px;
  background: #f1f2f5; border: 1px solid transparent; border-radius: 8px;
  padding: 9px 14px; width: 340px; max-width: 38vw; color: var(--m-muted);
}
.m-search input {
  border: 0; background: transparent; outline: none; flex: 1;
  font: inherit; font-size: 14px; color: var(--m-ink);
}
.m-userchip { display: flex; align-items: center; gap: 9px; cursor: default; }
.m-userchip .name { font-weight: 600; color: var(--m-ink); font-size: 14px; }
.m-iconbtn {
  position: relative; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; color: var(--m-muted);
  border: 0; background: transparent; cursor: pointer;
}
.m-iconbtn:hover { background: #f1f2f5; color: var(--m-ink); }
.m-iconbtn .dot {
  position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px;
  background: var(--m-pink); color: #fff; border-radius: 9px;
  font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px;
}
.m-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px;
  background: var(--m-teal);
}
.m-avatar.lg { width: 42px; height: 42px; font-size: 15px; }

/* ---------------- 3-column shell ---------------- */
.m-shell {
  display: grid; grid-template-columns: 232px minmax(0,1fr) 312px;
  gap: 26px; max-width: 1320px; margin: 0 auto; padding: 26px 26px 80px;
  align-items: start;
}

/* ---------------- left sidebar ---------------- */
.m-sidebar { position: sticky; top: calc(var(--m-bar-h) + 26px); }
.m-logoslot {
  border: 1.5px dashed #d9dbe3; border-radius: var(--m-radius);
  height: 70px; display: grid; place-items: center; color: #b9bdc9;
  font-size: 11px; text-align: center; margin-bottom: 18px; background: #fff;
}
.m-nav { display: flex; flex-direction: column; gap: 2px; }
.m-navitem {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 8px; color: var(--m-text);
  font-size: 14px; font-weight: 500; cursor: pointer; border: 0; background: transparent;
  text-align: left; width: 100%;
}
.m-navitem .ico { color: var(--m-muted); width: 18px; display: grid; place-items: center; flex: none; }
.m-navitem .lbl { flex: 1; }
.m-navitem .caret { color: #c4c8d2; }
.m-navitem:hover { background: #fff; color: var(--m-ink); }
.m-navitem:hover .ico { color: var(--m-pink); }
.m-navitem.active { background: #fff; color: var(--m-pink); font-weight: 600; box-shadow: var(--m-shadow); }
.m-navitem.active .ico { color: var(--m-pink); }

/* ---------------- center feed ---------------- */
.m-main { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.m-card { background: var(--m-card); border: 1px solid var(--m-rule); border-radius: var(--m-radius); box-shadow: var(--m-shadow); }

.m-composer { padding: 20px 22px 16px; }
.m-composer .row1 { display: flex; align-items: center; gap: 14px; }
.m-composer .field {
  flex: 1; background: #f6f7f9; border: 1px solid var(--m-rule); border-radius: 8px;
  padding: 13px 16px; color: var(--m-muted); font-size: 14px;
}
.m-actions { display: flex; gap: 30px; flex-wrap: wrap; margin-top: 18px; padding-top: 4px; }
.m-action { display: flex; align-items: center; gap: 10px; color: var(--m-text); font-size: 14px; font-weight: 500; cursor: pointer; }
.m-action .ai { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.m-action .ai.fb  { background: var(--m-blue); }
.m-action .ai.kud { background: var(--m-teal); }
.m-action .ai.req { background: var(--m-pink); }
.m-action .ai.post{ background: var(--m-purple); }

/* tabs */
.m-tabs { display: flex; align-items: center; gap: 22px; padding: 2px 4px; }
.m-tab { color: var(--m-muted); font-weight: 600; font-size: 15px; cursor: pointer; padding-bottom: 4px; }
.m-tab.active { color: var(--m-ink); border-bottom: 2px solid var(--m-pink); }
.m-tabs .spacer { flex: 1; }
.m-select {
  border: 1px solid var(--m-rule); background: #fff; border-radius: 8px;
  padding: 8px 12px; font: inherit; font-size: 13px; color: var(--m-text);
}

/* empty state */
.m-empty { padding: 30px 24px 46px; text-align: center; }
.m-illus { width: 320px; max-width: 80%; margin: 6px auto 26px; }
.m-empty h3 { font-size: 20px; color: var(--m-ink); margin-bottom: 10px; font-weight: 700; }
.m-empty p { color: var(--m-muted); max-width: 440px; margin: 0 auto; font-size: 14px; }

/* ---------------- right rail ---------------- */
.m-rail { position: sticky; top: calc(var(--m-bar-h) + 26px); display: flex; flex-direction: column; gap: 20px; }
.m-railcard { padding: 18px 18px 20px; }
.m-railhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.m-railhead .h { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--m-muted); text-transform: uppercase; }
.m-railhead .refresh { color: var(--m-muted); cursor: pointer; }
.m-rail-empty { text-align: center; color: var(--m-muted); font-size: 13px; padding: 26px 6px; }
.m-rail-empty a { color: var(--m-purple); font-weight: 600; }
.m-railcard .sub { color: var(--m-muted); font-size: 13px; margin-bottom: 14px; }
.m-rlink { display: flex; align-items: center; gap: 11px; padding: 9px 0; color: var(--m-purple); font-weight: 600; font-size: 14px; }
.m-rlink .ico { color: var(--m-pink); width: 18px; display: grid; place-items: center; flex: none; }
.m-rlink:hover { color: var(--m-ink); }

/* ---------------- support-agent affordance ---------------- */
.m-assistant {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--m-purple); color: #fff; border: 0; border-radius: 999px;
  padding: 9px 16px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
}
.m-assistant:hover { background: #5d4169; }
.m-assistant .spark { font-size: 15px; }

/* ---------------- floating support chat bubble ---------------- */
.m-fab-wrap {
  position: fixed; right: 24px; bottom: 24px; z-index: 70;
  display: flex; align-items: center; gap: 12px;
}
.m-fab-label {
  background: #fff; color: var(--m-ink); font-weight: 600; font-size: 14px;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--m-rule);
  box-shadow: 0 8px 24px -12px rgba(40,30,60,.45); white-space: nowrap;
  transition: opacity .18s ease, transform .18s ease;
}
.m-fab {
  width: 60px; height: 60px; border-radius: 50%; flex: none;
  background: var(--m-pink); color: #fff; border: 0; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 12px 30px -8px rgba(230,0,126,.6);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.m-fab:hover { transform: translateY(-2px) scale(1.04); background: #c8006e; }
.m-fab:active { transform: scale(.97); }
.m-fab svg { width: 27px; height: 27px; }
.m-fab .pulse {
  position: absolute; width: 60px; height: 60px; border-radius: 50%;
  background: var(--m-pink); opacity: .35; animation: m-pulse 2.4s ease-out infinite; pointer-events: none;
}
@keyframes m-pulse { 0% { transform: scale(1); opacity: .35; } 70%,100% { transform: scale(1.6); opacity: 0; } }
@media (max-width: 560px) { .m-fab-label { display: none; } .m-fab-wrap { right: 16px; bottom: 16px; } }
@media (prefers-reduced-motion: reduce) { .m-fab .pulse { display: none; } }

/* ---------------- responsive ---------------- */
@media (max-width: 1080px) {
  .m-shell { grid-template-columns: 200px minmax(0,1fr); }
  .m-rail { display: none; }
}
@media (max-width: 820px) {
  .m-shell { grid-template-columns: 1fr; padding: 18px 16px 80px; }
  .m-sidebar { display: none; }
  .m-search { display: none; }
  .m-userchip .name { display: none; }
}
@media (prefers-reduced-motion: reduce) { .mirro-page * { transition: none !important; } }
