/* =========================================================================
   4.social – Mac-Ansicht (Fenster mit Seitenleiste)
   ========================================================================= */

.mac-stage { position: relative; z-index: 1; }
.mac-window {
  position: relative; overflow: hidden;
  width: min(1240px, calc(100vw - 48px)); height: min(800px, calc(100vh - 110px)); margin-top: 30px;
  display: flex; flex-direction: column; border-radius: 16px;
  background: rgba(16, 16, 24, .72); -webkit-backdrop-filter: blur(40px) saturate(160%); backdrop-filter: blur(40px) saturate(160%);
  box-shadow: 0 40px 120px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.14), inset 0 1px 0 rgba(255,255,255,.22);
}

/* title bar */
.mac-titlebar { height: 56px; flex: none; display: flex; align-items: center; gap: 16px; padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.lights { display: flex; gap: 8px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.mac-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; width: 168px; }
.mac-brand .mark { height: 22px; }
.mac-search { flex: 1; max-width: 520px; height: 34px; border-radius: 17px; display: flex; align-items: center; gap: 8px; padding: 0 12px; box-shadow: none; }
.mac-search svg { width: 16px; height: 16px; fill: none; stroke: var(--text-3); stroke-width: 2; flex: none; }
.mac-search input { flex: 1; background: none; border: 0; outline: none; font-size: 14px; }
.mac-search input::placeholder { color: var(--text-3); }
.demo-btn { margin-left: auto; height: 34px; font-size: 13px; }
.demo-btn svg { width: 16px; height: 16px; }

.mac-body { flex: 1; display: flex; min-height: 0; }

/* sidebar */
.mac-sidebar { width: 248px; flex: none; overflow-y: auto; padding: 10px 10px 20px; border-right: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); scrollbar-width: thin; }
.sb-section { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 16px 10px 6px; }
.sb-section:first-child { margin-top: 6px; }
.sb-add { width: 22px; height: 22px; border-radius: 6px; font-size: 16px; line-height: 1; color: var(--text-2); }
.sb-add:hover { background: rgba(255,255,255,.1); }
.sb-item { width: 100%; display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 10px; border-radius: 8px; font-size: 13.5px; color: var(--text-2); text-align: left; }
.sb-item:hover { background: rgba(255,255,255,.06); }
.sb-item.active { background: rgba(255,255,255,.14); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.sb-icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.sb-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-count { font-size: 12px; color: var(--text-3); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; margin: 0 3px; }
.dot.online { background: #30d158; box-shadow: 0 0 8px rgba(48,209,88,.7); }
.dot.offline { background: #ff9f0a; box-shadow: 0 0 8px rgba(255,159,10,.7); }
.dot.missing { background: #ff453a; box-shadow: 0 0 8px rgba(255,69,58,.7); }
.dot.hook { background: #ff3d9a; box-shadow: 0 0 8px rgba(255,61,154,.7); }

/* main */
.mac-main { flex: 1; overflow-y: auto; padding: 22px 26px 30px; min-width: 0; scrollbar-width: thin; }
.mac-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.mac-head h2 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.mac-head p { margin: 4px 0 0; color: var(--text-2); font-size: 14px; }
.mac-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.mac-actions .btn svg, .mac-head .btn svg { width: 16px; height: 16px; }
.mac-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; font-size: 13.5px; color: var(--text-2); }
.mac-banner b { color: var(--text); }
.mac-banner > div { flex: 1; }
.mac-banner.warn { background: rgba(255,159,10,.12); box-shadow: inset 0 0 0 1px rgba(255,159,10,.35); }
.mac-banner.danger { background: rgba(255,69,58,.12); box-shadow: inset 0 0 0 1px rgba(255,69,58,.35); }
.mac-banner.info { background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.mac-meta-row { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--text-3); margin-bottom: 12px; }
.mac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 16px 12px; }
.mac-clip .tile { border-radius: 12px; }
.mac-clip-info { padding: 7px 2px 0; display: flex; flex-direction: column; gap: 1px; }
.mac-clip-info b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mac-clip-info span { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* project */
.mac-project { display: flex; gap: 28px; align-items: flex-start; }
.mac-preview-col { flex: none; width: 280px; }
#mac-preview { width: 280px; }
.mac-story { flex: 1; min-width: 0; }
.story-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.story-row { display: flex; align-items: center; gap: 14px; padding: 8px 12px 8px 8px; border-radius: 14px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.story-row.playing { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.7); }
.story-row .tile { width: 44px; flex: none; border-radius: 8px; }
.story-info { flex: 1; min-width: 0; }
.story-info .head { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); margin-bottom: 3px; white-space: nowrap; overflow: hidden; }
.story-info input { width: 100%; background: none; border: 0; outline: none; font-size: 15px; font-weight: 600; }
.story-info input::placeholder { color: var(--text-3); font-weight: 500; }

/* modal */
.mac-modal-backdrop { position: absolute; z-index: 30; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); animation: fade .2s; }
.mac-modal { width: min(440px, 90%); max-height: 88%; overflow-y: auto; border-radius: 20px; padding: 24px; background: rgba(34,34,46,.86); animation: pop .25s cubic-bezier(.2, 1.2, .4, 1); }
.mac-modal.wide { width: min(620px, 92%); padding: 20px 24px 24px; }
.mac-modal h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.01em; }
.mac-modal .sub { margin: 0 0 12px; color: var(--text-2); font-size: 14px; }
.mac-modal .pills.scroll { margin: 0; padding: 0; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.modal-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 12px; background: rgba(255,255,255,.1); }
.modal-icon svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 1.7; }
.modal-icon.ok { background: rgba(48,209,88,.2); }
.modal-icon.warn { background: rgba(255,159,10,.2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.folder-list { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.05); font-size: 14px; }
.folder-list label { display: flex; gap: 10px; align-items: center; }
.folder-list input { accent-color: #8b6cff; width: 16px; height: 16px; }
.dropzone { border: 1.5px dashed rgba(255,255,255,.3); border-radius: 14px; padding: 34px; text-align: center; color: var(--text-3); }
.mac-progress { height: 8px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 14px; }
.mac-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 2s linear; }

.mac-window .toast { top: 70px; }
.mac-window .ai-steps { border-radius: 16px; }

/* music */
.mac-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mac-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,.1); }
.mac-table td { padding: 10px; border-bottom: 1px solid rgba(255,255,255,.06); vertical-align: top; }
.mac-table td span:not(.lic) { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.mac-table td.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--text-2); }
.mac-table tr:hover td { background: rgba(255,255,255,.03); }
.mac-music { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 4px 10px 4px 4px; border-radius: 16px; background: rgba(255,255,255,.05); }
.mac-music .track { flex: 1; background: none; }
.mac-subs { max-width: 560px; }
.mac-modal .tracks { max-height: 60vh; overflow-y: auto; }
