/* =============================================================================
   FIN & LAW — PORTAL REDESIGN STYLESHEET
   Source of truth: project/01 Design System.dc.html (+ 02 Client / 03 Firm shells).
   The shared CSS foundation the client-shell, firm-shell and login wiring prompts
   reuse. Loads AFTER finlaw-main so it overrides the older portal component CSS.

   Rules are ALL scoped under .portal-shell (client + firm dashboards) or
   .portal-wrap / .portal-login-body (login) so nothing leaks to the marketing
   site. Colour is expressed through the theme tokens defined in style.css :root;
   the ampersand red (--amp / #ed1c24) is used ONLY by the .amp glyph.

   Sections:
     1.  Scoped vars
     2.  Typography utilities
     3.  Buttons          (.rd-btn)
     4.  Badges           (.rd-badge)
     5.  Stat cards       (.rd-stat)
     6.  Panels + tables  (.rd-panel / .rd-table)
     7.  Timeline         (.rd-timeline)
     8.  List items       (.rd-doc-item / .rd-appt-item / .rd-msg-item)
     9.  Fields + dropzone(.rd-field / .rd-dropzone)
     10. Empty state      (.rd-empty)
     11. Dropdown + notify-bell (.rd-dropdown / .fl-bell-*)
     12. Shell chrome     (sidebar + topbar)
     13. Login split-screen chrome
     14. Responsive + reduced motion
   ============================================================================= */

/* ---------- 1. SCOPED VARS ------------------------------------------------- */
/* Radii the mockup uses that have no exact style.css token (7px buttons, 14px
   cards). Scoped so they never touch the marketing site. */
.portal-shell,
.portal-wrap,
.portal-login-body{
	--r-btn:7px;
	--r-card:14px;
}

/* =============================================================================
   2. TYPOGRAPHY UTILITIES
   ============================================================================= */
.portal-shell .rd-eyebrow,
.portal-wrap .rd-eyebrow{
	font-size:11.5px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;
	color:var(--red);
}
.portal-shell .rd-eyebrow.on-dark,
.portal-wrap .rd-eyebrow.on-dark{color:#ff6b6f} /* legible red on the navy gradient */

.portal-shell .rd-display,
.portal-wrap .rd-display{
	font-family:'Playfair Display',Georgia,serif;font-weight:800;
	font-size:clamp(32px,4vw,50px);letter-spacing:-.01em;line-height:1.13;
	color:var(--blue-ink);
}
.portal-shell .rd-page-title{
	font-family:'Playfair Display',Georgia,serif;font-weight:700;font-size:28px;
	color:var(--blue-ink);letter-spacing:-.01em;line-height:1.15;
}
.portal-shell .rd-panel-title{
	font-family:'Playfair Display',Georgia,serif;font-weight:700;font-size:17px;
	color:var(--blue-ink);
}
.portal-shell .rd-body{font-size:16.5px;color:var(--ink);line-height:1.6}
.portal-shell .rd-body-sm{font-size:14.5px;color:var(--ink)}
.portal-shell .rd-meta,
.portal-wrap .rd-meta{font-size:13px;color:var(--mid)}

/* =============================================================================
   3. BUTTONS
   ============================================================================= */
.portal-shell .rd-btn,
.portal-wrap .rd-btn{
	display:inline-flex;align-items:center;justify-content:center;gap:8px;
	border:1px solid transparent;border-radius:var(--r-btn);
	padding:13px 26px;font-family:'Inter',system-ui,sans-serif;font-size:14px;
	font-weight:600;line-height:1;cursor:pointer;text-decoration:none;
	transition:all .18s var(--ease);
}
.portal-shell .rd-btn svg,
.portal-wrap .rd-btn svg{width:16px;height:16px;flex-shrink:0}

.portal-shell .rd-btn--primary,
.portal-wrap .rd-btn--primary{background:var(--red);color:#fff;border-color:var(--red)}
.portal-shell .rd-btn--primary:hover,
.portal-wrap .rd-btn--primary:hover{
	background:var(--red-dark);border-color:var(--red-dark);
	transform:translateY(-1px);box-shadow:0 6px 16px rgba(237,28,36,.28);
}

.portal-shell .rd-btn--secondary,
.portal-wrap .rd-btn--secondary{
	background:transparent;color:var(--blue-ink);border-color:var(--hair);
}
.portal-shell .rd-btn--secondary:hover,
.portal-wrap .rd-btn--secondary:hover{border-color:var(--blue);background:var(--blue-pale)}

.portal-shell .rd-btn--ghost,
.portal-wrap .rd-btn--ghost{background:transparent;color:var(--blue-ink);border-color:transparent}
.portal-shell .rd-btn--ghost:hover,
.portal-wrap .rd-btn--ghost:hover{color:var(--red)}

.portal-shell .rd-btn--compact,
.portal-wrap .rd-btn--compact{padding:7px 14px;font-size:13px}

.portal-shell .rd-btn--disabled,
.portal-shell .rd-btn:disabled,
.portal-wrap .rd-btn--disabled,
.portal-wrap .rd-btn:disabled{
	background:var(--grey-100);color:var(--mid);border-color:var(--grey-100);
	cursor:not-allowed;box-shadow:none;transform:none;
}
.portal-shell .rd-btn--disabled:hover,
.portal-shell .rd-btn:disabled:hover,
.portal-wrap .rd-btn--disabled:hover,
.portal-wrap .rd-btn:disabled:hover{background:var(--grey-100);transform:none;box-shadow:none}

/* =============================================================================
   4. BADGES — every status colour is paired with a text label (never colour alone)
   ============================================================================= */
.portal-shell .rd-badge,
.portal-wrap .rd-badge{
	display:inline-flex;align-items:center;gap:5px;
	border-radius:var(--r-pill);padding:3px 10px;font-size:12px;font-weight:600;
	line-height:1.4;white-space:nowrap;
}
.portal-shell .rd-badge--active,
.portal-shell .rd-badge--paid{background:var(--green-bg);color:var(--green)}
.portal-shell .rd-badge--review,
.portal-shell .rd-badge--in-review{background:var(--blue-pale);color:var(--blue)}
.portal-shell .rd-badge--pending,
.portal-shell .rd-badge--needs-review{background:var(--amber-bg);color:var(--amber)}
.portal-shell .rd-badge--archived,
.portal-shell .rd-badge--closed{background:var(--grey-100);color:var(--mid)}
.portal-shell .rd-badge--due{background:#fef2f2;color:var(--red)}       /* pale red tint (no token) */
.portal-shell .rd-badge--overdue{background:#fde8e8;color:var(--red-dark)} /* pale red tint (no token) */

/* The portal templates use the shared style.css `.badge` component, which ships
   UPPERCASE + letter-spacing + a ::before status dot. The Claude-Design portal
   mockups use clean TITLE-CASE pills with no dot (e.g. "Active", "Pending docs").
   Re-skin the shared badge to the mockup — scoped to the portal so the marketing
   site's badges are unaffected. */
.portal-shell .badge{
	text-transform:none;
	letter-spacing:0;
	font-size:12px;
	font-weight:600;
	padding:3px 10px;
	gap:0;
}
.portal-shell .badge::before{display:none;}

/* =============================================================================
   5. STAT CARDS
   ============================================================================= */
.portal-shell .rd-stat{
	position:relative;overflow:hidden;background:#fff;
	border:1px solid var(--hair);border-radius:var(--r-card);box-shadow:var(--sh-1);
	padding:22px;transition:box-shadow .25s var(--ease),transform .25s var(--ease);
}
.portal-shell .rd-stat:hover{box-shadow:var(--sh-2);transform:translateY(-2px)}
.portal-shell .rd-stat__bar{position:absolute;top:0;left:0;right:0;height:3px;background:var(--red)}
.portal-shell .rd-stat__bar--red{background:var(--red)}
.portal-shell .rd-stat__bar--green{background:var(--green)}
.portal-shell .rd-stat__bar--amber{background:var(--amber)}
.portal-shell .rd-stat__bar--blue{background:var(--blue)}
.portal-shell .rd-stat__icon{
	width:32px;height:32px;border-radius:9px;display:flex;align-items:center;
	justify-content:center;margin-bottom:14px;background:var(--red-pale);color:var(--red);
}
.portal-shell .rd-stat__icon svg{width:17px;height:17px}
.portal-shell .rd-stat__icon--green{background:var(--green-bg);color:var(--green)}
.portal-shell .rd-stat__icon--amber{background:var(--amber-bg);color:var(--amber)}
.portal-shell .rd-stat__icon--blue{background:var(--blue-pale);color:var(--blue)}
.portal-shell .rd-stat__num{
	font-family:'Playfair Display',Georgia,serif;font-weight:800;font-size:32px;
	color:var(--blue-ink);line-height:1;font-variant-numeric:tabular-nums;
}
.portal-shell .rd-stat__num--currency{font-size:26px} /* e.g. TZS 8,450,000 */
.portal-shell .rd-stat__label{font-size:13px;font-weight:600;color:var(--ink);margin-top:4px}
.portal-shell .rd-stat__sub{font-size:12.5px;color:var(--mid);margin-top:2px}

.portal-shell .rd-stat-grid{
	display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px;
}

/* =============================================================================
   6. PANELS + DATA TABLE
   ============================================================================= */
.portal-shell .rd-panel{
	background:#fff;border:1px solid var(--hair);border-radius:var(--r-card);
	box-shadow:var(--sh-1);overflow:hidden;
}
.portal-shell .rd-panel__head{
	display:flex;align-items:center;justify-content:space-between;gap:12px;
	padding:18px 22px;border-bottom:1px solid var(--hair);flex-wrap:wrap;
}
.portal-shell .rd-panel__head h2,
.portal-shell .rd-panel__head h3,
.portal-shell .rd-panel__title{
	font-family:'Playfair Display',Georgia,serif;font-size:17px;font-weight:700;
	color:var(--blue-ink);margin:0;
}
.portal-shell .rd-panel__viewall{
	display:inline-flex;align-items:center;gap:4px;font-size:13px;font-weight:600;color:var(--blue);
}
.portal-shell .rd-panel__viewall:hover{color:var(--red)}
.portal-shell .rd-panel__viewall svg{width:13px;height:13px}
.portal-shell .rd-panel__body{padding:22px}

/* Table degrades to horizontal scroll inside this wrapper on narrow screens. */
.portal-shell .rd-table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.portal-shell .rd-table{width:100%;border-collapse:collapse}
.portal-shell .rd-table th{
	text-align:left;font-size:11.5px;font-weight:600;letter-spacing:.06em;
	text-transform:uppercase;color:var(--mid);padding:12px 22px;
	border-bottom:1px solid var(--hair);white-space:nowrap;
}
.portal-shell .rd-table td{
	font-size:14px;color:var(--ink);padding:14px 22px;
	border-bottom:1px solid var(--grey-50);vertical-align:middle;
}
.portal-shell .rd-table tbody tr:last-child td{border-bottom:none}
.portal-shell .rd-table th.rd-num,
.portal-shell .rd-table td.rd-num{text-align:right;font-variant-numeric:tabular-nums}
.portal-shell .rd-table tbody tr{cursor:pointer;transition:background .15s var(--ease)}
.portal-shell .rd-table tbody tr:hover td{background:var(--grey-50)}
.portal-shell .rd-table .rd-cell-title{font-weight:600;color:var(--blue-ink);font-size:14px}
.portal-shell .rd-table .rd-cell-sub{font-size:12px;color:var(--mid);margin-top:2px}

/* =============================================================================
   7. STATUS TIMELINE
   ============================================================================= */
.portal-shell .rd-timeline{position:relative;padding-left:8px}
.portal-shell .rd-timeline__item{position:relative;display:flex;gap:14px;padding-bottom:26px}
.portal-shell .rd-timeline__item::before{
	content:"";position:absolute;left:13px;top:28px;bottom:0;width:2px;background:var(--grey-100);
}
.portal-shell .rd-timeline__item:last-child{padding-bottom:0}
.portal-shell .rd-timeline__item:last-child::before{display:none}
.portal-shell .rd-timeline__node{
	position:relative;z-index:1;flex-shrink:0;width:28px;height:28px;border-radius:50%;
	display:flex;align-items:center;justify-content:center;
	background:var(--grey-100);color:var(--blue-ink);
}
.portal-shell .rd-timeline__node svg{width:13px;height:13px}
.portal-shell .rd-timeline__node--current{background:var(--blue-ink);color:#fff}
.portal-shell .rd-timeline__node--accent{background:var(--gold);color:#fff}
.portal-shell .rd-timeline__title{font-size:14px;font-weight:600;color:var(--ink)}
.portal-shell .rd-timeline__meta{font-size:12px;color:var(--mid);margin-top:2px}

/* =============================================================================
   8. LIST ITEMS — document / appointment / message rows
   ============================================================================= */
/* Document */
.portal-shell .rd-doc-item{
	display:flex;align-items:center;gap:12px;padding:10px;border-radius:10px;
	transition:background .15s var(--ease);
}
.portal-shell .rd-doc-item:hover{background:var(--grey-50)}
.portal-shell .rd-doc-item__icon{
	width:38px;height:38px;border-radius:9px;flex-shrink:0;display:flex;
	align-items:center;justify-content:center;background:var(--blue-pale);color:var(--blue);
}
.portal-shell .rd-doc-item__icon svg{width:17px;height:17px}
.portal-shell .rd-doc-item__body{flex:1;min-width:0}
.portal-shell .rd-doc-item__title{font-size:14px;font-weight:600;color:var(--ink)}
.portal-shell .rd-doc-item__meta{font-size:12px;color:var(--mid);margin-top:2px}
.portal-shell .rd-icon-btn{
	width:32px;height:32px;border-radius:50%;flex-shrink:0;
	border:1px solid var(--hair);background:#fff;color:var(--blue);
	display:flex;align-items:center;justify-content:center;cursor:pointer;
	transition:border-color .2s var(--ease),color .2s var(--ease);
}
.portal-shell .rd-icon-btn svg{width:14px;height:14px}
.portal-shell .rd-icon-btn:hover{border-color:var(--blue);color:var(--red)}

/* Appointment */
.portal-shell .rd-appt-item{
	display:flex;align-items:center;gap:14px;padding:10px;border-radius:10px;
	transition:background .15s var(--ease);
}
.portal-shell .rd-appt-item:hover{background:var(--grey-50)}
.portal-shell .rd-appt-item__date{
	width:52px;height:52px;border-radius:10px;flex-shrink:0;background:var(--blue-pale);
	display:flex;flex-direction:column;align-items:center;justify-content:center;
}
.portal-shell .rd-appt-item__date .day{
	font-family:'Playfair Display',Georgia,serif;font-weight:800;font-size:19px;
	color:var(--blue-ink);line-height:1;
}
.portal-shell .rd-appt-item__date .mon{
	font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--blue);
}
.portal-shell .rd-appt-item__title{font-size:14px;font-weight:600;color:var(--ink)}
.portal-shell .rd-appt-item__meta{font-size:12px;color:var(--mid);margin-top:2px}

/* Message */
.portal-shell .rd-msg-item{
	display:flex;align-items:flex-start;gap:12px;padding:10px;border-radius:10px;
	transition:background .15s var(--ease);
}
.portal-shell .rd-msg-item:hover{background:var(--grey-50)}
.portal-shell .rd-msg-item--unread{background:var(--red-pale)}
.portal-shell .rd-msg-item--unread:hover{background:var(--red-pale)}
.portal-shell .rd-msg-item__avatar{
	width:36px;height:36px;border-radius:50%;flex-shrink:0;background:var(--blue-ink);
	color:#fff;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;
}
.portal-shell .rd-msg-item__body{flex:1;min-width:0}
.portal-shell .rd-msg-item__row{display:flex;justify-content:space-between;gap:8px}
.portal-shell .rd-msg-item__name{font-size:14px;font-weight:700;color:var(--ink)}
.portal-shell .rd-msg-item__time{font-size:12px;color:var(--mid);flex-shrink:0}
.portal-shell .rd-msg-item__preview{
	font-size:13px;color:var(--mid);margin-top:2px;
	white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.portal-shell .rd-msg-item__dot{
	width:7px;height:7px;border-radius:50%;background:var(--red);margin-top:6px;flex-shrink:0;
}

/* =============================================================================
   9. FORM FIELDS + DROPZONE
   ============================================================================= */
.portal-shell .rd-field{display:flex;flex-direction:column;gap:6px;margin-bottom:18px}
.portal-shell .rd-field > label{font-size:13px;font-weight:600;color:var(--blue-ink)}
.portal-shell .rd-field input,
.portal-shell .rd-field select,
.portal-shell .rd-field textarea{
	width:100%;box-sizing:border-box;background:#fff;border:1px solid var(--hair);
	border-radius:var(--r-sm);padding:12px 13px;font-family:inherit;font-size:15px;color:var(--ink);
	transition:border-color .2s var(--ease),box-shadow .2s var(--ease);
}
.portal-shell .rd-field input::placeholder,
.portal-shell .rd-field textarea::placeholder{color:var(--mid);opacity:.7}
.portal-shell .rd-field input:focus,
.portal-shell .rd-field select:focus,
.portal-shell .rd-field textarea:focus{
	outline:none;border-color:var(--blue);box-shadow:0 0 0 3px rgba(38,64,141,.35);
}
/* Auth variant — red focus ring (the login prompt uses this). */
.portal-shell .rd-field--auth input:focus,
.portal-wrap .rd-field--auth input:focus{
	border-color:var(--red);box-shadow:0 0 0 3px rgba(216,31,38,.15);
}

.portal-shell .rd-dropzone{
	border:1.5px dashed var(--hair);border-radius:10px;padding:28px;text-align:center;
	cursor:pointer;transition:background .18s var(--ease),border-color .18s var(--ease);
}
.portal-shell .rd-dropzone:hover{background:var(--blue-pale);border-color:var(--blue)}
.portal-shell .rd-dropzone svg{margin:0 auto 10px;display:block;color:var(--mid)}
.portal-shell .rd-dropzone__title{font-size:14px;font-weight:600;color:var(--ink)}
.portal-shell .rd-dropzone__hint{font-size:12.5px;color:var(--mid);margin-top:4px}

/* =============================================================================
   10. EMPTY STATE
   ============================================================================= */
.portal-shell .rd-empty{
	display:flex;flex-direction:column;align-items:center;text-align:center;padding:48px 28px;
}
.portal-shell .rd-empty__icon{color:var(--mid);margin-bottom:16px}
.portal-shell .rd-empty__icon svg{width:34px;height:34px}
.portal-shell .rd-empty__msg{font-size:15px;color:var(--mid);max-width:340px;margin-bottom:18px}

/* =============================================================================
   11. NOTIFICATION DROPDOWN (.rd-dropdown) + existing notify-bell (.fl-bell-*)
   ============================================================================= */
.portal-shell .rd-dropdown{
	width:340px;max-width:90vw;background:#fff;border:1px solid var(--hair);
	border-radius:12px;box-shadow:var(--sh-3);overflow:hidden;
}
.portal-shell .rd-dropdown__head{
	display:flex;align-items:center;justify-content:space-between;
	padding:14px 18px;border-bottom:1px solid var(--hair);
}
.portal-shell .rd-dropdown__head strong{font-size:14px;font-weight:700;color:var(--blue-ink)}
.portal-shell .rd-dropdown__head a{font-size:12px;font-weight:600;color:var(--blue)}
.portal-shell .rd-dropdown__head a:hover{color:var(--red)}
.portal-shell .rd-dropdown__item{
	display:flex;gap:10px;padding:12px 18px;border-top:1px solid var(--grey-50);
}
.portal-shell .rd-dropdown__item--unread{background:var(--blue-pale);border-top:none}
.portal-shell .rd-dropdown__chip{
	width:30px;height:30px;border-radius:8px;flex-shrink:0;display:flex;
	align-items:center;justify-content:center;background:var(--grey-50);color:var(--mid);
}
.portal-shell .rd-dropdown__item--unread .rd-dropdown__chip{background:#fff;color:var(--blue)}
.portal-shell .rd-dropdown__chip svg{width:14px;height:14px}
.portal-shell .rd-dropdown__text{font-size:13px;color:var(--ink);line-height:1.4}
.portal-shell .rd-dropdown__time{font-size:11.5px;color:var(--mid);margin-top:2px}
.portal-shell .rd-dropdown__foot{padding:12px 18px;text-align:center;border-top:1px solid var(--hair)}
.portal-shell .rd-dropdown__foot a{font-size:12.5px;font-weight:600;color:var(--blue)}
.portal-shell .rd-dropdown__foot a:hover{color:var(--red)}

/* Map the SAME visual onto the existing notify-bell markup (JS-populated). */
.portal-shell .fl-bell-wrap{position:relative}
.portal-shell .fl-bell{cursor:pointer}
.portal-shell .fl-bell-menu{
	position:absolute;top:calc(100% + 8px);right:0;width:340px;max-width:90vw;
	background:#fff;border:1px solid var(--hair);border-radius:12px;box-shadow:var(--sh-3);
	overflow:hidden;z-index:70;
}
.portal-shell .fl-bell-menu[hidden]{display:none}
.portal-shell .fl-bell-head{
	display:flex;align-items:center;justify-content:space-between;
	padding:14px 18px;border-bottom:1px solid var(--hair);
}
.portal-shell .fl-bell-head strong{font-size:14px;font-weight:700;color:var(--blue-ink)}
.portal-shell .fl-bell-readall{
	background:none;border:none;font-size:12px;font-weight:600;color:var(--blue);cursor:pointer;
}
.portal-shell .fl-bell-readall:hover{color:var(--red)}
.portal-shell .fl-bell-list{list-style:none;margin:0;padding:0;max-height:380px;overflow-y:auto}
.portal-shell .fl-bell-item{
	display:flex;flex-direction:column;gap:2px;padding:12px 18px;
	border-top:1px solid var(--grey-50);cursor:pointer;transition:background .15s var(--ease);
}
.portal-shell .fl-bell-list li:first-child{border-top:none}
.portal-shell .fl-bell-item:hover{background:var(--grey-50)}
.portal-shell .fl-bell-item.is-unread{background:var(--blue-pale);border-top:none}
.portal-shell .fl-bell-item.is-unread:hover{background:#e3ebfb}
.portal-shell .fl-bell-msg{font-size:13px;color:var(--blue-ink);line-height:1.4}
.portal-shell .fl-bell-item.is-unread .fl-bell-msg{font-weight:600}
.portal-shell .fl-bell-ago{font-size:11.5px;color:var(--mid)}
.portal-shell .fl-bell-empty{padding:24px 18px;text-align:center;font-size:13px;color:var(--mid)}
.portal-shell .fl-bell-all{
	display:block;padding:12px 18px;text-align:center;font-size:12.5px;font-weight:600;
	color:var(--blue);border-top:1px solid var(--hair);
}
.portal-shell .fl-bell-all:hover{color:var(--red);background:var(--grey-50)}

/* =============================================================================
   12. SHELL CHROME — sidebar + topbar (client & firm). Author against the class
   names the templates already emit (.sidebar/.sb-*/.topbar/.tb-*/.mob-*).
   ============================================================================= */
.portal-shell .portal{display:grid;grid-template-columns:248px 1fr;min-height:100vh}
.portal-shell .main{display:flex;flex-direction:column;min-width:0;min-height:100vh}

/* --- Sidebar (navy gradient) --- */
.portal-shell .sidebar{
	background:linear-gradient(180deg,var(--blue-ink),var(--foot-bottom));
	color:#fff;display:flex;flex-direction:column;padding:26px 16px;box-sizing:border-box;
	position:sticky;top:0;height:100vh;overflow-y:auto;
}
.portal-shell .sb-logo{
	padding:0 8px 22px;border-bottom:1px solid rgba(255,255,255,.1);margin-bottom:18px;
}
.portal-shell .sb-logo .logo-footer{height:46px;width:auto}
.portal-shell .sb-sub{
	font-size:12px;font-weight:500;letter-spacing:.02em;text-transform:none;
	color:rgba(255,255,255,.6);margin-top:6px;
}
.portal-shell .sb-section{
	padding:0 8px 8px;font-size:11px;font-weight:600;letter-spacing:.12em;
	text-transform:uppercase;color:rgba(255,255,255,.45);
}
.portal-shell .sb-nav{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px;flex:1}
.portal-shell .sb-nav li a{
	position:relative;display:flex;align-items:center;gap:12px;padding:11px 14px;
	border-radius:9px;font-size:14px;font-weight:500;color:rgba(255,255,255,.78);
	transition:background .18s var(--ease),color .18s var(--ease);
}
.portal-shell .sb-nav li a svg{width:18px;height:18px;flex-shrink:0}
.portal-shell .sb-nav li a span{flex:1;min-width:0}
.portal-shell .sb-nav li a:hover{background:rgba(255,255,255,.07);color:#fff}
.portal-shell .sb-nav li a.active{background:rgba(237,28,36,.22);color:#fff;font-weight:600}
.portal-shell .sb-nav li a.active::before{
	content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);
	width:3px;height:20px;background:var(--red);border-radius:0 2px 2px 0;
}
.portal-shell .sb-badge{
	flex:none;margin-left:auto;background:var(--red);color:#fff;font-size:11px;font-weight:700;
	border-radius:var(--r-pill);min-width:22px;padding:1px 6px;text-align:center;line-height:1.6;
}
.portal-shell .sb-badge[hidden]{display:none}
.portal-shell .sb-bottom{
	border-top:1px solid rgba(255,255,255,.1);padding-top:14px;margin-top:auto;
}
.portal-shell .sb-user{display:flex;align-items:center;gap:10px}
.portal-shell .sb-avatar-fallback{
	width:36px;height:36px;border-radius:50%;flex-shrink:0;background:rgba(255,255,255,.15);
	color:#fff;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;
}
.portal-shell .sb-user-info{min-width:0;overflow:hidden}
.portal-shell .sb-user-info .name{
	font-size:13px;font-weight:600;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.portal-shell .sb-user-info .role{
	font-size:12px;color:rgba(255,255,255,.55);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}

/* --- Topbar --- */
.portal-shell .topbar{
	height:68px;background:#fff;border-bottom:1px solid var(--hair);box-shadow:var(--sh-1);
	display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 28px;
	position:sticky;top:0;z-index:40;
}
.portal-shell .topbar-greeting{
	font-family:'Playfair Display',Georgia,serif;font-size:18px;font-weight:700;color:var(--blue-ink);
}
.portal-shell .topbar-date{font-size:12px;color:var(--mid)}
.portal-shell .topbar-right{display:flex;align-items:center;gap:14px}
/* Firm greeting is 15px/600 Inter (not Playfair) — mockup 03. */
.portal-shell.firm-shell .topbar-greeting{
	font-family:'Inter',system-ui,sans-serif;font-size:15px;font-weight:600;letter-spacing:0;
}

/* Search pill */
.portal-shell .tb-search{
	position:relative;display:flex;align-items:center;gap:0;background:var(--grey-50);
	border:1px solid transparent;border-radius:var(--r-pill);
	padding:10px 14px 10px 36px;width:260px;box-sizing:border-box;
	transition:border-color .2s var(--ease),background .2s var(--ease);
}
.portal-shell.firm-shell .tb-search{width:240px}
.portal-shell .tb-search svg{
	position:absolute;left:13px;top:50%;transform:translateY(-50%);
	width:15px;height:15px;color:var(--mid);
}
.portal-shell .tb-search input{
	border:none;outline:none;background:transparent;font-family:inherit;font-size:14px;
	color:var(--ink);width:100%;padding:0;
}
.portal-shell .tb-search:focus-within{border-color:var(--blue);background:#fff;box-shadow:0 0 0 3px rgba(38,64,141,.15)}

/* Icon buttons (bell, etc.) */
.portal-shell .tb-icon{
	width:38px;height:38px;border-radius:50%;border:none;background:transparent;
	display:flex;align-items:center;justify-content:center;position:relative;color:var(--blue-ink);
	cursor:pointer;transition:background .2s var(--ease);
}
.portal-shell .tb-icon:hover{background:var(--grey-50)}
.portal-shell .tb-icon svg{width:19px;height:19px}
.portal-shell .notif-dot{
	position:absolute;top:8px;right:8px;width:8px;height:8px;border-radius:50%;
	background:var(--red);border:2px solid #fff;
}
.portal-shell .notif-dot[hidden]{display:none}
.portal-shell .tb-avatar-fallback{
	width:34px;height:34px;border-radius:50%;flex-shrink:0;background:var(--blue-pale);
	color:var(--blue-ink);display:flex;align-items:center;justify-content:center;
	font-size:13px;font-weight:700;cursor:pointer;
}

/* "+ New" menu (firm topbar) */
.portal-shell .tb-new-wrap{position:relative}
.portal-shell .tb-new{
	display:inline-flex;align-items:center;gap:6px;background:var(--red);color:#fff;
	border:none;border-radius:var(--r-pill);padding:10px 18px;font-family:inherit;
	font-size:13.5px;font-weight:600;cursor:pointer;transition:background .2s var(--ease);
}
.portal-shell .tb-new:hover{background:var(--red-dark)}
.portal-shell .tb-new-plus{font-size:15px;line-height:1;font-weight:700}
.portal-shell .tb-new-menu{
	position:absolute;top:calc(100% + 8px);right:0;min-width:190px;background:#fff;
	border:1px solid var(--hair);border-radius:10px;box-shadow:var(--sh-3);
	padding:0;margin:0;list-style:none;overflow:hidden;z-index:60;
}
.portal-shell .tb-new-menu[hidden]{display:none}
.portal-shell .tb-new-menu li a{display:block;padding:11px 16px;font-size:13.5px;color:var(--ink)}
.portal-shell .tb-new-menu li a:hover{background:var(--blue-pale);color:var(--blue-ink)}

/* Mobile menu button + drawer */
.portal-shell .mob-menu-btn{
	display:none;width:40px;height:40px;border-radius:9px;border:1px solid var(--hair);
	background:#fff;align-items:center;justify-content:center;cursor:pointer;
}
.portal-shell .mob-menu-btn svg{width:20px;height:20px;color:var(--blue-ink)}
.portal-shell .mob-sidebar-ov{
	position:fixed;inset:0;z-index:200;background:rgba(21,34,77,.45);
	opacity:0;visibility:hidden;transition:opacity .3s var(--ease);
}
.portal-shell .mob-sidebar-ov.open{opacity:1;visibility:visible}
.portal-shell .mob-sidebar{
	position:fixed;top:0;left:0;bottom:0;width:248px;box-sizing:border-box;padding:26px 16px;
	background:linear-gradient(180deg,var(--blue-ink),var(--foot-bottom));color:#fff;
	display:flex;flex-direction:column;transform:translateX(-100%);
	transition:transform .35s var(--ease);overflow-y:auto;z-index:201;
}
.portal-shell .mob-sidebar-ov.open .mob-sidebar{transform:translateX(0)}
.portal-shell .mob-sb-close{
	position:absolute;top:14px;right:14px;width:32px;height:32px;border-radius:8px;
	background:rgba(255,255,255,.1);border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;
}
.portal-shell .mob-sb-close svg{width:18px;height:18px;color:rgba(255,255,255,.8)}

/* --- Content frame --- */
.portal-shell .content{flex:1;padding:28px 32px}
.portal-shell .content .section-eyebrow{
	font-size:11.5px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;
	color:var(--red);display:flex;align-items:center;gap:9px;margin-bottom:8px;
}
.portal-shell .content .section-eyebrow::before{content:"";width:20px;height:2px;background:var(--red)}
.portal-shell .content .section-title{
	font-family:'Playfair Display',Georgia,serif;font-weight:700;font-size:28px;
	color:var(--blue-ink);letter-spacing:-.01em;margin-bottom:24px;
}

/* =============================================================================
   13. LOGIN SPLIT-SCREEN CHROME (.portal-wrap) — navy design-system treatment
   ============================================================================= */
.portal-wrap{
	min-height:100vh;display:grid;grid-template-columns:46fr 54fr;
	font-family:'Inter',system-ui,sans-serif;
}
/* Brand panel — navy gradient (mockup hero recipe) with a red rule + eyebrow. */
.portal-wrap .brand-panel{
	background:linear-gradient(160deg,var(--blue-ink),var(--foot-bottom));
	color:#fff;display:flex;flex-direction:column;justify-content:space-between;
	padding:56px;position:relative;overflow:hidden;
}
/* Giant decorative ampersand watermark (brand rule: the & is always --amp). */
.portal-wrap .brand-panel::before{
	content:"&";position:absolute;top:-90px;right:-40px;z-index:0;
	font-family:'Playfair Display',Georgia,serif;font-weight:800;font-size:520px;line-height:1;
	color:var(--amp);opacity:.06;pointer-events:none;
}
.portal-wrap .bp-top,.portal-wrap .bp-mid,.portal-wrap .bp-bottom{position:relative;z-index:1}
.portal-wrap .bp-sub{
	font-size:11.5px;letter-spacing:.16em;text-transform:uppercase;
	color:rgba(255,255,255,.55);font-weight:600;margin-top:12px;
}
.portal-wrap .bp-mid{flex:1;display:flex;flex-direction:column;justify-content:flex-start;padding:40px 0 0}
.portal-wrap .bp-rule{width:48px;height:3px;background:var(--red);border-radius:2px;margin-bottom:28px}
.portal-wrap .bp-headline{
	font-family:'Playfair Display',Georgia,serif;font-weight:700;
	font-size:clamp(28px,3vw,44px);line-height:1.13;letter-spacing:-.01em;color:#fff;margin-bottom:16px;
}
.portal-wrap .bp-headline em{color:#fff;font-style:italic}
.portal-wrap .bp-body{color:rgba(255,255,255,.7);font-size:16px;line-height:1.7;max-width:400px}
.portal-wrap .bp-features{margin-top:36px;display:flex;flex-direction:column;gap:16px}
.portal-wrap .bp-feat{display:flex;align-items:flex-start;gap:14px}
.portal-wrap .bp-feat-icon{
	width:36px;height:36px;min-width:36px;border-radius:9px;background:rgba(255,255,255,.1);
	display:flex;align-items:center;justify-content:center;margin-top:1px;
}
.portal-wrap .bp-feat-icon svg{width:18px;height:18px;color:#ff6b6f}
.portal-wrap .bp-feat-text b{display:block;font-size:14px;color:#fff;margin-bottom:2px}
.portal-wrap .bp-feat-text span{font-size:13px;color:rgba(255,255,255,.6)}
.portal-wrap .bp-trust{display:flex;align-items:center;gap:10px;font-size:12px;color:rgba(255,255,255,.5)}
.portal-wrap .bp-trust svg{width:15px;height:15px;color:rgba(255,255,255,.6);flex-shrink:0}

/* Login panel (right) */
.portal-wrap .login-panel{
	display:flex;flex-direction:column;justify-content:space-between;min-height:100vh;background:#fff;
}
.portal-wrap .login-inner{
	flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:52px 40px;
}
.portal-wrap .mob-wordmark{
	display:none;font-family:'Playfair Display',Georgia,serif;font-weight:800;font-size:26px;
	color:var(--blue-ink);margin-bottom:28px;
}
.portal-wrap .mob-wordmark .amp{color:var(--amp)}
.portal-wrap .login-card{
	width:100%;max-width:420px;box-sizing:border-box;background:#fff;
	border:1px solid var(--hair);border-radius:16px;box-shadow:var(--sh-2);padding:36px 32px;
}
.portal-wrap .login-card-eyebrow{
	font-size:11.5px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;
	color:var(--red);display:flex;align-items:center;gap:9px;margin-bottom:14px;
}
.portal-wrap .login-card-eyebrow::before{content:"";width:22px;height:2px;background:var(--red)}
.portal-wrap .login-card h1{
	font-family:'Playfair Display',Georgia,serif;font-weight:700;font-size:clamp(24px,3vw,32px);
	color:var(--blue-ink);letter-spacing:-.01em;margin-bottom:8px;
}
.portal-wrap .login-card .sub{color:var(--mid);font-size:15px;margin-bottom:28px}

/* Fields — red focus ring on the auth surface (matches the auth field variant). */
.portal-wrap .login-card .field{display:flex;flex-direction:column;gap:6px;margin-bottom:18px}
.portal-wrap .login-card .field label{font-size:13px;font-weight:600;color:var(--blue-ink)}
.portal-wrap .field-wrap{position:relative}
.portal-wrap .field-wrap input{
	width:100%;box-sizing:border-box;padding:13px 42px 13px 14px;background:#fff;
	border:1px solid var(--hair);border-radius:var(--r-sm);font-family:inherit;font-size:15px;color:var(--ink);
	transition:border-color .2s var(--ease),box-shadow .2s var(--ease);
}
.portal-wrap .field-wrap input:focus{outline:none;border-color:var(--red);box-shadow:0 0 0 3px rgba(216,31,38,.15)}
.portal-wrap .field-wrap input::placeholder{color:var(--mid);opacity:.65}
.portal-wrap .field-icon{
	position:absolute;right:13px;top:50%;transform:translateY(-50%);color:var(--mid);
	background:none;border:none;padding:0;display:flex;cursor:pointer;
}
.portal-wrap .field-icon svg{width:17px;height:17px}

.portal-wrap .form-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:22px}
.portal-wrap .remember{display:flex;align-items:center;gap:8px;font-size:13.5px;color:var(--mid)}
.portal-wrap .forgot{font-size:13.5px;font-weight:600;color:var(--blue)}
.portal-wrap .forgot:hover{color:var(--red)}

.portal-wrap .btn-signin{
	width:100%;display:flex;align-items:center;justify-content:center;gap:10px;padding:14px;
	background:var(--red);color:#fff;border:none;border-radius:var(--r-btn);font-family:inherit;
	font-size:15px;font-weight:600;cursor:pointer;transition:all .18s var(--ease);
}
.portal-wrap .btn-signin:hover{background:var(--red-dark);transform:translateY(-1px);box-shadow:0 6px 16px rgba(237,28,36,.28)}
.portal-wrap .btn-signin svg{width:17px;height:17px}

.portal-wrap .login-alert{
	display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:var(--r-sm);
	font-size:13.5px;margin-bottom:20px;
}
.portal-wrap .login-alert.error{background:var(--red-pale);color:var(--red-dark);border:1px solid #f5c2c4}
.portal-wrap .login-alert.ok{background:var(--green-bg);color:var(--green);border:1px solid #c8eedd}
.portal-wrap .login-alert svg{flex-shrink:0}

.portal-wrap .security-note{
	display:flex;align-items:flex-start;gap:10px;margin-top:24px;padding-top:20px;
	border-top:1px solid var(--grey-50);font-size:12.5px;color:var(--mid);
}
.portal-wrap .security-note svg{flex-shrink:0;color:var(--mid);margin-top:1px}
.portal-wrap .login-links{margin-top:20px;text-align:center;font-size:13px;color:var(--mid)}
.portal-wrap .login-links a{font-weight:600;color:var(--blue)}
.portal-wrap .login-links a:hover{color:var(--red)}
.portal-wrap .login-links .dot{margin:0 8px;color:var(--hair)}

.portal-wrap .login-foot{
	display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
	padding:20px 40px;border-top:1px solid var(--grey-50);font-size:12px;color:var(--mid);
}
.portal-wrap .lf-links{display:flex;gap:16px;flex-wrap:wrap}
.portal-wrap .lf-links a{color:var(--mid)}
.portal-wrap .lf-links a:hover{color:var(--red)}

/* =============================================================================
   14. RESPONSIVE + REDUCED MOTION
   ============================================================================= */
@media(max-width:900px){
	.portal-shell .portal{grid-template-columns:1fr}
	.portal-shell .sidebar{display:none}
	.portal-shell .mob-menu-btn{display:flex}
}
@media(max-width:640px){
	.portal-shell .content{padding:20px 16px}
	.portal-shell .tb-search{width:200px}
}
@media(max-width:520px){
	.portal-shell .tb-search{display:none}
	.portal-shell .tb-new span:not(.tb-new-plus){display:none}
	.portal-shell .tb-new{padding:10px 12px}
}
/* Login: collapse to a single column; hide brand panel, show mobile wordmark. */
@media(max-width:860px){
	.portal-wrap{grid-template-columns:1fr}
	.portal-wrap .brand-panel{display:none}
	.portal-wrap .login-panel{background:var(--grey-50)}
	.portal-wrap .mob-wordmark{display:block}
}

@media(prefers-reduced-motion:reduce){
	.portal-shell .rd-btn,
	.portal-wrap .rd-btn,
	.portal-wrap .btn-signin,
	.portal-shell .rd-stat,
	.portal-shell .rd-table tbody tr,
	.portal-shell .sb-nav li a,
	.portal-shell .mob-sidebar,
	.portal-shell .mob-sidebar-ov,
	.portal-shell .tb-search,
	.portal-shell .tb-icon{
		transition:none;
	}
	.portal-shell .rd-btn:hover,
	.portal-wrap .rd-btn--primary:hover,
	.portal-wrap .btn-signin:hover,
	.portal-shell .rd-stat:hover{transform:none}
}
