/* Shared premium shell for secondary app pages. */
.shell-page { background: #f6f8fc; }
.shell-page .top { display: none !important; }
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.shell-sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: radial-gradient(circle at 0% 0%, rgba(79,70,229,.18), transparent 42%), #0b1120; color: #cbd5e1; display: flex; flex-direction: column; padding: 18px 14px; z-index: 40; }
.shell-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: -.02em; }
.shell-brand__mark { width: 30px; height: 30px; border-radius: 9px; background: #4f46e5; display: grid; place-items: center; font-size: 13px; }
.shell-ws { display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid rgba(148,163,184,.18); border-radius: 12px; background: rgba(148,163,184,.06); margin-bottom: 18px; }
.shell-ws__avatar { width: 30px; height: 30px; border-radius: 8px; background: #4f46e5; color: #fff; display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.shell-ws__meta { min-width: 0; }
.shell-ws__meta strong { display: block; color: #f8fafc; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shell-ws__meta span { display: block; color: #94a3b8; font-size: 10px; margin-top: 2px; }
.shell-nav { display: flex; flex-direction: column; gap: 3px; margin-top: 24px; }
.shell-nav__label { margin: 0 10px 7px; color: #58687e; font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; } .shell-nav a + .shell-nav__label { margin-top: 18px; }
.shell-nav a { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; color: #aebccf; font-size: 12.5px; font-weight: 500; line-height: 1.3; text-decoration: none; }
.shell-nav a:hover { background: rgba(148,163,184,.1); color: #fff; }
.shell-nav a.is-active { position: relative; background: rgba(99,102,241,.22); border: 1px solid rgba(129,140,248,.45); color: #fff; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(129,140,248,.12); } .shell-nav a.is-active::before { content: ''; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: #818cf8; } .shell-nav a.is-active svg { color: #c7d2fe; }
.shell-nav svg { width: 16px; height: 16px; color: #76879c; }
.shell-side__foot { margin-top: auto; border-top: 1px solid rgba(148,163,184,.14); padding: 14px 6px 2px; display: flex; align-items: center; gap: 9px; }
.shell-side__avatar { width: 30px; height: 30px; border-radius: 50%; background: #334155; color: #fff; display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.shell-side__meta { min-width: 0; } .shell-side__meta strong { display: block; color: #f8fafc; font-size: 11px; } .shell-side__meta span { display: block; color: #94a3b8; font-size: 10px; overflow: hidden; text-overflow: ellipsis; }
.shell-main { min-width: 0; }
.shell-top { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 30px; background: rgba(255,255,255,.86); backdrop-filter: blur(10px); border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; z-index: 30; }
.shell-crumbs { display: flex; align-items: center; gap: 8px; color: #64748b; font-size: 12px; } .shell-crumbs strong { color: #0f172a; }
.shell-top__right { display: flex; align-items: center; gap: 10px; }
.shell-plan { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; background: #eef2ff; color: #4338ca; font-size: 10px; font-weight: 700; text-transform: capitalize; }
.shell-menu { display: none; width: 34px; height: 34px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; color: #0f172a; align-items: center; justify-content: center; }
.shell-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 35; }
.shell-content { padding: 30px 30px 64px; }
.shell-content .wrap { max-width: 1100px !important; margin: 0 auto !important; padding: 0 !important; }
.shell-content h1 { font-size: 32px !important; line-height: 1.15; letter-spacing: -.04em; margin: 4px 0 6px; color: #0f172a; }
.shell-content .eyebrow { color: #4f46e5 !important; font-size: 10px !important; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; margin: 0; }
.shell-content .muted { color: #64748b; }
.shell-content .panel { border: 1px solid #e2e8f0 !important; border-radius: 16px !important; background: #fff !important; box-shadow: 0 1px 2px rgba(15,23,42,.04) !important; padding: 22px !important; margin-top: 16px !important; }
.shell-content .panel h2 { letter-spacing: -.02em; color: #0f172a; }
.shell-content .item { border: 1px solid #e2e8f0 !important; background: #fff !important; border-radius: 12px !important; padding: 13px 14px !important; }
.shell-content .item:hover { border-color: #c7d2fe !important; }
.shell-content input, .shell-content select, .shell-content textarea { border: 1px solid #dbe3ef !important; border-radius: 9px !important; background: #fff !important; color: #0f172a; font-size: 13px !important; padding: 9px 11px !important; }
.shell-content input:focus, .shell-content select:focus, .shell-content textarea:focus, .shell-content a:focus-visible, .shell-content button:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }
.shell-content .legal-footer { border-top: 1px solid #e2e8f0; padding-top: 14px; margin-top: 32px !important; }
.shell-content .legal-footer a { color: #64748b; text-decoration: none; }
.shell-mobile-title { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0,1fr); }
  .shell-sidebar { position: fixed; left: 0; top: 0; width: 264px; transform: translateX(-102%); transition: transform .2s ease; }
  .shell.is-open .shell-sidebar { transform: translateX(0); }
  .shell.is-open .shell-overlay { display: block; }
  .shell-menu { display: inline-flex; }
  .shell-top { padding: 0 16px; height: 58px; }
  .shell-content { padding: 20px 14px 48px; }
  .shell-content h1 { font-size: 27px !important; }
  .shell-content .stats-grid, .shell-content .plans { grid-template-columns: 1fr !important; }
  .shell-content .dashboard-grid { grid-template-columns: 1fr !important; }
  .shell-content table { min-width: 640px; }
  .shell-content .table-wrap, .shell-content [style*="overflow:auto"] { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Approvals */
.approval-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; flex-wrap:wrap; }
.approval-counts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:18px; }
.approval-count { padding:14px 16px; border:1px solid #e2e8f0; border-radius:14px; background:#fff; }
.approval-count strong { display:block; font-size:24px; letter-spacing:-.04em; color:#0f172a; }
.approval-count span { font-size:11px; color:#64748b; }
.approval-toolbar { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.approval-toolbar h2 { margin:0; font-size:15px; } .approval-toolbar select { max-width:160px; }
.approval-list { display:grid; gap:8px; }
.approval { border:1px solid #e2e8f0; border-radius:12px; background:#fff; overflow:hidden; }
.approval summary { list-style:none; display:flex; align-items:center; gap:12px; padding:13px 14px; cursor:pointer; user-select:none; }
.approval summary::-webkit-details-marker { display:none; } .approval summary:hover { background:#f8fafc; }
.approval__dot { width:8px; height:8px; border-radius:50%; background:#f59e0b; flex:none; }
.approval__dot.approved { background:#10b981; } .approval__dot.rejected { background:#ef4444; }
.approval__main { min-width:0; flex:1; } .approval__title { font-size:13px; font-weight:600; color:#0f172a; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.approval__meta { font-size:11px; color:#64748b; margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.approval__badge { font-size:10px; font-weight:700; text-transform:capitalize; padding:3px 8px; border-radius:999px; background:#f1f5f9; color:#475569; flex:none; }
.approval__badge.pending { background:#fffbeb; color:#b45309; } .approval__badge.approved { background:#ecfdf5; color:#047857; } .approval__badge.rejected { background:#fef2f2; color:#b91c1c; }
.approval__chevron { color:#94a3b8; font-size:12px; transition:transform .15s; } .approval[open] .approval__chevron { transform:rotate(180deg); }
.approval__body { padding:0 16px 16px; border-top:1px solid #f1f5f9; }
.approval__context { display:flex; gap:14px; flex-wrap:wrap; font-size:11px; color:#64748b; margin-top:12px; }
.approval__preview { margin:12px 0; padding:13px; border-radius:10px; background:#f8fafc; border:1px solid #eef2f7; white-space:pre-wrap; font-size:12.5px; line-height:1.7; color:#334155; }
.approval__actions { display:flex; gap:8px; flex-wrap:wrap; }
.approval-empty { padding:28px; text-align:center; color:#64748b; font-size:13px; border:1px dashed #cbd5e1; border-radius:12px; }
/* Templates */
.tpl-layout { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr); gap:16px; align-items:start; }
.tpl-form { display:grid; gap:10px; } .tpl-form label { display:grid; gap:5px; font-size:11px; font-weight:600; color:#475569; }
.tpl-form .two { display:grid; grid-template-columns:1fr 1fr; gap:10px; } .tpl-form textarea { min-height:150px; resize:vertical; }
.tpl-form .actions { display:flex; justify-content:flex-end; gap:8px; margin-top:2px; }
.tpl-list { display:grid; gap:9px; margin-top:12px; } .tpl-card { padding:14px; border:1px solid #e2e8f0; border-radius:12px; background:#fff; }
.tpl-card h3 { font-size:13px; margin:0; color:#0f172a; } .tpl-card__meta { font-size:11px; color:#64748b; margin-top:3px; }
.tpl-card__subject { margin-top:8px; font-size:12px; color:#334155; background:#f8fafc; border:1px solid #eef2f7; border-radius:8px; padding:8px 10px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tpl-card__actions { display:flex; gap:6px; margin-top:10px; } .starter-list { display:grid; gap:7px; margin-top:12px; }
.starter { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:10px 12px; border:1px solid #e2e8f0; border-radius:10px; background:#f8fafc; font-size:12px; }
.tpl-empty { padding:24px; text-align:center; border:1px dashed #cbd5e1; border-radius:12px; color:#64748b; font-size:12px; }
/* Billing + project/inbox generic */
.shell-content .plans { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:16px; }
.shell-content .plan { padding:16px; border:1px solid #e2e8f0; border-radius:14px; background:#f8fafc; }
.shell-content .plan h3 { font-size:15px; margin:0; } .shell-content .price { font-size:26px; font-weight:700; letter-spacing:-.03em; margin-top:8px; }
.shell-content .list { display:grid; gap:8px; margin-top:12px; } .shell-content .item strong { font-size:13px; }
.shell-content .row { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:8px; }
.shell-content table { width:100%; border-collapse:collapse; } .shell-content th, .shell-content td { padding:8px; border-bottom:1px solid #e2e8f0; text-align:left; font-size:12px; }
@media(max-width:900px){ .tpl-layout { grid-template-columns:1fr; } .tpl-form .two { grid-template-columns:1fr; } .shell-content .plans { grid-template-columns:1fr; } }
@media(max-width:640px){ .approval-counts { grid-template-columns:1fr 1fr; } .approval-count strong { font-size:20px; } .approval__title { white-space:normal; } .approval__meta { white-space:normal; } }

.shell-content .settings-page { max-width:none !important; margin:0 !important; padding:0 !important; }
.shell-content .item { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.shell-content .item > div:first-child { min-width:0; }
.shell-content .item-meta { display:block; color:#64748b; font-size:11px; margin-top:3px; }
.shell-content .settings-page .settings-card, .shell-content .settings-page .settings-section { max-width:none !important; }

.shell-collapse { display:none; width:30px; height:30px; border:1px solid #e2e8f0; border-radius:8px; background:#fff; color:#475569; align-items:center; justify-content:center; font-size:15px; line-height:1; }
.shell-collapse:hover { background:#f8fafc; color:#0f172a; }
@media(min-width:901px){
  .shell-collapse { display:inline-flex; }
  .shell { transition: grid-template-columns 200ms ease; }
  .shell-sidebar { transition: transform 200ms ease, visibility 0s linear 0s; }
  .shell.is-collapsed { grid-template-columns: 0 minmax(0,1fr); }
  .shell.is-collapsed .shell-sidebar { transform: translateX(-100%); visibility: hidden; }
}

.shell-page .settings-top { display:none !important; }

/* App primitives */
.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap;margin-bottom:18px}
.page-sub{color:#64748b;font-size:13px;margin-top:4px;line-height:1.5}
.title-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.crumb-row{display:flex;align-items:center;gap:7px;font-size:11px;color:#94a3b8;margin-bottom:14px}.crumb-row strong{color:#64748b;font-weight:600}.crumb-link{border:0;background:none;color:#4f46e5;font:inherit;font-size:11px;font-weight:600;cursor:pointer;padding:0}.crumb-link:hover{text-decoration:underline}
.head-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.card{border:1px solid #e2e8f0;border-radius:14px;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.04);margin-top:16px;overflow:hidden}
.card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;padding:15px 18px;border-bottom:1px solid #eef2f7;flex-wrap:wrap}.card-head h2{font-size:16px;margin:0;letter-spacing:-.01em}.card-head p{font-size:11.5px;color:#64748b;margin-top:3px}.card-body{padding:16px 18px}.card-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:11px 18px;border-top:1px solid #eef2f7;background:#fbfcfe;flex-wrap:wrap}
.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:16px}.stat-grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}
.stat{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:14px 16px}.stat strong{display:block;font-size:22px;letter-spacing:-.03em;color:#0f172a}.stat span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#64748b;margin-top:3px}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px}.two-col .card{margin-top:0}
.project-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.project-card{display:flex;flex-direction:column;gap:10px;padding:15px;border:1px solid #e2e8f0;border-radius:12px;background:#fff;color:inherit;text-decoration:none}.project-card:hover{border-color:#c7d2fe;box-shadow:0 8px 20px -18px rgba(15,23,42,.4)}.project-card h3{font-size:14px;margin:0}.project-card p{font-size:11.5px;color:#64748b;line-height:1.5;margin-top:3px}.project-card__meta{display:flex;gap:12px;flex-wrap:wrap;font-size:10.5px;color:#64748b}.project-card__foot{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #eef2f7;padding-top:9px;font-size:10.5px;color:#64748b}.project-card__foot strong{color:#4f46e5}
.toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:11px 18px;border-bottom:1px solid #eef2f7;background:#fbfcfe}.toolbar select{max-width:180px;padding:7px 9px;border:1px solid #dbe3ef;border-radius:8px;font-size:11px;background:#fff}.toolbar .muted{margin-right:auto}
.table-wrap{overflow:auto;-webkit-overflow-scrolling:touch}.data-table{width:100%;border-collapse:collapse;font-size:12px}.data-table th{position:sticky;top:0;background:#fbfcfe;z-index:1;text-align:left;padding:9px 12px;font-size:9.5px;text-transform:uppercase;letter-spacing:.08em;color:#64748b;border-bottom:1px solid #e2e8f0;white-space:nowrap}.data-table td{padding:10px 12px;border-bottom:1px solid #f1f5f9;vertical-align:middle;color:#334155}.data-table tr:last-child td{border-bottom:0}.data-table tr:hover td{background:#fbfcfe}.data-table .cell-main{font-weight:600;color:#0f172a}.data-table .cell-sub{font-size:10.5px;color:#64748b;margin-top:2px}
.steps{display:flex;gap:4px;border-bottom:1px solid #e2e8f0;margin:18px 0 16px;overflow-x:auto;scrollbar-width:none}.steps::-webkit-scrollbar{display:none}.step-tab{display:flex;align-items:center;gap:7px;border:0;background:none;padding:10px 13px;font:inherit;font-size:12px;font-weight:600;color:#64748b;border-bottom:2px solid transparent;white-space:nowrap;cursor:pointer}.step-tab:hover{color:#0f172a}.step-tab.is-active{color:#4f46e5;border-bottom-color:#4f46e5}.step-index{display:grid;place-items:center;width:19px;height:19px;border-radius:50%;background:#f1f5f9;color:#64748b;font-size:10px}.step-tab.is-active .step-index{background:#eef2ff;color:#4338ca}.step-tab .count{background:#f1f5f9;color:#64748b;border-radius:999px;padding:1px 6px;font-size:9.5px}.step-tab.is-active .count{background:#e0e7ff;color:#4338ca}
.sequence-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.sequence-card{border:1px solid #e2e8f0;border-radius:12px;padding:14px;background:#fbfcfe}.sequence-card__top{display:flex;justify-content:space-between;gap:8px;align-items:center}.sequence-card h3{font-size:12px;margin:0}.sequence-card__timing{font-size:10px;color:#64748b}.sequence-card__subject{font-size:12px;font-weight:600;margin-top:10px;color:#0f172a}.sequence-card__body{font-size:11px;color:#64748b;line-height:1.6;margin-top:5px;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.sequence-card__foot{margin-top:10px;font-size:10px;color:#64748b}
.approval-list{display:grid;gap:7px}.approval{border:1px solid #e2e8f0;border-radius:10px;overflow:hidden}.approval summary{display:flex;align-items:center;gap:10px;padding:10px 12px;cursor:pointer;list-style:none}.approval summary::-webkit-details-marker{display:none}.approval__main{min-width:0;flex:1}.approval__title{font-size:12px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.approval__meta{font-size:10.5px;color:#64748b}.approval__body{padding:0 12px 12px;border-top:1px solid #f1f5f9}.approval__preview{padding:10px;border-radius:8px;background:#f8fafc;font-size:11.5px;line-height:1.65;white-space:pre-wrap;margin-top:10px}
.empty-state{padding:34px 18px;text-align:center;border:1px dashed #cbd5e1;border-radius:12px;color:#64748b}.empty-state strong{display:block;color:#0f172a;font-size:13px;margin-bottom:3px}.empty-state p{font-size:11.5px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field{display:grid;gap:5px;font-size:11px;font-weight:600;color:#475569}.field--full{grid-column:1/-1}.field input,.field select,.field textarea{width:100%;padding:9px 11px;border:1px solid #dbe3ef;border-radius:8px;font:inherit;font-size:12.5px;background:#fff;color:#0f172a}.field textarea{resize:vertical}.hint{font-size:10.5px;color:#64748b;line-height:1.6;margin-top:8px}.body-text{font-size:12px;color:#475569;line-height:1.65}
.alert{display:flex;gap:8px;padding:10px 12px;border-radius:9px;font-size:11.5px;line-height:1.5;margin-top:10px}.alert--error{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca}.alert--warn{background:#fffbeb;color:#92400e;border:1px solid #fde68a}.alert--info{background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe}
.modal{border:0;border-radius:16px;padding:0;width:min(720px,calc(100vw - 28px));max-height:90vh;box-shadow:0 30px 70px -20px rgba(15,23,42,.45);background:#fff;color:#0f172a}.modal::backdrop{background:rgba(15,23,42,.5)}.modal--wide{width:min(1080px,calc(100vw - 28px))}.modal--confirm{width:min(560px,calc(100vw - 28px))}.modal-head{display:flex;justify-content:space-between;gap:12px;padding:17px 20px;border-bottom:1px solid #eef2f7}.modal-head h2{font-size:17px;margin:0}.modal-head p{font-size:11.5px;color:#64748b;margin-top:3px}.modal-body{padding:18px 20px;overflow:auto;max-height:65vh}.modal-foot{display:flex;justify-content:flex-end;gap:8px;padding:13px 20px;border-top:1px solid #eef2f7;background:#fbfcfe}.modal-close{width:30px;height:30px;border:1px solid #e2e8f0;border-radius:8px;background:#fff;color:#64748b;font-size:18px;line-height:1;cursor:pointer}
.dropzone{display:grid;place-items:center;gap:3px;padding:18px;border:1px dashed #cbd5e1;border-radius:10px;background:#fbfcfe;margin-bottom:14px;font-size:11px;color:#64748b}.dropzone strong{font-size:12px;color:#0f172a}.dropzone input{font-size:10px;margin-top:5px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:900px){.stat-grid,.stat-grid--3,.two-col,.sequence-grid,.project-grid{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.modal{width:calc(100vw - 20px)}.modal-body{max-height:70vh}.data-table{min-width:720px}.page-head{align-items:flex-start}.steps{margin-left:-14px;margin-right:-14px;padding-left:14px;padding-right:14px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important}}

.project-card__head { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.status-pill--pending { background:#fffbeb; color:#b45309; }
.status-pill--approved, .status-pill--sent, .status-pill--valid, .status-pill--delivered { background:#ecfdf5; color:#047857; }
.status-pill--rejected, .status-pill--failed, .status-pill--bounced, .status-pill--complained, .status-pill--expired { background:#fef2f2; color:#b91c1c; }
.status-pill--draft, .status-pill--queued, .status-pill--active { background:#eef2ff; color:#4338ca; }
.status-pill--archived, .status-pill--cancelled { background:#f1f5f9; color:#64748b; }

.shell-handle { display:none; position:fixed; left:246px; top:50%; transform:translateY(-50%); width:18px; height:58px; border:1px solid rgba(148,163,184,.22); border-left:0; border-radius:0 9px 9px 0; background:#111a2e; color:#cbd5e1; z-index:60; align-items:center; justify-content:center; font-size:16px; cursor:pointer; }
.shell-handle:hover { background:#1e293b; color:#fff; }
.shell-handle:focus-visible { outline:2px solid #818cf8; outline-offset:2px; }
@media(min-width:901px){ .shell-handle { display:flex; } .shell-collapse { display:none !important; } }
.shell.is-collapsed .shell-handle { left:0; border-left:1px solid rgba(148,163,184,.22); border-radius:9px; }
@media(max-height:760px) and (min-width:901px){
  .shell-sidebar { padding:12px 11px; }
  .shell-brand { padding:2px 6px 10px; }
  .shell-ws { padding:8px 9px; margin-bottom:10px; }
  .shell-nav { gap:1px; }
  .shell-nav__label { margin:8px 8px 3px; font-size:8px; }
  .shell-nav a { padding:6px 8px; font-size:12px; }
}

.sequence-card--interactive { cursor:pointer; transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.sequence-card--interactive:hover { border-color:#c7d2fe; box-shadow:0 8px 18px -18px rgba(15,23,42,.45); transform:translateY(-1px); }
.sequence-card--interactive:focus-visible { outline:2px solid #6366f1; outline-offset:2px; }
.sequence-edit { margin-left:auto; padding:4px 8px; font-size:10px; }

.template-mode-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0 12px}.template-mode{text-align:left;border:1px solid #e2e8f0;border-radius:10px;background:#fff;padding:10px 12px;cursor:pointer;color:#475569}.template-mode strong{display:block;font-size:12px;color:#0f172a}.template-mode span{display:block;font-size:10.5px;color:#64748b;margin-top:2px}.template-mode:hover{border-color:#c7d2fe}.template-mode.is-active{border-color:#6366f1;background:#eef2ff;box-shadow:inset 0 0 0 1px #c7d2fe}.template-mode:focus-visible{outline:2px solid #6366f1;outline-offset:2px}.pill--warning{background:#fffbeb;color:#b45309;border:1px solid #fde68a;margin-left:5px;font-size:9px;padding:1px 5px}.starter-section{margin-top:18px}.starter-section .muted{margin-bottom:0}
@media(max-width:640px){.template-mode-row{grid-template-columns:1fr}}

.library-tabs{display:flex;gap:4px;padding:0 18px;border-bottom:1px solid #e2e8f0;background:#fbfcfe}.library-tab{display:flex;align-items:center;gap:6px;border:0;background:none;padding:10px 8px;font:inherit;font-size:11.5px;font-weight:600;color:#64748b;border-bottom:2px solid transparent;cursor:pointer}.library-tab:hover{color:#0f172a}.library-tab.is-active{color:#4f46e5;border-bottom-color:#4f46e5}.library-tab .count{background:#f1f5f9;color:#64748b;border-radius:999px;padding:1px 6px;font-size:9.5px}.library-tab.is-active .count{background:#e0e7ff;color:#4338ca}.library-panel{padding:14px 18px}.library-hint{padding:10px 12px;border:1px solid #dbeafe;border-radius:9px;background:#eff6ff;color:#1d4ed8;font-size:11px;line-height:1.6;margin-bottom:12px}.library-panel .tpl-list{margin-top:0}
.tpl-card__head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.tpl-card__preview{font-size:10.5px;color:#64748b;line-height:1.6;margin-top:6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.starter>div{min-width:0}.starter strong{display:block;font-size:12px;color:#0f172a}.starter span{display:block;font-size:10.5px;color:#64748b;margin-top:2px}
.tpl-empty strong{display:block;font-size:13px;color:#0f172a;margin-bottom:3px}.tpl-empty p{font-size:11.5px}

.btn-danger-ghost { background:transparent; border:1px solid transparent; color:#b91c1c; }
.btn-danger-ghost:hover { background:#fef2f2; border-color:#fecaca; color:#991b1b; }

/* Legal links live on marketing/auth pages; app pages use the shell footer. */
body.shell-page > .legal-footer { display: none; }

.steps--shared{gap:6px;border-bottom:0;padding:3px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;margin:16px 0 18px}.steps--shared .step-tab{border:1px solid transparent;border-radius:7px;padding:8px 11px}.steps--shared .step-tab:hover{background:#fff}.steps--shared .step-tab.is-active{background:#eef2ff;border-color:#c7d2fe;border-bottom-color:#c7d2fe;color:#4338ca}.steps--shared .step-tab.is-active .step-index{background:#4f46e5;color:#fff}.steps--shared .step-tab.is-active .count{background:#e0e7ff;color:#4338ca}

.approval--sent,.approval--approved{border-color:#d1fae5;background:#fbfefc}.approval__header{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;border:0;background:transparent;text-align:left;cursor:pointer}.approval__header:hover{background:#f8fafc}.approval__header:focus-visible{outline:2px solid #6366f1;outline-offset:-2px}.approval__main{min-width:0;flex:1}.approval__title{font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:#64748b}.approval__subject{margin-top:3px;color:#0f172a;font-size:12px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.approval__meta{margin-top:2px;color:#64748b;font-size:10.5px;line-height:1.4}.approval__toggle-text{flex:none;color:#4f46e5;font-size:10.5px;font-weight:700}.approval__badge{flex:none;padding:2px 7px;border-radius:999px;font-size:9px;font-weight:700;text-transform:capitalize;background:#f1f5f9;color:#475569}.approval__badge.pending{background:#fef3c7;color:#92400e}.approval__badge.approved{background:#ecfdf5;color:#047857}.approval__badge.sent{background:#e0e7ff;color:#4338ca}.approval__badge.rejected{background:#fef2f2;color:#b91c1c}.approval__body{border-top:1px solid #f1f5f9;padding:12px}.approval__field{display:grid;gap:4px;margin-top:9px;font-size:10px;font-weight:600;color:#475569}.approval__field input,.approval__field textarea{width:100%;padding:8px 9px;border:1px solid #dbe3ef;border-radius:7px;font:inherit;font-size:12px;color:#0f172a;background:#fff}.approval__subject-readonly{font-size:12px;font-weight:600;color:#0f172a;margin-bottom:6px}.approval__actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:11px}.approval__actions .btn{padding:6px 9px;font-size:10.5px}
@media(max-width:640px){.approval__header{align-items:flex-start;flex-wrap:wrap}.approval__badge{order:3}.approval__toggle-text{margin-left:auto}.approval__subject{white-space:normal}.approval__actions .btn{flex:1 1 auto;justify-content:center}}

.notification-badge{position:absolute;top:-4px;right:-4px;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:#4f46e5;color:#fff;font-size:9px;font-weight:700;display:grid;place-items:center;border:2px solid #fff}

.approval__history{margin-top:12px;padding-top:9px;border-top:1px solid #f1f5f9;font-size:10px;color:#64748b}.approval__history strong{display:block;margin-bottom:4px;color:#334155;font-size:10px;text-transform:uppercase;letter-spacing:.06em}.approval__history-row{padding:2px 0}

.shell-logout{display:grid;place-items:center;width:28px;height:28px;margin-left:auto;border:1px solid rgba(148,163,184,.18);border-radius:7px;background:transparent;color:#94a3b8;cursor:pointer;flex:none}.shell-logout:hover{background:rgba(148,163,184,.1);color:#fff}.shell-logout svg{width:14px;height:14px}

.shell-verify{padding:6px 9px;border:1px solid #dbe3ef;border-radius:7px;color:#334155;font-size:10px;font-weight:600;text-decoration:none}.shell-verify:hover{border-color:#c7d2fe;background:#eef2ff;color:#4338ca}.shell-bell{display:grid;place-items:center;width:30px;height:30px;border:1px solid #e2e8f0;border-radius:8px;color:#64748b;text-decoration:none}.shell-bell:hover{background:#f8fafc;color:#4338ca}.shell-bell svg{width:15px;height:15px}.shell-top__avatar{width:30px;height:30px;border-radius:50%;background:#4f46e5;color:#fff;display:grid;place-items:center;font-size:10px;font-weight:700}

.approval-empty strong{display:block;color:#0f172a;font-size:13px;margin-bottom:3px}.approval-empty p{margin:0 0 10px;font-size:11.5px}.approval-empty__actions{display:flex;gap:7px;justify-content:center;flex-wrap:wrap}

.shell-page > .legal-footer { display: none; }

@media(max-width:700px){.shell-top__right{gap:6px}.shell-plan,.shell-verify{display:none!important}.shell-bell{width:28px;height:28px}.shell-top__avatar{width:28px;height:28px}}

.page-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}

.card-head__tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}.portfolio-filter{padding:6px 9px;border:1px solid #dbe3ef;border-radius:8px;background:#fff;color:#475569;font:inherit;font-size:11px;font-weight:600}

.portfolio-activity{display:grid;gap:2px}.activity-row{display:flex;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid #f1f5f9;font-size:11px;color:#475569}.activity-row:last-child{border-bottom:0}.activity-row time{margin-left:auto;color:#94a3b8;font-size:10px}.activity-dot{width:6px;height:6px;border-radius:999px;background:#a5b4fc;flex:none}

.portfolio-report__summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin-bottom:10px}.portfolio-report__summary>div{padding:8px;border:1px solid #e8eef6;border-radius:8px;background:#fbfcfe}.portfolio-report__summary strong{display:block;font-size:15px;color:#0f172a}.portfolio-report__summary span{display:block;font-size:8px;text-transform:uppercase;letter-spacing:.06em;color:#94a3b8}.portfolio-report__rows{display:grid;gap:2px}.portfolio-report__row{display:grid;grid-template-columns:1.4fr repeat(4,minmax(0,0.7fr));gap:6px;align-items:center;padding:7px 0;border-bottom:1px solid #f1f5f9;font-size:10px;color:#64748b}.portfolio-report__row strong{font-size:11px;color:#334155}.portfolio-report__row:last-child{border-bottom:0}@media(max-width:640px){.portfolio-report__summary{grid-template-columns:repeat(3,minmax(0,1fr))}.portfolio-report__row{grid-template-columns:1.2fr repeat(2,minmax(0,0.8fr))}.portfolio-report__row span:nth-child(4),.portfolio-report__row span:nth-child(5){display:none}}

.hierarchy-strip{display:flex;align-items:center;gap:8px;padding:9px 11px;margin-bottom:14px;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc;overflow-x:auto}
.hierarchy-step{display:flex;align-items:center;gap:7px;flex:none;padding:5px 8px;border:1px solid transparent;border-radius:8px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;transition:background .15s,border-color .15s,opacity .15s}.hierarchy-step:not(:disabled):hover{background:#f1f5f9}.hierarchy-step:disabled{opacity:.5;cursor:not-allowed}.hierarchy-step.is-active{background:#eef2ff;border-color:#c7d2fe}.hierarchy-step.is-active .hierarchy-step__num{background:#4f46e5;color:#fff}.hierarchy-step.is-complete .hierarchy-step__num{background:#ecfdf5;color:#047857}.hierarchy-step.is-complete strong{color:#475569}
.hierarchy-step__num{display:grid;place-items:center;width:20px;height:20px;border-radius:6px;background:#eef2ff;color:#4f46e5;font-size:8px;font-weight:700;letter-spacing:.04em}
.hierarchy-step strong{display:block;font-size:10.5px;color:#334155;line-height:1.2}
.hierarchy-step small{display:block;font-size:8.5px;color:#94a3b8;margin-top:1px;white-space:nowrap}
.hierarchy-arrow{color:#cbd5e1;font-size:12px;flex:none}
.portfolio-add{display:inline-grid;place-items:center;width:29px;height:29px;padding:0;border:1px solid #dbe3ef;border-radius:8px;background:#fff;color:#4f46e5;font-size:17px;font-weight:500;line-height:1;cursor:pointer;transition:border-color .15s,background .15s}
.portfolio-add:hover{border-color:#a5b4fc;background:#eef2ff}
.empty-state__actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:12px}
@media(max-width:640px){.hierarchy-strip{gap:5px;padding:8px 9px}.hierarchy-step small{display:none}.hierarchy-step__num{width:18px;height:18px}.card-head__tools{width:100%;justify-content:flex-start}}

.field__optional{font-size:9px;font-weight:500;text-transform:none;letter-spacing:0;color:#94a3b8}.url-fetch-row{display:flex;gap:7px;align-items:center}.url-fetch-row input{flex:1;min-width:0}.url-fetch-row .btn{flex:none;white-space:nowrap}.hint--ok{color:#047857}.hint--warn{color:#b45309}
