/* ═══════════════════════════════════════════════════
   MMCo Design System — Global Styles
   Canonical source: mmco_organization_portal/src/assets/sass/mmco.css
   Copied 2026-04-10. Keep roughly in sync manually.

   Scoping: global element rules (body, *, button, inputs)
   are scoped to .mmco-survey so they don't leak into the
   admin panel. All .m-* classes are unscoped — they're
   already namespaced and safe to use anywhere.

   Typography: Sohne (heading) / Arial (body fallback)
   Palette: #1A1919 #8B8987 #A4A39E #BFBEB2 #F1EFE9
   ═══════════════════════════════════════════════════ */

@font-face {
  font-family: "Sohne";
  font-display: swap;
  src: url("/fonts/soehne-leicht.woff2") format("woff2");
}

:root {
  /* Colors */
  --m-black: #1A1919;
  --m-grey: #8B8987;
  --m-mid: #A4A39E;
  --m-sage: #BFBEB2;
  --m-cream: #F1EFE9;
  --m-white: #FFFFFF;
  --m-bg: #F7F6F3;
  --m-border: #E5E2DB;
  --m-hover: #EDECEA;
  --m-success: #5B8C5A;
  --m-warning: #D4A843;
  --m-danger: #A65454;
  --m-info: #5A7B8C;

  /* Typography */
  --m-font-heading: 'Sohne', Arial, Helvetica, sans-serif;
  --m-font-subhead: Arial, Helvetica, sans-serif;
  --m-font-body: Arial, Helvetica, sans-serif;

  /* Spacing */
  --m-page-pad: 40px;
  --m-sidebar-width: 240px;
}

/* ── Scoped resets & base ── */
.mmco-survey,
.mmco-survey *,
.mmco-survey *::before,
.mmco-survey *::after { box-sizing: border-box; }

.mmco-survey {
  font-family: var(--m-font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--m-black);
  background: var(--m-bg);
}

.mmco-survey button { font-family: inherit; cursor: pointer; }
.mmco-survey input,
.mmco-survey select,
.mmco-survey textarea { font-family: inherit; }

.mmco-survey ::selection { background: var(--m-sage); color: var(--m-black); }

/* ── App Shell ── */
.m-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  font-family: var(--m-font-body);
  background: var(--m-bg);
}

.m-app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.m-main {
  flex: 1;
  overflow: auto;
  background: var(--m-bg);
}

/* ── Sidebar ── */
.m-sidebar {
  width: var(--m-sidebar-width);
  min-height: 100%;
  background: var(--m-white);
  border-right: 1px solid var(--m-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.m-sidebar-logo {
  padding: 28px 24px 32px;
}

.m-sidebar-logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.m-sidebar-nav {
  flex: 1;
  padding: 0 12px;
}

.m-sidebar-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 16px;
  margin-bottom: 2px;
  border-radius: 6px;
  background: transparent;
  border: none;
  font-family: var(--m-font-body);
  font-size: 14px;
  color: var(--m-grey);
  font-weight: 400;
  transition: all 0.15s ease;
  text-decoration: none;
}

.m-sidebar-btn:hover {
  background: var(--m-hover);
  color: var(--m-black);
}

.m-sidebar-btn.active {
  background: var(--m-hover);
  color: var(--m-black);
  font-weight: 600;
}

.m-sidebar-divider {
  height: 24px;
}

.m-sidebar-actions {
  border-top: 1px solid var(--m-border);
  margin-top: 16px;
  padding-top: 16px;
}

.m-sidebar-action-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  margin-bottom: 2px;
  border-radius: 6px;
  background: transparent;
  border: none;
  font-family: var(--m-font-body);
  font-size: 13px;
  color: var(--m-black);
  font-weight: 500;
  transition: all 0.15s ease;
}

.m-sidebar-action-btn:hover {
  background: var(--m-hover);
}

/* ── Header ── */
.m-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  border-bottom: 1px solid var(--m-border);
  background: var(--m-white);
}

.m-header-org {
  font-family: var(--m-font-body);
  font-size: 13px;
  color: var(--m-mid);
  letter-spacing: 0.04em;
}

.m-header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  font-family: var(--m-font-body);
  font-size: 13px;
  color: var(--m-grey);
}

.m-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--m-sage);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--m-font-subhead);
  font-size: 13px;
  font-weight: 700;
  color: var(--m-white);
  flex-shrink: 0;
}

.m-avatar--lg {
  width: 64px;
  height: 64px;
  font-size: 24px;
}

.m-avatar--md {
  width: 48px;
  height: 48px;
  font-size: 18px;
}

/* ── Page Title ── */
.m-page-title {
  margin-bottom: 32px;
}

.m-page-title h1 {
  font-family: var(--m-font-heading);
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--m-black);
  margin: 0 0 8px;
}

.m-page-title p {
  font-family: var(--m-font-body);
  font-size: 15px;
  color: var(--m-grey);
  margin: 0;
  line-height: 1.6;
}

/* ── Page Content ── */
.m-page {
  padding: var(--m-page-pad);
}

.m-page--narrow {
  max-width: 600px;
}

.m-page--wide {
  max-width: 720px;
}

/* ── Buttons ── */
.m-btn {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  padding: 12px 24px;
  font-family: var(--m-font-body);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--m-sage);
  background: transparent;
  color: var(--m-black);
  border-radius: 2px;
  transition: all 0.15s ease;
}

.m-btn:hover {
  border-color: var(--m-black);
}

.m-btn--primary {
  background: var(--m-black);
  color: var(--m-white);
  border-color: var(--m-black);
}

.m-btn--primary:hover {
  background: #333;
}

.m-btn--danger {
  background: var(--m-danger);
  color: var(--m-white);
  border-color: var(--m-danger);
}

.m-btn--outline-danger {
  color: var(--m-danger);
  border-color: var(--m-danger);
  background: transparent;
  transition: background 0.15s, color 0.15s;
}

.m-btn--outline-danger:hover {
  background: var(--m-danger);
  color: var(--m-white);
}

.m-link--danger {
  color: var(--m-danger);
  transition: background 0.15s, color 0.15s;
  border-radius: 3px;
  padding: 1px 4px;
  margin: -1px -4px;
}

.m-link--danger:hover {
  background: var(--m-danger);
  color: var(--m-white);
}

.m-btn--secondary {
  background: var(--m-grey);
  color: var(--m-white);
  border-color: var(--m-grey);
}

.m-btn--small {
  padding: 8px 16px;
  font-size: 13px;
}

/* ── Form Fields ── */
.m-field {
  margin-bottom: 28px;
}

.m-field label {
  display: block;
  font-family: var(--m-font-body);
  font-size: 14px;
  color: var(--m-grey);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.m-field input,
.m-field select,
.m-field textarea {
  width: 100%;
  padding: 12px 0;
  border: none;
  border-bottom: 1.5px solid var(--m-sage);
  font-family: var(--m-font-body);
  font-size: 16px;
  outline: none;
  background: transparent;
  color: var(--m-black);
  transition: border-color 0.2s;
}

.m-field input:focus,
.m-field select:focus,
.m-field textarea:focus {
  border-bottom-color: var(--m-black);
}

.m-field select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%238B8987' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
}

.m-field textarea {
  resize: vertical;
}

/* ── Modal ── */
.m-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 25, 25, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(2px);
}

.m-modal {
  background: var(--m-white);
  border: 1px solid var(--m-border);
  padding: 36px 40px;
  width: 480px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.m-modal h2 {
  font-family: var(--m-font-heading);
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.m-modal .m-modal-subtitle {
  font-family: var(--m-font-body);
  font-size: 15px;
  color: var(--m-grey);
  margin-bottom: 28px;
}

/* ── Status Badge ── */
.m-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-family: var(--m-font-body);
  font-size: 13px;
  font-weight: 600;
  text-transform: capitalize;
}

.m-badge--active {
  background: #EDF7ED;
  color: var(--m-success);
}

.m-badge--completed {
  background: #F0F4F7;
  color: var(--m-info);
}

.m-badge--draft {
  background: #FFF8E7;
  color: var(--m-warning);
}

.m-badge--expired {
  background: #FDEDED;
  color: var(--m-danger);
}

/* ── Table ── */
.m-table-header {
  display: grid;
  padding: 10px 20px;
  border-bottom: 1.5px solid var(--m-black);
}

.m-table-header span {
  font-family: var(--m-font-subhead);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--m-grey);
}

.m-table-row {
  display: grid;
  padding: 14px 20px;
  border-bottom: 1px solid var(--m-border);
  align-items: center;
  transition: background 0.1s;
}

.m-table-row:hover {
  background: var(--m-hover);
}

/* ── Pill Filters ── */
.m-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.m-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--m-sage);
  background: transparent;
  color: var(--m-grey);
  font-family: var(--m-font-body);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}

.m-pill.active {
  border-color: var(--m-black);
  background: var(--m-black);
  color: var(--m-white);
}

/* ── Empty State ── */
.m-empty {
  border: 2px dashed var(--m-sage);
  padding: 60px 40px;
  text-align: center;
  margin-top: 16px;
}

.m-empty p {
  font-family: var(--m-font-body);
  font-size: 15px;
  color: var(--m-mid);
  margin-bottom: 20px;
}

/* ── Cards ── */
.m-card {
  border: 1px solid var(--m-sage);
  padding: 32px 24px;
  background: var(--m-white);
  transition: all 0.2s ease;
}

.m-card:hover {
  border-color: var(--m-black);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.m-card--flat {
  padding: 24px;
}

.m-card--flat:hover {
  transform: none;
  box-shadow: none;
}

/* ── Grid ── */
.m-grid {
  display: grid;
  gap: 16px;
}

.m-grid--clients {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.m-grid--folders {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.m-grid--licenses {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.m-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.m-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.m-grid--2 {
  grid-template-columns: 1fr 1fr;
}

/* ── Info Box ── */
.m-info-box {
  padding: 20px 24px;
  background: var(--m-cream);
  border: 1px solid var(--m-border);
}

.m-notes-box {
  padding: 16px 20px;
  border-left: 3px solid var(--m-sage);
  background: var(--m-cream);
  margin-bottom: 32px;
}

.m-contact-box {
  padding: 20px 24px;
  border: 1px solid var(--m-border);
  background: var(--m-white);
}

/* ── Section Header ── */
.m-section-title {
  font-family: var(--m-font-subhead);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--m-grey);
  margin-bottom: 12px;
}

/* ── Progress Bar ── */
.m-progress {
  height: 4px;
  background: var(--m-cream);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}

.m-progress-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s;
  background: var(--m-success);
}

.m-progress-bar--warning {
  background: var(--m-warning);
}

/* ── Link Button ── */
.m-link {
  background: none;
  border: none;
  font-family: var(--m-font-body);
  font-size: 14px;
  color: var(--m-grey);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.m-link:hover {
  color: var(--m-black);
}

.m-link--back {
  margin-bottom: 20px;
  display: inline-block;
}

/* ── Utility ── */
.m-flex { display: flex; }
.m-flex-col { flex-direction: column; }
.m-flex-1 { flex: 1; }
.m-items-center { align-items: center; }
.m-items-start { align-items: flex-start; }
.m-justify-between { justify-content: space-between; }
.m-gap-8 { gap: 8px; }
.m-gap-12 { gap: 12px; }
.m-gap-16 { gap: 16px; }
.m-gap-20 { gap: 20px; }
.m-mb-4 { margin-bottom: 4px; }
.m-mb-6 { margin-bottom: 6px; }
.m-mb-8 { margin-bottom: 8px; }
.m-mb-12 { margin-bottom: 12px; }
.m-mb-16 { margin-bottom: 16px; }
.m-mb-24 { margin-bottom: 24px; }
.m-mb-32 { margin-bottom: 32px; }
.m-mb-36 { margin-bottom: 36px; }
.m-mb-40 { margin-bottom: 40px; }
.m-mt-8 { margin-top: 8px; }
.m-mt-16 { margin-top: 16px; }
.m-text-center { text-align: center; }
.m-text-right { text-align: right; }

.m-text-black { color: var(--m-black); }
.m-text-grey { color: var(--m-grey); }
.m-text-mid { color: var(--m-mid); }

.m-text-sm { font-size: 13px; }
.m-text-base { font-size: 15px; }
.m-text-md { font-size: 16px; }
.m-text-lg { font-size: 17px; }

.m-font-heading { font-family: var(--m-font-heading); }
.m-font-subhead { font-family: var(--m-font-subhead); }
.m-font-body { font-family: var(--m-font-body); }

.m-font-light { font-weight: 300; }
.m-font-normal { font-weight: 400; }
.m-font-medium { font-weight: 500; }
.m-font-bold { font-weight: 700; }

.m-uppercase { text-transform: uppercase; }
.m-tracking-wide { letter-spacing: 0.08em; }
.m-tracking-wider { letter-spacing: 0.12em; }

/* ── FAQ Accordion ── */
.m-faq-item {
  border-bottom: 1px solid var(--m-border);
}

.m-faq-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 16px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.m-faq-btn span:first-child {
  font-family: var(--m-font-subhead);
  font-size: 16px;
  font-weight: 700;
  color: var(--m-black);
}

.m-faq-btn span:last-child {
  font-family: var(--m-font-heading);
  font-size: 18px;
  color: var(--m-mid);
  flex-shrink: 0;
  margin-left: 16px;
}

.m-faq-answer {
  font-family: var(--m-font-body);
  font-size: 15px;
  color: var(--m-grey);
  line-height: 1.7;
  margin: 0;
  padding-bottom: 16px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  :root {
    --m-page-pad: 20px;
    --m-sidebar-width: 0px;
  }

  .m-sidebar {
    display: none;
  }

  .m-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .m-grid--3 {
    grid-template-columns: 1fr;
  }

  .m-grid--2 {
    grid-template-columns: 1fr;
  }
}
