﻿:root {
      --maf-bg: #f5f9ff;
      --maf-surface: #ffffff;
      --maf-border: #d8e2f0;
      --maf-text: #10213a;
      --maf-muted: #5d6c83;
      --maf-accent: #0f62de;
      --maf-info: #2980f1;
      --maf-important: #ee9d0d;
      --maf-critical: #d61b4a;
      --maf-shadow: 0 20px 44px rgba(14, 33, 64, 0.12);
    }

    body,
    #content {
      background: #ffffff !important;
    }

    .maf-wrap {
      border: 1px solid var(--maf-border);
      border-radius: 20px;
      background: var(--maf-surface);
      box-shadow: var(--maf-shadow);
      padding: 20px;
    }

    .maf-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: start;
      margin-bottom: 14px;
    }

    .maf-head-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .maf-mode-switch {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px;
      border: 1px solid #dbe4f1;
      border-radius: 999px;
      background: #f7faff;
    }

    #mafModeSwitch {
      display: none;
    }

    .maf-mode-btn {
      border: 0;
      border-radius: 999px;
      background: transparent;
      color: #50647f;
      min-height: 30px;
      padding: 0 12px;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.01em;
      cursor: pointer;
      transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
    }

    .maf-mode-btn:hover {
      background: #eef4ff;
      color: #15345a;
    }

    .maf-mode-btn.active {
      background: #0f62de;
      color: #fff;
      box-shadow: 0 8px 18px rgba(15, 98, 222, 0.18);
    }

    .maf-eyebrow {
      margin: 0;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      color: var(--maf-accent);
      font-weight: 700;
    }

    .maf-head h1 {
      margin: 4px 0 0;
      color: var(--maf-text);
      font-size: 30px;
      line-height: 1.08;
      letter-spacing: -0.03em;
      font-weight: 850;
    }

    .maf-subline {
      margin: 8px 0 0;
      color: var(--maf-muted);
      font-size: 13px;
    }

    .maf-shop-switch {
      border: 1px solid #dbe4f1;
      border-radius: 12px;
      padding: 10px 14px;
      background: #f9fbff;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 14px;
    }

    .maf-main-shell {
      margin-top: 18px;
      margin-bottom: 28px;
    }

    .maf-main-shell .maf-shop-switch {
      margin-bottom: 18px;
    }

    .maf-header-separator {
      border-top: 1px solid #e5e7eb;
      margin-top: 4px;
    }

    .maf-shop-label {
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      color: #64748b;
      font-weight: 700;
    }

    .maf-shop-tabs {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px;
    }

    .maf-shop-btn {
      border-radius: 999px !important;
      border: 1px solid transparent !important;
      background: transparent !important;
      color: #334155 !important;
      min-height: 32px;
      padding: 0 14px !important;
      font-weight: 600;
      box-shadow: none !important;
      transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
    }

    .maf-shop-btn:hover {
      background: #eef3fb !important;
      color: #0f172a !important;
    }

    .maf-shop-btn.active {
      color: #fff !important;
      border-color: var(--maf-accent) !important;
      background: #0f62de !important;
      box-shadow: none !important;
    }

    .maf-shop-tabs [data-action="add-shop"] {
      border-radius: 999px !important;
      border: 1px dashed #cbd5e1 !important;
      background: transparent !important;
      color: #475569 !important;
      min-height: 32px;
      padding: 0 12px !important;
      font-weight: 500;
    }

    .maf-shop-tabs [data-action="add-shop"]:hover {
      border-color: #94a3b8 !important;
      background: #f8fafc !important;
      color: #0f172a !important;
    }

    .maf-summary {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
      margin-bottom: 14px;
    }

    .maf-stat {
      border: 1px solid var(--maf-border);
      border-radius: 12px;
      background: #fbfcff;
      padding: 10px;
    }

    .maf-stat-name {
      font-size: 11px;
      color: var(--maf-muted);
      letter-spacing: 0.08em;
      text-transform: uppercase;
      font-weight: 700;
    }

    .maf-stat-value {
      margin-top: 3px;
      font-size: 24px;
      line-height: 1;
      color: var(--maf-text);
      font-weight: 850;
    }

    .maf-stat-critical .maf-stat-value { color: var(--maf-critical); }
    .maf-stat-important .maf-stat-value { color: var(--maf-important); }
    .maf-stat-info .maf-stat-value { color: var(--maf-info); }

    .maf-layout {
      display: grid;
      grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.9fr);
      gap: 14px;
    }

    .maf-panel {
      border: 1px solid var(--maf-border);
      border-radius: 16px;
      background: #fff;
      padding: 14px;
    }

    .maf-calendar-panel {
      position: relative;
      overflow: hidden;
    }

    .maf-panel-head {
      margin-bottom: 10px;
    }

    .maf-panel-head h2 {
      margin: 0;
      font-size: 20px;
      line-height: 1.2;
      color: var(--maf-text);
      font-weight: 800;
      letter-spacing: -0.01em;
    }

    .maf-panel-head p {
      margin: 6px 0 0;
      font-size: 13px;
      color: var(--maf-muted);
    }

    .maf-note {
      border: 1px dashed #e5b86d;
      border-radius: 10px;
      background: #fff8ec;
      color: #9a5f08;
      padding: 8px 10px;
      font-size: 12px;
      margin-bottom: 10px;
    }

    .maf-note.hidden { display: none; }

    .maf-events {
      display: grid;
      gap: 10px;
    }

    .maf-event {
      border: 1px solid var(--maf-border);
      border-left-width: 4px;
      border-radius: 12px;
      padding: 11px;
      background: #fff;
      cursor: pointer;
      transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    }

    .maf-event:hover {
      transform: translateY(-1px);
      box-shadow: 0 14px 28px rgba(9, 26, 49, 0.08);
      border-color: #cfdcf0;
    }

    .maf-event:focus-visible {
      outline: 0;
      transform: translateY(-1px);
      box-shadow: 0 0 0 3px rgba(41, 128, 241, 0.16), 0 14px 28px rgba(9, 26, 49, 0.08);
      border-color: #6aa4ef;
    }

    .maf-event-critical { border-left-color: var(--maf-critical); }
    .maf-event-important { border-left-color: var(--maf-important); }
    .maf-event-info { border-left-color: var(--maf-info); }

    .maf-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: start;
      gap: 10px;
    }

    .maf-row-main {
      min-width: 0;
    }

    .maf-row-badge {
      text-align: right;
      align-self: start;
      white-space: nowrap;
    }

    .maf-ttl {
      color: var(--maf-text);
      font-size: 15px;
      font-weight: 760;
      line-height: 1.2;
    }

    .maf-txt {
      margin-top: 3px;
      color: var(--maf-muted);
      font-size: 12px;
    }

    .maf-inline-link {
      color: inherit;
      text-decoration: underline;
      text-decoration-thickness: 1px;
      text-underline-offset: 2px;
      cursor: pointer;
    }

    .maf-inline-link:hover {
      color: var(--maf-accent);
    }

    .maf-scope {
      margin-top: 6px;
      display: flex;
      gap: 8px;
      align-items: flex-start;
    }

    .maf-scope-thumb {
      width: 40px;
      height: 40px;
      border-radius: 8px;
      border: 1px solid var(--maf-border);
      object-fit: cover;
      background: #fff;
      flex: 0 0 auto;
    }

    .maf-scope-line {
      color: var(--maf-muted);
      font-size: 12px;
      line-height: 1.35;
      display: flex;
      align-items: center;
      gap: 4px;
      min-width: 0;
    }

    .maf-scope-label {
      color: #445a79;
      font-weight: 700;
      flex: 0 0 auto;
    }

    .maf-scope-value {
      min-width: 0;
      flex: 1 1 auto;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .maf-scope-value .maf-inline-link {
      display: inline-block;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      vertical-align: bottom;
    }

    .maf-badge {
      border-radius: 999px;
      padding: 4px 9px;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-weight: 800;
    }

    .maf-badge-critical { color: #a1032b; background: rgba(214, 27, 74, 0.16); }
    .maf-badge-important { color: #905201; background: rgba(238, 157, 13, 0.2); }
    .maf-badge-info { color: #0658cc; background: rgba(41, 128, 241, 0.17); }

    .maf-tag {
      border: 1px solid var(--maf-border);
      border-radius: 999px;
      padding: 3px 8px;
      font-size: 11px;
      color: #3c4d66;
      background: #f8fbff;
    }

    .maf-card-meta {
      margin-top: 9px;
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .maf-card-meta-item {
      border: 1px solid var(--maf-border);
      border-radius: 999px;
      padding: 3px 8px;
      font-size: 11px;
      color: #3c4d66;
      background: #f8fbff;
    }

    .maf-card-meta-item.negative {
      border-color: #f3d0d6;
      background: #fff0f3;
      color: #9e1e3f;
    }

    .maf-card-meta-item.positive {
      border-color: #c8e5cf;
      background: #eefbf2;
      color: #1d6b30;
    }

    .maf-card-meta-item.neutral {
      border-color: #dce8f7;
      background: #f8fbff;
      color: #355178;
    }

    .maf-empty {
      border: 1px dashed var(--maf-border);
      border-radius: 12px;
      padding: 18px;
      text-align: center;
      background: #fbfdff;
      color: var(--maf-muted);
      font-size: 13px;
    }

    .maf-actions {
      margin-top: 10px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .maf-detail-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      border-radius: 999px !important;
      border-color: #c9d9f0 !important;
      background: linear-gradient(180deg, #f7fbff 0%, #ecf4ff 100%) !important;
      color: #234a84 !important;
      box-shadow: 0 6px 14px rgba(35, 74, 132, 0.08);
      transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
    }

    .maf-detail-btn:hover {
      border-color: #aac4e8 !important;
      background: linear-gradient(180deg, #f1f7ff 0%, #e2eeff 100%) !important;
      color: #173f76 !important;
      transform: translateY(-1px);
      box-shadow: 0 10px 20px rgba(35, 74, 132, 0.12);
    }

    .maf-detail-btn:focus-visible {
      outline: 0;
      border-color: #8fb1e3 !important;
      box-shadow: 0 0 0 3px rgba(41, 128, 241, 0.14), 0 10px 20px rgba(35, 74, 132, 0.12);
    }

    .maf-feedback {
      font-size: 12px;
      color: var(--maf-muted);
      display: inline-flex;
      gap: 4px;
      align-items: center;
      flex-wrap: wrap;
    }

    .maf-feedback-link {
      border: none;
      background: transparent;
      padding: 0;
      color: var(--maf-accent);
      text-decoration: underline;
      cursor: pointer;
      font-size: 12px;
    }

    .maf-feedback-link:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      text-decoration: none;
    }

    .maf-modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(8, 21, 43, 0.36);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.18s ease;
      z-index: 122;
    }

    .maf-modal-backdrop.open {
      opacity: 1;
      pointer-events: auto;
    }

    .maf-modal {
      position: fixed;
      inset: 0;
      z-index: 123;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 16px;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.18s ease;
    }

    .maf-modal.open {
      opacity: 1;
      pointer-events: auto;
    }

    .maf-modal-card {
      width: min(700px, 100%);
      border: 1px solid var(--maf-border);
      border-radius: 14px;
      background: #fff;
      box-shadow: 0 24px 46px rgba(9, 26, 49, 0.2);
      padding: 14px;
    }

    .maf-modal-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 10px;
    }

    .maf-modal-title {
      margin: 0;
      color: var(--maf-text);
      font-size: 20px;
      line-height: 1.2;
      letter-spacing: -0.01em;
      font-weight: 780;
    }

    .maf-modal-info {
      margin: 0;
      border: 1px solid #dce8f8;
      border-radius: 10px;
      background: #f6faff;
      color: #39557d;
      font-size: 13px;
      line-height: 1.4;
      padding: 9px 10px;
    }

    .maf-modal-form {
      margin-top: 12px;
      display: grid;
      gap: 9px;
    }

    .maf-modal-label {
      font-size: 12px;
      color: #536b8d;
      font-weight: 700;
      letter-spacing: 0.03em;
      text-transform: uppercase;
    }

    .maf-url-input {
      display: flex;
      align-items: center;
      border: 1px solid var(--maf-border);
      border-radius: 10px;
      overflow: hidden;
      background: #fff;
    }

    .maf-url-prefix {
      background: #f8fbff;
      color: #607998;
      font-size: 12px;
      white-space: nowrap;
      border-right: 1px solid var(--maf-border);
      padding: 0 10px;
      min-height: 40px;
      display: inline-flex;
      align-items: center;
    }

    .maf-url-field {
      flex: 1 1 auto;
      min-width: 0;
      min-height: 40px;
      border: 0;
      outline: none;
      background: #fff;
      color: var(--maf-text);
      font-size: 13px;
      padding: 0 10px;
    }

    .maf-url-field::placeholder {
      color: #94a3b8;
    }

    .maf-modal-actions {
      display: flex;
      justify-content: end;
      gap: 8px;
      margin-top: 4px;
    }

    .maf-drawer-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(8, 21, 43, 0.38);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s ease;
      z-index: 120;
    }

    .maf-drawer-backdrop.open {
      opacity: 1;
      pointer-events: auto;
    }

    .maf-drawer {
      position: fixed;
      top: 0;
      right: -580px;
      width: min(560px, 100vw);
      height: 100vh;
      background: #fff;
      border-left: 1px solid var(--maf-border);
      box-shadow: -8px 0 28px rgba(9, 24, 45, 0.2);
      z-index: 121;
      display: flex;
      flex-direction: column;
      transition: right 0.24s ease;
    }

    .maf-drawer.open {
      right: 0;
    }

    .maf-drawer-head {
      display: flex;
      align-items: start;
      justify-content: space-between;
      gap: 10px;
      padding: 16px;
      border-bottom: 1px solid var(--maf-border);
      background: #f8fbff;
    }

    .maf-drawer-kicker {
      margin: 0;
      font-size: 11px;
      color: var(--maf-muted);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-weight: 700;
    }

    .maf-drawer-title {
      margin: 5px 0 0;
      color: var(--maf-text);
      font-size: 20px;
      line-height: 1.2;
      letter-spacing: -0.01em;
      font-weight: 800;
    }

    .maf-drawer-body {
      padding: 14px 16px 18px;
      overflow: auto;
      display: grid;
      gap: 12px;
    }

    .maf-detail-badges {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .maf-detail-summary {
      margin: 0;
      color: var(--maf-text);
      font-size: 14px;
      line-height: 1.4;
      font-weight: 650;
    }

    .maf-detail-body {
      margin: 0;
      color: var(--maf-muted);
      font-size: 13px;
      line-height: 1.45;
    }

    .maf-detail-section {
      border: 1px solid var(--maf-border);
      border-radius: 12px;
      padding: 10px;
      background: #fbfdff;
    }

    .maf-detail-section h4 {
      margin: 0 0 8px;
      color: var(--maf-text);
      font-size: 13px;
      font-weight: 760;
      text-transform: uppercase;
      letter-spacing: 0.06em;
    }

    .maf-signal-list {
      display: grid;
      gap: 6px;
    }

    .maf-signal-tools {
      display: grid;
      grid-template-columns: 1fr 190px;
      gap: 8px;
      margin-bottom: 10px;
    }

    .maf-signal-search,
    .maf-signal-sort {
      border: 1px solid var(--maf-border);
      border-radius: 8px;
      background: #fff;
      color: var(--maf-text);
      font-size: 12px;
      min-height: 34px;
      padding: 6px 10px;
    }

    .maf-signal-search::placeholder {
      color: #7a8ca8;
    }

    @media (max-width: 640px) {
      .maf-modal-card {
        padding: 12px;
      }

      .maf-url-input {
        flex-direction: column;
        align-items: stretch;
      }

      .maf-url-prefix {
        border-right: 0;
        border-bottom: 1px solid var(--maf-border);
      }

      .maf-modal-actions {
        justify-content: stretch;
      }

      .maf-modal-actions .btn {
        flex: 1 1 auto;
      }

      .maf-signal-tools {
        grid-template-columns: 1fr;
      }
    }

    .maf-signal-item {
      border: 1px solid var(--maf-border);
      border-radius: 8px;
      background: #fff;
      padding: 10px;
      font-size: 12px;
      color: var(--maf-text);
    }

    .maf-signal-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
    }

    .maf-signal-summary {
      margin-top: 6px;
      color: var(--maf-text);
      font-size: 13px;
      line-height: 1.4;
      font-weight: 650;
    }

    .maf-signal-meta {
      margin-top: 6px;
      color: var(--maf-muted);
      font-size: 12px;
      line-height: 1.35;
      display: grid;
      gap: 2px;
    }

    .maf-meta-line {
      display: flex;
      align-items: center;
      gap: 4px;
      min-width: 0;
    }

    .maf-meta-label {
      flex: 0 0 auto;
      color: #445a79;
      font-weight: 700;
    }

    .maf-meta-value {
      min-width: 0;
      flex: 1 1 auto;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .maf-meta-value .maf-inline-link {
      display: inline-block;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      vertical-align: bottom;
    }

    .maf-signal-facts {
      margin-top: 7px;
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }

    .maf-signal-fact {
      border: 1px solid var(--maf-border);
      border-radius: 999px;
      background: #f8fbff;
      padding: 2px 8px;
      font-size: 11px;
      color: #2f4362;
    }

    .maf-signal-block {
      margin-top: 8px;
      border: 1px solid #e3ecf8;
      border-radius: 8px;
      background: #f9fbff;
      padding: 8px;
    }

    .maf-signal-block-title {
      margin: 0 0 6px;
      color: #334f75;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      font-weight: 760;
    }

    .maf-change-list {
      display: grid;
      gap: 5px;
    }

    .maf-change-item {
      border: 1px solid #dce8f7;
      border-radius: 6px;
      background: #fff;
      padding: 6px 7px;
      font-size: 12px;
      color: #203753;
      line-height: 1.3;
    }

    .maf-change-rich {
      padding: 8px;
      background:
        linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
    }

    .maf-change-rich-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 6px;
    }

    .maf-delta-pill {
      border: 1px solid #dce8f7;
      border-radius: 999px;
      padding: 2px 8px;
      font-size: 11px;
      font-weight: 700;
      white-space: nowrap;
    }

    .maf-delta-up {
      border-color: #c8e5cf;
      background: #eefbf2;
      color: #1d6b30;
    }

    .maf-delta-down {
      border-color: #f3d0d6;
      background: #fff0f3;
      color: #9e1e3f;
    }

    .maf-delta-flat {
      border-color: #dce8f7;
      background: #f8fbff;
      color: #355178;
    }

    .maf-change-compare {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 6px;
    }

    .maf-change-side {
      border: 1px solid #dce8f7;
      border-radius: 8px;
      background: #fff;
      padding: 7px 8px;
    }

    .maf-change-side-label {
      color: #6f819b;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      font-weight: 760;
    }

    .maf-change-side-value {
      margin-top: 4px;
      color: #203753;
      font-size: 12px;
      line-height: 1.35;
      word-break: break-word;
    }

    .maf-change-side-emphasis {
      color: var(--maf-text);
      font-size: 22px;
      line-height: 1;
      font-weight: 820;
      letter-spacing: -0.02em;
    }

    .maf-change-side-shop {
      color: var(--maf-text);
      font-size: 14px;
      line-height: 1.35;
      font-weight: 620;
      letter-spacing: 0;
      word-break: break-word;
    }

    .maf-change-side-caption {
      margin-top: 4px;
      color: #6f819b;
      font-size: 11px;
      line-height: 1.3;
    }

    .maf-headroom-compare .maf-change-side-value {
      display: grid;
      grid-template-rows: auto auto;
      align-content: start;
      gap: 2px;
    }

    .maf-headroom-shop-line {
      min-height: 1.35em;
      color: var(--maf-text);
      font-size: 14px;
      line-height: 1.35;
      font-weight: 620;
      letter-spacing: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    @media (max-width: 520px) {
      .maf-change-compare {
        grid-template-columns: 1fr;
      }

      .maf-own-offer-decline-hero,
      .maf-own-offer-decline-stats,
      .maf-buybox-pattern-hero,
      .maf-buybox-pattern-stats,
      .maf-stockout-hero,
      .maf-stockout-story,
      .maf-risk-spotlight-grid,
      .maf-competitor-power-prices,
      .maf-competitor-power-story,
      .maf-market-reference-grid {
        grid-template-columns: 1fr;
      }

      .maf-buybox-pattern-breakdown-row,
      .maf-buybox-pattern-product-head {
        grid-template-columns: 1fr;
      }
    }

    .maf-change-empty {
      color: #6f819b;
      font-size: 12px;
    }

    .maf-change-hint {
      margin-top: 7px;
      border: 1px solid #dce8f7;
      border-radius: 7px;
      padding: 6px 8px;
      font-size: 12px;
      line-height: 1.35;
    }

    .maf-change-hint-assumption {
      border-color: #c9dbf7;
      background: #f4f8ff;
      color: #2b4b78;
    }

    .maf-own-offer-decline-card {
      border-color: #eed8df;
      background: linear-gradient(180deg, #ffffff 0%, #fff7f8 100%);
    }

    .maf-competitor-power-card {
      border-color: #d0e1f5;
      border-radius: 12px;
      background:
        linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 10px 22px rgba(25, 62, 117, 0.06);
    }

    .maf-competitor-power-prices {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .maf-competitor-power-price {
      border: 1px solid #dbe8f8;
      border-radius: 12px;
      padding: 12px;
      background:
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    }

    .maf-competitor-power-price-current {
      border-color: #c8e2d1;
      background:
        radial-gradient(circle at top right, rgba(103, 194, 125, 0.16), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f3fbf6 100%);
    }

    .maf-competitor-power-price-label,
    .maf-competitor-power-kicker,
    .maf-competitor-power-stat-label,
    .maf-competitor-power-footer-label {
      color: #6d7f99;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-weight: 780;
    }

    .maf-competitor-power-price-value {
      margin-top: 6px;
      color: #173257;
      font-size: 28px;
      line-height: 1;
      font-weight: 840;
      letter-spacing: -0.03em;
    }

    .maf-competitor-power-price-note,
    .maf-competitor-power-focus-note,
    .maf-competitor-power-position-note,
    .maf-competitor-power-inline-meta {
      margin-top: 6px;
      color: #4f6789;
      font-size: 12px;
      line-height: 1.35;
    }

    .maf-competitor-power-story {
      margin-top: 10px;
      display: grid;
      grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.95fr);
      gap: 10px;
    }

    .maf-competitor-power-focus,
    .maf-competitor-power-position {
      border-radius: 12px;
      padding: 12px;
      min-height: 100%;
    }

    .maf-competitor-power-focus {
      border: 1px solid #d7e5f7;
      background:
        radial-gradient(circle at top left, rgba(88, 140, 255, 0.14), transparent 52%),
        linear-gradient(180deg, #f9fbff 0%, #ffffff 100%);
    }

    .maf-competitor-power-position {
      border: 1px solid #dce6f5;
      background:
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    }

    .maf-competitor-power-focus-value,
    .maf-competitor-power-position-value {
      margin-top: 8px;
      color: #173257;
      font-size: 30px;
      line-height: 1;
      font-weight: 860;
      letter-spacing: -0.03em;
    }

    .maf-competitor-power-stats {
      margin-top: 10px;
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
    }

    .maf-competitor-power-stat {
      border: 1px solid #dce8f7;
      border-radius: 10px;
      padding: 10px;
      background: rgba(255, 255, 255, 0.94);
    }

    .maf-competitor-power-stat-value {
      margin-top: 6px;
      color: #1e3a61;
      font-size: 14px;
      line-height: 1.35;
      font-weight: 730;
    }

    .maf-competitor-power-footer {
      margin-top: 10px;
      border-top: 1px solid #dce8f7;
      padding-top: 9px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
    }

    .maf-competitor-power-footer-value {
      color: #355178;
      font-size: 12px;
      line-height: 1.35;
      font-weight: 650;
    }

    .maf-stockout-card {
      border-color: #d9e5f5;
      border-radius: 12px;
      background:
        linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 10px 22px rgba(25, 62, 117, 0.05);
    }

    .maf-stockout-card-own {
      border-color: #eed8df;
      background:
        linear-gradient(180deg, #ffffff 0%, #fff7f8 100%);
    }

    .maf-stockout-hero {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .maf-stockout-metric,
    .maf-stockout-focus,
    .maf-stockout-stat {
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.96);
    }

    .maf-stockout-metric {
      border: 1px solid #dce8f7;
      padding: 12px;
    }

    .maf-stockout-metric-primary {
      border-color: #d4e4f8;
      background:
        radial-gradient(circle at top left, rgba(88, 140, 255, 0.14), transparent 54%),
        linear-gradient(180deg, #f9fbff 0%, #ffffff 100%);
    }

    .maf-stockout-metric-share {
      border-color: #d8e8da;
      background:
        radial-gradient(circle at top right, rgba(101, 191, 123, 0.16), transparent 56%),
        linear-gradient(180deg, #fbfffc 0%, #ffffff 100%);
    }

    .maf-stockout-metric-label,
    .maf-stockout-focus-label,
    .maf-stockout-stat-label {
      color: #6d7f99;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-weight: 780;
    }

    .maf-stockout-metric-value {
      margin-top: 6px;
      color: #173257;
      font-size: 28px;
      line-height: 1;
      font-weight: 840;
      letter-spacing: -0.03em;
    }

    .maf-stockout-metric-note,
    .maf-stockout-focus-note {
      margin-top: 6px;
      color: #4f6789;
      font-size: 12px;
      line-height: 1.35;
    }

    .maf-stockout-story {
      margin-top: 10px;
      display: grid;
      grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.95fr);
      gap: 10px;
    }

    .maf-stockout-focus {
      border: 1px solid #d8e5f7;
      padding: 12px;
      background:
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    }

    .maf-stockout-focus-value {
      margin-top: 8px;
      color: #173257;
      font-size: 30px;
      line-height: 1;
      font-weight: 860;
      letter-spacing: -0.03em;
    }

    .maf-stockout-side {
      display: grid;
      gap: 8px;
    }

    .maf-stockout-stat {
      border: 1px solid #dce8f7;
      padding: 10px;
    }

    .maf-stockout-stat-value {
      margin-top: 6px;
      color: #1e3a61;
      font-size: 14px;
      line-height: 1.35;
      font-weight: 730;
    }

    .maf-own-offer-decline-offer {
      margin-bottom: 8px;
      color: #556b87;
      font-size: 12px;
      line-height: 1.4;
    }

    .maf-own-offer-decline-hero {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .maf-own-offer-decline-panel {
      border: 1px solid #dce8f7;
      border-radius: 10px;
      background: #fff;
      padding: 10px;
    }

    .maf-own-offer-decline-panel-current {
      border-color: #f1d4db;
      background: linear-gradient(180deg, #fffefe 0%, #fff3f5 100%);
    }

    .maf-own-offer-decline-panel-target {
      border-color: #cfe3d5;
      background: linear-gradient(180deg, #ffffff 0%, #f2fbf4 100%);
    }

    .maf-own-offer-decline-kicker {
      margin: 0;
      color: #6f819b;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-weight: 760;
    }

    .maf-own-offer-decline-price {
      margin-top: 4px;
      color: var(--maf-text);
      font-size: 28px;
      line-height: 1;
      font-weight: 840;
      letter-spacing: -0.03em;
    }

    .maf-own-offer-decline-segment {
      margin-top: 6px;
      color: #556b87;
      font-size: 12px;
      line-height: 1.35;
    }

    .maf-own-offer-decline-insight {
      margin-top: 8px;
      border: 1px solid #dce8f7;
      border-radius: 10px;
      padding: 8px;
    }

    .maf-own-offer-decline-insight-negative {
      border-color: #f3d0d6;
      background: #fff0f3;
      color: #8f2141;
    }

    .maf-own-offer-decline-insight-positive {
      border-color: #c8e5cf;
      background: #eefbf2;
      color: #1d6b30;
    }

    .maf-own-offer-decline-insight-neutral {
      border-color: #dce8f7;
      background: #f8fbff;
      color: #355178;
    }

    .maf-own-offer-decline-insight-head {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 6px;
    }

    .maf-own-offer-decline-chip {
      display: inline-flex;
      align-items: center;
      border-radius: 999px;
      padding: 3px 8px;
      font-size: 11px;
      font-weight: 700;
      line-height: 1.2;
    }

    .maf-own-offer-decline-chip-demand {
      background: rgba(15, 98, 222, 0.1);
      color: #0f62de;
    }

    .maf-own-offer-decline-chip-price {
      background: rgba(214, 27, 74, 0.1);
      color: #b41b48;
    }

    .maf-own-offer-decline-insight-text {
      font-size: 12px;
      line-height: 1.4;
      font-weight: 600;
    }

    .maf-own-offer-decline-stats {
      margin-top: 8px;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 6px;
    }

    .maf-own-offer-decline-stat {
      border: 1px solid #dce8f7;
      border-radius: 8px;
      background: #fff;
      padding: 7px 8px;
    }

    .maf-own-offer-decline-stat-positive {
      border-color: #c8e5cf;
      background: #f6fff8;
    }

    .maf-own-offer-decline-stat-negative {
      border-color: #f3d0d6;
      background: #fff7f8;
    }

    .maf-own-offer-decline-stat-label {
      color: #6f819b;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      font-weight: 760;
    }

    .maf-own-offer-decline-stat-value {
      margin-top: 3px;
      color: var(--maf-text);
      font-size: 12px;
      line-height: 1.35;
      font-weight: 650;
      word-break: break-word;
    }

    .maf-market-reference-card {
      border-color: #dbe6f3;
      background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    }

    .maf-market-reference-summary {
      border: 1px solid #dce8f7;
      border-radius: 10px;
      background: #fff;
      padding: 10px;
    }

    .maf-market-reference-title {
      color: var(--maf-text);
      font-size: 14px;
      line-height: 1.35;
      font-weight: 760;
    }

    .maf-market-reference-body {
      margin-top: 4px;
      color: #5b6e86;
      font-size: 12px;
      line-height: 1.45;
    }

    .maf-market-reference-grid {
      margin-top: 8px;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .maf-market-reference-panel {
      border: 1px solid #dce8f7;
      border-radius: 10px;
      background: #fff;
      padding: 10px;
    }

    .maf-market-reference-panel-market {
      border-color: #d8e7dc;
      background: linear-gradient(180deg, #ffffff 0%, #f5faf6 100%);
    }

    .maf-market-reference-kicker {
      margin: 0;
      color: #6f819b;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-weight: 760;
    }

    .maf-market-reference-value {
      margin-top: 4px;
      color: var(--maf-text);
      font-size: 28px;
      line-height: 1;
      font-weight: 840;
      letter-spacing: -0.03em;
    }

    .maf-market-reference-caption {
      margin-top: 6px;
      color: #556b87;
      font-size: 12px;
      line-height: 1.4;
    }

    .maf-market-reference-meta {
      margin-top: 8px;
      border: 1px solid #dce8f7;
      border-radius: 10px;
      background: #f8fbff;
      padding: 8px 10px;
      display: grid;
      gap: 4px;
    }

    .maf-market-reference-meta-line {
      color: #5b6e86;
      font-size: 12px;
      line-height: 1.4;
    }

    .maf-market-reference-meta-label {
      color: #36527b;
      font-weight: 700;
    }

    .maf-offer-stagnation-card {
      border-color: #dbe6f3;
      background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    }

    .maf-offer-stagnation-card .maf-risk-spotlight-main {
      border-color: #dce8f7;
      background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
    }

    .maf-offer-stagnation-card .maf-risk-spotlight-value {
      color: #183457;
    }

    .maf-offer-stagnation-card .maf-risk-spotlight-note {
      max-width: 22ch;
    }

    .maf-offer-stagnation-meta {
      margin-top: 8px;
      border: 1px solid #dce8f7;
      border-radius: 10px;
      background: #fff;
      padding: 8px 10px;
      display: grid;
      gap: 4px;
    }

    .maf-offer-stagnation-meta-line {
      color: #5b6e86;
      font-size: 12px;
      line-height: 1.4;
    }

    .maf-offer-stagnation-meta-label {
      color: #36527b;
      font-weight: 700;
    }

    .maf-buybox-pattern-card {
      border-color: #d8e6dc;
      background:
        linear-gradient(180deg, #ffffff 0%, #f6fbf7 100%);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        0 12px 24px rgba(27, 74, 46, 0.04);
    }

    .maf-buybox-pattern-card-aggregate {
      border-color: #d1e2eb;
      background:
        linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
    }

    .maf-buybox-pattern-summary {
      border: 1px solid #dce8df;
      border-radius: 12px;
      background: #fff;
      padding: 12px;
    }

    .maf-buybox-pattern-title {
      color: var(--maf-text);
      font-size: 14px;
      line-height: 1.35;
      font-weight: 760;
    }

    .maf-buybox-pattern-body {
      margin-top: 5px;
      color: #5b6e86;
      font-size: 12px;
      line-height: 1.45;
    }

    .maf-buybox-pattern-hero {
      margin-top: 8px;
      display: grid;
      grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
      gap: 10px;
      align-items: stretch;
    }

    .maf-buybox-pattern-main,
    .maf-buybox-pattern-side {
      border: 1px solid #dce8df;
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.96);
      padding: 12px;
    }

    .maf-buybox-pattern-main {
      border-color: #cfe3d6;
      background:
        radial-gradient(circle at top left, rgba(112, 191, 137, 0.16), transparent 52%),
        linear-gradient(180deg, #ffffff 0%, #f2faf4 100%);
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .maf-buybox-pattern-kicker {
      margin: 0;
      color: #6f819b;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-weight: 760;
    }

    .maf-buybox-pattern-value {
      margin-top: 6px;
      color: var(--maf-text);
      font-size: 30px;
      line-height: 1;
      font-weight: 840;
      letter-spacing: -0.03em;
      word-break: break-word;
    }

    .maf-buybox-pattern-caption {
      margin-top: 8px;
      color: #586b84;
      font-size: 12px;
      line-height: 1.4;
    }

    .maf-buybox-pattern-side {
      display: grid;
      gap: 8px;
      align-content: start;
    }

    .maf-buybox-pattern-side-copy {
      color: #48657f;
      font-size: 12px;
      line-height: 1.45;
      font-weight: 600;
    }

    .maf-buybox-pattern-stats {
      margin-top: 10px;
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
    }

    .maf-buybox-pattern-stat {
      border: 1px solid #e3ebf8;
      border-radius: 10px;
      background: #fbfdff;
      padding: 10px;
    }

    .maf-buybox-pattern-stat-label {
      color: #7a8799;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      font-weight: 760;
    }

    .maf-buybox-pattern-stat-value {
      margin-top: 5px;
      color: var(--maf-text);
      font-size: 14px;
      line-height: 1.35;
      font-weight: 760;
      word-break: break-word;
    }

    .maf-buybox-pattern-section {
      margin-top: 10px;
      border: 1px solid #dce8df;
      border-radius: 12px;
      background: #fff;
      padding: 10px;
    }

    .maf-buybox-pattern-section-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
      color: #6d8098;
      font-size: 11px;
      line-height: 1.35;
      font-weight: 700;
    }

    .maf-buybox-pattern-section-head strong {
      color: #183457;
      font-size: 13px;
      line-height: 1.35;
      font-weight: 780;
    }

    .maf-buybox-pattern-breakdown,
    .maf-buybox-pattern-products {
      margin-top: 8px;
      display: grid;
      gap: 6px;
    }

    .maf-buybox-pattern-breakdown-row,
    .maf-buybox-pattern-product {
      border: 1px solid #e4ecf7;
      border-radius: 10px;
      background: #fbfdff;
      padding: 10px;
    }

    .maf-buybox-pattern-breakdown-row {
      display: grid;
      grid-template-columns: minmax(0, 1.2fr) minmax(170px, 0.9fr);
      gap: 10px;
      align-items: center;
    }

    .maf-buybox-pattern-breakdown-title,
    .maf-buybox-pattern-product-title {
      color: #36527b;
      font-size: 12px;
      line-height: 1.35;
      font-weight: 700;
    }

    .maf-buybox-pattern-breakdown-note,
    .maf-buybox-pattern-product-note,
    .maf-buybox-pattern-product-meta {
      color: #5b6e86;
      font-size: 12px;
      line-height: 1.4;
    }

    .maf-buybox-pattern-breakdown-note,
    .maf-buybox-pattern-product-meta {
      margin-top: 4px;
    }

    .maf-buybox-pattern-breakdown-side {
      text-align: right;
    }

    .maf-buybox-pattern-breakdown-value {
      color: #183457;
      font-size: 13px;
      line-height: 1.35;
      font-weight: 760;
    }

    .maf-buybox-pattern-breakdown-caption {
      margin-top: 4px;
      color: #71849d;
      font-size: 11px;
      line-height: 1.35;
    }

    .maf-buybox-pattern-product-head {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
    }

    .maf-buybox-pattern-product-field {
      justify-self: end;
      border: 1px solid #d9e7de;
      border-radius: 999px;
      background: #f3fbf5;
      color: #2d6840;
      padding: 4px 9px;
      font-size: 11px;
      line-height: 1.2;
      font-weight: 760;
      text-align: center;
    }

    .maf-buybox-pattern-product-note {
      margin-top: 6px;
    }

    .maf-risk-spotlight-card {
      border-color: #f0d8de;
      background: linear-gradient(180deg, #fffefe 0%, #fff6f7 100%);
    }

    .maf-risk-spotlight-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
      gap: 8px;
      align-items: stretch;
    }

    .maf-risk-spotlight-main,
    .maf-risk-spotlight-side {
      border: 1px solid #dce8f7;
      border-radius: 10px;
      background: #fff;
      padding: 10px;
    }

    .maf-risk-spotlight-main {
      border-color: #f0d0d7;
      background: linear-gradient(180deg, #fffefe 0%, #fff1f4 100%);
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      text-align: center;
    }

    .maf-risk-spotlight-kicker {
      margin: 0;
      color: #7a8799;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-weight: 760;
    }

    .maf-risk-spotlight-value {
      margin-top: 6px;
      color: var(--maf-text);
      font-size: 32px;
      line-height: 1;
      font-weight: 840;
      letter-spacing: -0.03em;
    }

    .maf-risk-spotlight-note {
      margin-top: 8px;
      color: #586b84;
      font-size: 12px;
      line-height: 1.4;
      max-width: 26ch;
    }

    .maf-risk-spotlight-side {
      display: grid;
      gap: 8px;
      align-content: start;
    }

    .maf-risk-spotlight-stat {
      border: 1px solid #e3ebf8;
      border-radius: 8px;
      background: #f9fbff;
      padding: 8px;
    }

    .maf-risk-spotlight-stat-label {
      color: #7a8799;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      font-weight: 760;
    }

    .maf-risk-spotlight-stat-value {
      margin-top: 4px;
      color: var(--maf-text);
      font-size: 18px;
      line-height: 1.2;
      font-weight: 760;
      word-break: break-word;
    }

    .maf-risk-spotlight-summary {
      margin-top: 8px;
      color: #5f7089;
      font-size: 12px;
      line-height: 1.4;
    }

    @media (max-width: 880px) {
      .maf-competitor-power-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 520px) {
      .maf-competitor-power-stats {
        grid-template-columns: 1fr;
      }
    }

    .maf-change-extra {
      margin-top: 8px;
    }

    .maf-detail-loader {
      border: 1px dashed var(--maf-border);
      border-radius: 10px;
      background: #f8fbff;
      color: var(--maf-muted);
      font-size: 12px;
      padding: 9px;
      text-align: center;
    }

    .maf-detail-loader.hidden {
      display: none;
    }

    .maf-source-hint {
      width: 18px;
      height: 18px;
      border: 1px solid #b8c9e2;
      border-radius: 999px;
      background: #fff;
      color: #355178;
      font-size: 11px;
      font-weight: 800;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: help;
      padding: 0;
    }

    .tippy-box[data-theme~='maf-source'] {
      background: #ffffff;
      color: var(--maf-text);
      border: 1px solid var(--maf-border);
      border-radius: 12px;
      box-shadow: 0 16px 30px rgba(12, 30, 54, 0.2);
      max-width: min(460px, calc(100vw - 24px));
    }

    .tippy-box[data-theme~='maf-source'] .tippy-content {
      padding: 0;
    }

    .maf-source-card {
      display: grid;
      gap: 10px;
      padding: 11px;
    }

    .maf-source-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      border-bottom: 1px solid #e3ecf8;
      padding-bottom: 8px;
    }

    .maf-source-title {
      margin: 0;
      font-size: 13px;
      line-height: 1.2;
      color: var(--maf-text);
      font-weight: 780;
    }

    .maf-source-sub {
      margin: 2px 0 0;
      font-size: 11px;
      color: var(--maf-muted);
    }

    .maf-source-chip {
      border: 1px solid #dce8f7;
      border-radius: 999px;
      padding: 2px 8px;
      font-size: 10px;
      color: #355178;
      background: #f8fbff;
      white-space: nowrap;
      font-weight: 700;
    }

    .maf-source-section {
      border: 1px solid #e3ecf8;
      border-radius: 8px;
      background: #f9fbff;
      padding: 8px;
      display: grid;
      gap: 6px;
    }

    .maf-source-label {
      margin: 0;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: #5f7696;
      font-weight: 760;
    }

    .maf-source-text {
      margin: 0;
      font-size: 12px;
      line-height: 1.35;
      color: #203753;
    }

    .maf-source-note {
      color: #5a6f8c;
    }

    .maf-source-points {
      display: grid;
      gap: 6px;
    }

    .maf-source-point {
      border: 1px solid #dce8f7;
      border-radius: 8px;
      background: #fff;
      padding: 7px 8px;
      display: grid;
      gap: 3px;
    }

    .maf-source-point-label {
      color: #6b829f;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      font-weight: 760;
    }

    .maf-source-point-value {
      color: #203753;
      font-size: 12px;
      line-height: 1.35;
      word-break: break-word;
    }

    .maf-source-windows {
      display: grid;
      gap: 6px;
    }

    .maf-source-window {
      border: 1px solid #dce8f7;
      border-radius: 8px;
      background: #fff;
      padding: 7px;
      display: grid;
      gap: 5px;
    }

    .maf-source-window-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
    }

    .maf-source-window-title {
      margin: 0;
      font-size: 11px;
      color: #355178;
      font-weight: 760;
    }

    .maf-source-window-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
    }

    .maf-source-window-col {
      border: 1px solid #e3ecf8;
      border-radius: 6px;
      padding: 5px 6px;
      background: #fdfefe;
      font-size: 11px;
      color: #294462;
      line-height: 1.3;
    }

    .maf-source-window-col strong {
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: #6b829f;
      font-weight: 760;
    }

    .maf-source-window-metrics {
      font-size: 11px;
      color: #203753;
      line-height: 1.35;
    }

    .maf-source-fold {
      border: 1px dashed #cfddef;
      border-radius: 8px;
      padding: 6px;
      background: #ffffff;
    }

    .maf-source-fold-summary {
      cursor: pointer;
      list-style: none;
      font-size: 11px;
      color: #355178;
      font-weight: 760;
      outline: none;
    }

    .maf-source-fold-summary::-webkit-details-marker {
      display: none;
    }

    .maf-source-fold-summary::before {
      content: ">";
      display: inline-block;
      margin-right: 6px;
      transition: transform .15s ease;
    }

    .maf-source-fold[open] .maf-source-fold-summary::before {
      transform: rotate(90deg);
    }

    @media (max-width: 520px) {
      .maf-source-window-grid {
        grid-template-columns: 1fr;
      }
    }

    .maf-month-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 10px;
    }

    #mafPeriodLabel {
      min-width: 160px;
      text-align: center;
      color: var(--maf-text);
      font-size: 14px;
      font-weight: 760;
      letter-spacing: 0.02em;
    }

    .maf-weekdays,
    .maf-month-grid {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap: 7px;
    }

    .maf-weekdays {
      margin-bottom: 7px;
      color: var(--maf-muted);
      font-size: 10px;
      letter-spacing: 0.07em;
      text-transform: uppercase;
      font-weight: 700;
    }

    .maf-weekdays div {
      text-align: center;
      padding: 4px 0;
    }

    .maf-day-cell {
      border: 1px solid var(--maf-border);
      border-radius: 10px;
      min-height: 72px;
      padding: 7px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      cursor: pointer;
      transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
    }

    .maf-day-cell:hover {
      border-color: #a9c3ea;
      transform: translateY(-1px);
    }

    .maf-day-cell:disabled {
      cursor: default;
    }

    .maf-day-cell.out {
      opacity: 0.4;
      background: #f8fbff;
    }

    .maf-day-cell.locked,
    .maf-day-cell.locked:hover {
      opacity: 0.28;
      transform: none;
      border-color: var(--maf-border);
      cursor: not-allowed;
    }

    .maf-day-cell.sel {
      border-color: var(--maf-accent);
      box-shadow: 0 0 0 2px rgba(15, 98, 222, 0.14);
      background: #f3f8ff;
    }

    .maf-day-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 6px;
    }

    .maf-day-number {
      color: var(--maf-text);
      font-size: 12px;
      font-weight: 720;
    }

    .maf-day-total {
      font-size: 10px;
      color: var(--maf-muted);
      font-weight: 700;
    }

    .maf-dots {
      display: flex;
      gap: 4px;
      flex-wrap: wrap;
      align-items: center;
      min-height: 12px;
    }

    .maf-dot {
      width: 7px;
      height: 7px;
      border-radius: 999px;
    }

    .maf-dot-critical { background: var(--maf-critical); }
    .maf-dot-important { background: var(--maf-important); }
    .maf-dot-info { background: var(--maf-info); }

    .maf-legend {
      margin-top: 10px;
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      font-size: 12px;
      color: var(--maf-muted);
    }

    .maf-legend-item {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .maf-calendar-loader {
      position: absolute;
      inset: 0;
      z-index: 3;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 18px;
      background: rgba(248, 251, 255, 0.74);
      backdrop-filter: blur(4px);
    }

    .maf-calendar-loader.hidden {
      display: none;
    }

    .maf-calendar-loader-card {
      min-width: 220px;
      border: 1px solid #dce8f7;
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.96);
      box-shadow: 0 18px 34px rgba(16, 33, 58, 0.1);
      padding: 14px 16px;
      display: grid;
      justify-items: center;
      gap: 6px;
      text-align: center;
    }

    .maf-calendar-spinner {
      width: 28px;
      height: 28px;
      border: 3px solid #dbe6f3;
      border-top-color: var(--maf-accent);
      border-radius: 999px;
      animation: maf-spin 0.9s linear infinite;
    }

    .maf-calendar-loader-title {
      color: var(--maf-text);
      font-size: 13px;
      font-weight: 760;
      line-height: 1.2;
    }

    .maf-calendar-loader-text {
      color: var(--maf-muted);
      font-size: 12px;
      line-height: 1.35;
    }

    @keyframes maf-spin {
      to {
        transform: rotate(360deg);
      }
    }

    .footer { background: #ffffff; }

    @media (max-width: 1120px) {
      .maf-layout {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 820px) {
      .maf-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .maf-wrap {
        padding: 14px;
        border-radius: 16px;
      }

      .maf-head h1 {
        font-size: 24px;
      }

      .maf-head {
        flex-direction: column;
      }

      .maf-head-actions {
        width: 100%;
        justify-content: space-between;
      }
    }

    @media (max-width: 560px) {
      .maf-row {
        grid-template-columns: 1fr;
      }

      .maf-row-badge {
        text-align: left;
      }
    }

.compare-stats-modal-content {
  max-width: 900px !important;
  top: 30%;
}

.compare-stats-layout {
  display: flex;
  width: 100%;
  padding: 0 1.25rem;
  gap: 1rem;
}

.compare-stats-sidebar {
  flex: 0 0 30%;
  max-width: 30%;
  padding-right: 10px !important;
  border-right: 1px solid #f1f1f4;
}

.compare-stats-main {
  flex: 1;
}

.compare-stats-info-block,
.compare-stats-loader {
  display: none;
}

.custom-filter-modal-content {
  max-width: 800px !important;
}

.custom-filter-card {
  border: none !important;
  box-shadow: none !important;
}

.custom-filter-card-deadness {
  background-color: rgba(238, 35, 35, 0.055);
}

.custom-filter-card-competition {
  background-color: rgba(231, 247, 9, 0.103);
}

.custom-filter-card-potential {
  background-color: rgba(0, 122, 10, 0.068);
}

.custom-filter-card-concentration {
  background-color: rgb(245 250 255);
}

.custom-filter-note {
  margin-top: 5px;
}

.custom-filter-number-input {
  height: 30px;
  margin-top: 10px;
  margin-bottom: 10px;
}

