.ma-screen {
  --ma-ink: #25212c;
  --ma-muted: #686373;
  --ma-stroke: #e2dfea;
  --ma-soft: #eee9f8;
  --ma-accent: #594283;
  color: var(--ma-ink);
  font-size: 1rem;
  line-height: 1.5;
}
.ma-screen *, .ma-screen *::before, .ma-screen *::after { box-sizing: border-box; }
.ma-screen [hidden] { display: none !important; }
.ma-screen :where(h1,h2,h3,p,ul,dl,dd) { margin: 0; }
.ma-screen :where(input,textarea,select,button) { font: inherit; }
.ma-screen a:focus-visible, .ma-screen button:focus-visible, .ma-screen input:focus-visible, .ma-screen select:focus-visible, .ma-screen textarea:focus-visible, .ma-screen summary:focus-visible { outline: 3px solid #9277cb; outline-offset: 3px; }
.ma-wrap { max-width: 1120px; margin-inline: auto; padding: clamp(24px,4vw,52px) clamp(16px,4vw,40px) 80px; }
.ma-heading, .ma-toolbar, .ma-section-head, .ma-dialog-head, .ma-review-bar, .ma-access { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ma-heading { margin-bottom: 26px; flex-wrap: wrap; }
.ma-heading h1 { font-size: clamp(2rem,4vw,2.6rem); line-height: 1.13; letter-spacing: -.045em; font-weight: 680; }
.ma-heading p, .ma-toolbar p, .ma-create-copy p, .ma-empty p, .ma-access p, .ma-retry p { color: var(--ma-muted); margin-top: 5px; overflow-wrap: anywhere; }
.ma-toolbar { margin: 25px 0 18px; flex-wrap: wrap; }
.ma-toolbar h2, .ma-dialog h2, .ma-create-copy h2 { font-size: 1.5rem; line-height: 1.25; letter-spacing: -.035em; font-weight: 650; }
.ma-card, .ma-org-card { background: #fff; border: 1px solid var(--ma-stroke); border-radius: 14px; box-shadow: 0 3px 12px #35244204; }
.ma-stack { display: grid; gap: 18px; }
.ma-section-head { padding: 19px 22px; justify-content: flex-start; gap: 9px; border-bottom: 1px solid var(--ma-stroke); }
.ma-section-head h2, .ma-org-card h2 { font-size: 1.08rem; line-height: 1.35; font-weight: 650; letter-spacing: -.018em; }
.ma-count { color: #625473; background: #f3f0f7; border-radius: 6px; padding: 2px 7px; font-size: .8rem; font-weight: 600; }
.ma-icon { width: 19px; height: 19px; flex: 0 0 auto; }
.ma-iconbox,.ma-avatar { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; color: var(--ma-accent); background: var(--ma-soft); flex: 0 0 auto; }
.ma-avatar { border-radius: 50%; font-weight: 650; }
.ma-btn, a.ma-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; min-height: 41px; padding: 9px 14px; border: 1px solid #dcd8e4; border-radius: 8px; background: #fff; color: #322c3d; font-weight: 600; font-size: .9rem; line-height: 1.4; text-decoration: none; transition: background-color .15s, border-color .15s; }
.ma-btn:hover { background: #f6f3fa; border-color: #c0b5d0; }
.ma-btn.ma-primary { background: #28242e; color: #fff; border-color: #28242e; }
.ma-btn.ma-primary:hover { background: #433a50; }
.ma-btn.ma-danger { color: #943953; }
.ma-btn.ma-danger:hover { background: #fff4f5; border-color: #dcb1bb; }
.ma-btn:disabled { opacity: .55; cursor: wait; }
.ma-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--ma-stroke); padding-bottom: 10px; }
.ma-tabs a { display: inline-flex; align-items: center; min-height: 40px; color: #5a5366; font-size: .91rem; font-weight: 550; text-decoration: none; border-radius: 7px; padding: 8px 13px; }
.ma-tabs a:hover { background: #f2edf8; }
.ma-tabs a.active { background: #ebe5f6; color: #54407b; }
.ma-empty { display: flex; align-items: center; padding: 28px 22px; gap: 15px; }
.ma-empty h3 { font-size: 1rem; }
.ma-empty p, .ma-person small, .ma-create-copy p, .ma-access p, .ma-toolbar p, .ma-request p, .ma-inset, .ma-form .ma-help { font-size: .94rem; }
.ma-org-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,265px),1fr)); gap: 16px; }
.ma-org-card { display: flex; gap: 15px; align-items: center; padding: 23px; color: var(--ma-ink); overflow-wrap: anywhere; text-decoration: none; }
.ma-org-card:hover { border-color: #afa1c7; background: #fbf9fe; }
.ma-org-card p { color: var(--ma-muted); font-size: .9rem; }
.ma-create-card { position: relative; display: grid; grid-template-columns: 62px minmax(0,1fr); gap: 20px; max-width: 680px; padding: clamp(22px,5vw,36px); background: linear-gradient(115deg, #fff 76%, #faf7ff); }
.ma-create-card .ma-create-icon { width: 58px; height: 58px; border-radius: 14px; }
.ma-create-icon .ma-icon { width: 27px; height: 27px; }
.ma-create-card .ma-form { grid-column: 2; }
.ma-create-card .ma-form-actions { justify-content: flex-start; }
.ma-back { display: inline-flex; margin-bottom: 18px; color: var(--ma-accent); font-size: .9rem; font-weight: 580; text-decoration: underline; text-underline-offset: 3px; }
.ma-list { list-style: none; padding: 0; }
.ma-list-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; padding: 15px 22px; }
.ma-list-row + .ma-list-row { border-top: 1px solid #ece8f1; }
.ma-list-row strong, .ma-resource-link { font-size: .98rem; font-weight: 640; color: var(--ma-ink); }
.ma-list-row small { display: block; color: var(--ma-muted); margin-top: 2px; font-size: .86rem; }
.ma-list-row :where(strong,small,p,a), .ma-heading h1,.ma-org-card h2 { overflow-wrap: anywhere; }
.ma-person { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; }
a.ma-person:hover strong, .ma-resource-link:hover { color: var(--ma-accent); text-decoration: underline; text-underline-offset: 3px; }
.ma-resource-link { text-decoration: underline; text-underline-offset: 3px; }
.ma-badge { display: inline-flex; white-space: nowrap; align-items: center; border-radius: 6px; padding: 4px 8px; color: #5e5965; background: #efedf3; font-size: .8rem; font-weight: 600; }
.ma-badge.purple { color: #5e408a; background: #eee7f9; }.ma-badge.green { color: #256448; background: #e8f5ed; }.ma-badge.amber { color: #815b20; background: #fff2d6; }
.ma-search { display: flex; align-items: center; gap: 9px; width: min(100%,420px); margin-bottom: 18px; border: 1px solid var(--ma-stroke); border-radius: 8px; background: #fff; padding: 0 12px; color:var(--ma-muted); }
.ma-search input { width: 100%; min-height: 44px; border: 0; background: transparent; color: var(--ma-ink); }
.ma-search:focus-within { outline: 2px solid #9075ba; outline-offset: 2px; }.ma-search input:focus-visible { outline: none; }
.ma-dialog { color: var(--ma-ink); border: 1px solid var(--ma-stroke); border-radius: 16px; width: min(480px, calc(100% - 28px)); max-height: calc(100dvh - 32px); padding: 24px; box-shadow: 0 24px 100px #1d162c35; }
.ma-dialog::backdrop { background: #251f324d; }
.ma-dialog-head { margin-bottom: 20px; align-items: flex-start; }
.ma-dialog h2 { font-size: 1.35rem; }
.ma-icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; margin: -3px -4px 0 0; border-radius: 8px; border: 0; background: none; color: var(--ma-muted); cursor: pointer; }
.ma-icon-btn:hover { background: #f1edf7; }
.ma-form { display: grid; gap: 15px; }
.ma-field { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; color: #3d3746; }
.ma-field small { font-weight: 400; color: var(--ma-muted); }
.ma-field :is(input,select,textarea) { width: 100%; margin: 0; min-height: 44px; padding: 10px 12px; border: 1px solid #d5d0dc; border-radius: 8px; background: #fff; color: var(--ma-ink); font-size: 1rem; font-weight: 400; }
.ma-field textarea { resize: vertical; }.ma-field input[readonly] { background:#f8f6fa; }
.ma-field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23655b72' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.7'/%3E%3C/svg%3E"); background-position: right 12px center; background-repeat: no-repeat; padding-right: 36px; }
.ma-form .ma-help { color: var(--ma-muted); }
.ma-form-error { padding: 10px 12px; border-radius: 6px; background: #fff0f2; color: #92354c; font-size: .9rem; }
.ma-form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.ma-review-bar { margin: 0 0 20px; flex-wrap: wrap; }
.ma-review-bar > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ma-review-bar > div span:not(.ma-badge) { color: var(--ma-muted); font-size: .9rem; }
.ma-details { border-bottom: 1px solid #ece9f0; }
.ma-details:last-child { border: 0; }.ma-details summary { padding: 14px 22px; font-size: .98rem; font-weight: 600; cursor: pointer; }
.ma-data { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; padding: 3px 22px 20px; }
.ma-data dt { color: var(--ma-muted); font-size: .9rem; }
.ma-data dd { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .98rem; }
.ma-request + .ma-request { border-top: 1px solid var(--ma-stroke); }
.ma-request .ma-list-row { align-items: flex-start; }
.ma-request .ma-details { padding-bottom: 8px; }.ma-request .ma-details summary { padding-top: 0; }
.ma-request p { color:var(--ma-muted); white-space: pre-wrap; }.ma-inset,.ma-access,.ma-retry { padding: 19px 22px; }
.ma-inset { color: var(--ma-muted); }.ma-retry .ma-btn { margin-top: 14px; }
@media (max-width: 600px) {
  .ma-create-card { grid-template-columns: 1fr; gap: 14px; }.ma-create-card .ma-form { grid-column: 1; }
  .ma-tabs { gap: 2px; }.ma-tabs a { padding: 7px 9px; min-height: 42px; }
  .ma-list-row { flex-wrap: wrap; padding: 14px 16px; gap: 10px; }.ma-section-head,.ma-access,.ma-retry,.ma-inset { padding: 16px; }.ma-person { flex: 1 1 200px; }
  .ma-data { grid-template-columns: 1fr; padding-inline: 16px; }.ma-details summary { padding-inline: 16px; }.ma-empty { align-items: flex-start; padding: 20px 16px; }
  .ma-access { flex-wrap: wrap; }.ma-dialog { padding: 20px; }.ma-btn { min-height: 44px; }
}
.workspace-content .ma-wrap { padding: 0; }
.ma-request-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ma-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }.ma-filters .ma-search { margin: 0; flex: 1 1 240px; }.ma-filters .ma-field { flex: 0 1 auto; }
.brand-logo { padding: 22px; background: white; border-radius: 14px; border: 1px solid #e2dfea; }
.brand-logo h2 { margin: 0 0 16px; font-size: 1.1rem; }.brand-logo-content,.brand-logo-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.brand-logo-preview { height:80px; width:112px; padding:6px; display:grid; place-items:center; border:1px solid #e2dfea; border-radius:8px; }.brand-logo-preview img { max-width:100%; max-height:68px; object-fit:contain; }
.brand-logo-controls { flex:1 1 200px; min-width:0; }.brand-logo-controls label { display:grid; gap:6px; font-size:.93rem; font-weight:600; }.brand-logo-controls input { min-width:0; width:100%; font-size:.95rem; }
.brand-logo-controls p { margin:5px 0; color:#655f6c; font-size:.91rem; }.brand-logo-actions { margin-top:10px; }.brand-logo-actions:has(> [hidden]:first-child + [hidden]:last-child) { display:none; }
.brand-logo-actions button { cursor:pointer; background:#fff; border:1px solid #dcd8e4; border-radius:8px; min-height:41px; padding:7px 12px; font-weight:600; }.brand-logo-actions [data-save] { background:#28242e; color:white; }.brand-logo-controls [data-error] { color:#933e54; }
.ma-resource-detail { color:var(--ma-muted); white-space:pre-wrap; font-size:.94rem; margin-top:4px; }.ma-row-actions { display:flex; flex-wrap:wrap; gap:6px; }
