/* Notary Ninjas Portal UI, progressive Tailwind v4 migration.
   Scope all styling to .nn-portal; the legacy Bootstrap behavior remains for existing forms/modals.
   No selectors in this file affect /welcome. */
:root {
  --nn-ink:#0f172a; --nn-muted:#64748b; --nn-line:#e2e8f0;
  --nn-blue:#2563eb; --nn-electric:#38bdf8; --nn-deep:#080e20;
  --nn-surface:#fff; --nn-page:#f1f5fa;
}
body.nn-portal {background:var(--nn-page);color:var(--nn-ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;letter-spacing:-.005em}
body.nn-portal *,body.nn-portal *::before,body.nn-portal *::after {box-sizing:border-box}
body.nn-portal .notary-admin-shell {display:flex;min-height:100vh;background:var(--nn-page)}
body.nn-portal .notary-admin-sidebar {flex:0 0 286px;width:286px;max-width:286px;height:100vh;top:0;position:sticky;z-index:1000;padding:20px 14px;background:linear-gradient(185deg,#071125,#0b1732 64%,#10132b)!important;color:#dbeafe;border-right:1px solid rgba(148,163,184,.12);box-shadow:8px 0 35px rgba(15,23,42,.1);scrollbar-color:#2e4269 transparent;overscroll-behavior:contain;overflow-y:auto}
body.nn-portal .notary-admin-brand {padding:12px 8px 20px;margin-bottom:15px;border-bottom:1px solid rgba(148,163,184,.14);display:flex;align-items:center;gap:12px}
body.nn-portal .notary-admin-brand-mark {height:44px;width:44px;flex:0 0 44px;border-radius:14px;background:linear-gradient(135deg,#2563eb,#0ea5e9)!important;color:#fff!important;box-shadow:0 8px 22px rgba(37,99,235,.34);font-size:15px;letter-spacing:-.06em}
body.nn-portal .notary-admin-brand-title {color:#fff;font-weight:800;font-size:.99rem;letter-spacing:-.025em}
body.nn-portal .notary-admin-brand-subtitle {color:#9baec9;font-size:.72rem;margin-top:3px;overflow-wrap:anywhere}
body.nn-portal .notary-admin-nav {display:block!important;padding-bottom:25px;grid-template-columns:none}
body.nn-portal .notary-admin-nav-section {color:#91a7c7;font-size:.65rem;text-transform:uppercase;letter-spacing:.13em;font-weight:800;display:flex;align-items:center;justify-content:space-between;margin:22px 10px 8px;min-height:16px}
body.nn-portal .notary-admin-nav-section[data-admin-menu-section] {cursor:pointer}
body.nn-portal .notary-admin-nav-section:not([data-admin-menu-section])::after{content:none}
body.nn-portal .notary-admin-nav-group {display:block}
body.nn-portal .notary-admin-nav-group.is-collapsed {display:none}
body.nn-portal .notary-admin-nav-link {color:#c4d2ea;background:transparent;border:1px solid transparent;border-radius:12px;display:flex;align-items:center;justify-content:flex-start;gap:9px;padding:10px 12px;font-size:.79rem;font-weight:660;margin-bottom:3px;line-height:1.3;text-decoration:none;transition:background .18s ease,color .18s ease,border-color .18s ease,transform .18s ease}
body.nn-portal .notary-admin-nav-link::before {content:'';width:7px;height:7px;border-radius:2px;border:1px solid #5f779b;flex-shrink:0;opacity:.8}
body.nn-portal .notary-admin-nav-link span {flex:1;min-width:0}
body.nn-portal .notary-admin-nav-link small {color:#b8c7e4;opacity:.85;font-size:.62rem;border:1px solid rgba(148,163,184,.28);padding:2px 5px;border-radius:6px;white-space:nowrap}
body.nn-portal .notary-admin-nav-link:hover,body.nn-portal .notary-admin-nav-link:focus-visible {color:white;transform:none;background:rgba(59,130,246,.16);border-color:rgba(96,165,250,.22);outline:0}
body.nn-portal .notary-admin-nav-link.active {background:linear-gradient(105deg,#1d4ed8,#2563eb)!important;color:#fff!important;border-color:rgba(147,197,253,.42)!important;box-shadow:0 10px 23px rgba(37,99,235,.25)}
body.nn-portal .notary-admin-nav-link.active::before{background:#fff;border-color:#fff}
body.nn-portal .notary-admin-nav-link.danger {color:#fecaca}
body.nn-portal .notary-admin-nav-link.danger:hover {background:rgba(220,38,38,.14);color:#fff}
body.nn-portal .notary-admin-main {min-width:0;flex:1;width:calc(100% - 286px);margin-left:0!important;padding:27px clamp(15px,2.5vw,42px) 45px;overflow-x:clip}
body.nn-portal .notary-admin-topbar {position:relative;display:flex;align-items:center;justify-content:space-between;gap:15px;margin:0 0 23px!important;padding:22px 26px;border-radius:22px;border:1px solid #e2e8f0;background:rgba(255,255,255,.97);box-shadow:0 8px 34px rgba(15,23,42,.035)}
body.nn-portal .notary-admin-topbar h1 {font-size:clamp(1.35rem,2.1vw,1.95rem)!important;line-height:1.16;font-weight:820!important;color:#0f172a;margin:4px 0 7px!important}
body.nn-portal .notary-admin-topbar .text-muted {color:#64748b!important;line-height:1.55}
body.nn-portal .notary-admin-content-panel {max-width:1900px;margin:auto;width:100%;min-width:0}
body.nn-portal .notary-admin-content-panel .card,body.nn-portal .notary-admin-content-panel .nn-card {border:1px solid #e2e8f0!important;border-radius:19px!important;background:#fff;box-shadow:0 8px 30px rgba(15,23,42,.045)!important;overflow:visible}
body.nn-portal .notary-admin-content-panel .card-header {background:#fbfdff;border-radius:18px 18px 0 0;border-color:#e2e8f0;padding:17px 20px}
body.nn-portal .notary-admin-content-panel .card-body {padding:clamp(15px,1.6vw,23px)}
body.nn-portal .notary-admin-content-panel .table-responsive {overflow:auto;border-radius:12px;scrollbar-color:#cbd5e1 transparent}
body.nn-portal .notary-admin-content-panel table {max-width:100%;border-color:#edf1f6}
body.nn-portal .notary-admin-content-panel table thead th {background:#f8fafc;color:#475569;font-size:.76rem;font-weight:800;letter-spacing:.025em;border-bottom-color:#dfe7ef;padding:13px 14px;white-space:nowrap}
body.nn-portal .notary-admin-content-panel table tbody td {font-size:.87rem;padding:12px 14px;border-bottom-color:#e9eef5}
body.nn-portal .notary-admin-content-panel .table-hover tbody tr:hover {background:#f6faff}
body.nn-portal .notary-admin-content-panel .form-control,body.nn-portal .notary-admin-content-panel .form-select {border:1px solid #cbd5e1;border-radius:11px;background-color:#fff;color:#0f172a;min-height:39px;transition:border-color .16s,box-shadow .16s;max-width:100%}
body.nn-portal .notary-admin-content-panel .form-control:focus,body.nn-portal .notary-admin-content-panel .form-select:focus {border-color:#3b82f6;box-shadow:0 0 0 3px rgba(59,130,246,.15)}
body.nn-portal .notary-admin-content-panel .btn {border-radius:10px;font-weight:700;min-height:35px;transition:transform .15s,box-shadow .15s,background .15s}
body.nn-portal .notary-admin-content-panel .btn:hover {transform:translateY(-1px)}
body.nn-portal .notary-admin-content-panel .btn-primary,body.nn-portal .notary-admin-content-panel .btn-danger:not(.btn-outline-danger) {background:#2563eb;border-color:#2563eb;color:white}
body.nn-portal .notary-admin-content-panel .btn-danger:not(.btn-outline-danger) {background:#dc2626;border-color:#dc2626}
body.nn-portal .notary-admin-content-panel a:not(.btn) {overflow-wrap:anywhere}
body.nn-portal .alert {border-radius:14px}
body.nn-portal :focus-visible {outline:3px solid rgba(59,130,246,.56);outline-offset:2px}
.nn-visually-hidden {border:0!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;height:1px!important;width:1px!important;overflow:hidden!important;position:absolute!important;white-space:nowrap!important;padding:0!important;margin:-1px!important}
.nn-sidebar-search-wrap {position:relative;margin:0 3px 5px}
.nn-sidebar-search {width:100%;height:39px;padding:9px 32px 9px 13px;border-radius:11px;border:1px solid #294065;background:rgba(16,33,62,.9);color:#f8fafc;outline:0;font-size:.8rem}
.nn-sidebar-search::placeholder {color:#94a3b8}
.nn-sidebar-search:focus {border-color:#60a5fa;box-shadow:0 0 0 3px rgba(59,130,246,.18)}
.nn-sidebar-search-icon {position:absolute;right:12px;top:7px;color:#93b0d2;font-size:18px;pointer-events:none}
.nn-breadcrumb {color:#2563eb;font-size:.67rem;font-weight:900;letter-spacing:.14em;text-transform:uppercase}
.nn-topbar-utilities {display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-left:auto}
.nn-system-status {display:inline-flex;align-items:center;gap:8px;padding:9px 12px;border-radius:99px;border:1px solid #e2e8f0;background:#f8fafc;font-size:.73rem;color:#475569;font-weight:730;white-space:nowrap}
.nn-online-dot {height:7px;width:7px;border-radius:50%;background:#10b981;box-shadow:0 0 0 3px rgba(16,185,129,.12)}
.nn-icon-button {border-radius:11px!important;background:#f8fafc!important;border:1px solid #e2e8f0!important;color:#334155!important;height:39px;width:40px;display:grid;place-items:center;cursor:pointer;font-size:22px;flex-shrink:0}
.nn-icon-button:hover {background:#dbeafe!important}
.nn-mobile-toolbar {display:none}
.nn-sidebar-backdrop {display:none}
/* Deals */
.nn-deals-page {--nn-deal-blue:#2563eb;color:#0f172a}
.nn-deals-hero {position:relative;overflow:hidden;background:radial-gradient(circle at 85% 20%,rgba(56,189,248,.2),transparent 40%),linear-gradient(125deg,#08142d,#142a52 55%,#173f76);padding:27px 32px!important;min-height:155px;border:1px solid #2b4778;color:#fff;box-shadow:0 16px 35px rgba(19,49,100,.12)}
.nn-deals-hero::after {content:'';position:absolute;right:-55px;bottom:-115px;width:290px;height:290px;border:1px solid rgba(147,197,253,.12);border-radius:50%;box-shadow:0 0 0 55px rgba(96,165,250,.035),0 0 0 100px rgba(96,165,250,.025)}
.nn-deals-hero-inner {display:flex;align-items:center;justify-content:space-between;gap:16px;position:relative;z-index:1}
.nn-deals-hero p {max-width:700px;color:#b6cdec!important;font-size:.88rem;line-height:1.6}
.nn-kicker {color:#7dd3fc;letter-spacing:.12em;font-size:.67rem;font-weight:850;margin-bottom:8px}
.nn-deals-hero-graphic {height:80px;width:80px;border-radius:22px;background:linear-gradient(135deg,rgba(59,130,246,.27),rgba(56,189,248,.08));display:grid;place-items:center;border:1px solid rgba(191,219,254,.2);font-size:43px;color:#93c5fd;transform:rotate(-8deg);flex:0 0 80px}
.nn-deals-stat-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}
.nn-deals-stat {border:1px solid #dfe7f2;background:#fff;padding:21px!important;border-radius:18px;box-shadow:0 4px 23px rgba(15,23,42,.035)}
.nn-stat-label {color:#475569;font-size:.78rem;font-weight:760}
.nn-stat-number {font-size:2.2rem;font-weight:850;letter-spacing:-.05em;line-height:1.2;margin-top:8px}
.nn-stat-description {color:#94a3b8;font-size:.74rem;margin-top:3px}
.nn-deals-workspace {display:grid;grid-template-columns:minmax(320px,2fr) minmax(0,3fr);gap:18px;align-items:start}
.nn-deals-editor,.nn-deals-library {border:1px solid #e2e8f0;background:#fff;border-radius:20px;padding:24px!important;min-width:0;box-shadow:0 7px 25px rgba(15,23,42,.04)}
.nn-section-eyebrow {color:#2563eb;font-size:.65rem;font-weight:850;letter-spacing:.11em;margin-bottom:5px}
.nn-deals-editor h2,.nn-deals-library h2 {font-size:1.16rem;color:#0f172a;font-weight:850;letter-spacing:-.025em}
.nn-deals-editor p {font-size:.8rem;color:#64748b;line-height:1.6}
.nn-deals-form {display:grid;gap:14px}
.nn-field {display:grid;gap:5px;min-width:0}
.nn-field label,.nn-deal-edit-form label {display:grid;gap:5px;font-size:.78rem;font-weight:770;color:#334155}
.nn-field small {color:#94a3b8;font-size:.69rem;line-height:1.4}
.nn-deals-page .form-control,.nn-deals-page .form-select {font-size:.84rem;padding:10px 12px!important;min-height:41px}
.nn-deals-page textarea.form-control {min-height:75px}
.nn-deals-form-footer {display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap}
.nn-deals-form-footer .nn-field {width:130px}
.nn-toggle-label {display:inline-flex;gap:10px;align-items:center;cursor:pointer;font-size:.78rem;font-weight:760;color:#334155}
.nn-toggle-label input {opacity:0;width:1px;height:1px;position:absolute}
.nn-toggle-slider {width:38px;height:22px;border-radius:99px;background:#cbd5e1;position:relative;transition:background .2s}
.nn-toggle-slider::before {content:'';position:absolute;height:16px;width:16px;top:3px;left:3px;border-radius:99px;background:#fff;box-shadow:0 1px 3px #64748b;transition:transform .2s}
.nn-toggle-label input:checked + .nn-toggle-slider {background:#2563eb}
.nn-toggle-label input:checked + .nn-toggle-slider::before {transform:translateX(16px)}
.nn-toggle-label input:focus-visible + .nn-toggle-slider {outline:3px solid #93c5fd;outline-offset:3px}
.nn-deal-preview-box {border:1px dashed #b4c8e6;background:linear-gradient(145deg,#f8fbff,#f0f7ff);border-radius:14px;padding:14px}
.nn-deal-preview-row {display:flex;gap:12px;align-items:center;margin-top:8px}
.nn-deal-preview-art {width:51px;height:51px;flex:0 0 51px;display:grid;place-items:center;border-radius:12px;background:linear-gradient(135deg,#2563eb,#0ea5e9);color:white;font-size:21px;overflow:hidden}
.nn-deal-preview-art img {width:100%;height:100%;object-fit:cover}
.nn-deal-preview-row strong {font-size:.85rem;color:#1e293b;display:block;overflow-wrap:anywhere}
.nn-deal-preview-row p {font-size:.71rem;margin:4px 0 0;line-height:1.4}
.nn-primary-action {display:inline-flex;align-items:center;justify-content:center;padding:11px 18px;border:1px solid #2563eb;border-radius:12px;background:linear-gradient(105deg,#1d4ed8,#2563eb);color:white;cursor:pointer;font-size:.81rem;font-weight:800;min-height:43px;transition:box-shadow .2s,transform .2s}
.nn-primary-action:hover {box-shadow:0 7px 21px rgba(37,99,235,.23);transform:translateY(-1px)}
.nn-deals-library-header {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:17px}
.nn-count-pill {border-radius:999px;background:#eff6ff;color:#1d4ed8;padding:6px 12px;font-size:.72rem;font-weight:780;white-space:nowrap}
.nn-deals-toolbar {display:flex;gap:9px;margin-bottom:14px}
.nn-deals-toolbar input {flex:1;min-width:0}
.nn-deals-toolbar select {width:142px;flex:0 0 142px}
.nn-deals-list {display:grid;gap:12px}
.nn-deal-item {border:1px solid #e2e8f0;border-radius:15px;padding:14px 15px;background:#fff;transition:border-color .2s,box-shadow .2s}
.nn-deal-item:hover {border-color:#bfd4f6;box-shadow:0 8px 24px rgba(30,64,175,.055)}
.nn-deal-summary {display:flex;gap:12px;align-items:flex-start;min-width:0}
.nn-deal-art {height:48px;width:48px;flex:0 0 48px;display:grid;place-items:center;border-radius:12px;background:#eaf2ff;color:#2563eb;font-size:23px;overflow:hidden}
.nn-deal-art img {width:100%;height:100%;object-fit:cover}
.nn-deal-main {flex:1;min-width:0}
.nn-deal-name {font-size:.9rem;font-weight:820;color:#0f172a;overflow-wrap:anywhere}
.nn-deal-main p {font-size:.75rem;color:#64748b;margin:4px 0 7px;line-height:1.5;overflow-wrap:anywhere;white-space:pre-line}
.nn-deal-meta {display:flex;flex-wrap:wrap;gap:9px;align-items:center;color:#94a3b8;font-size:.69rem}
.nn-deal-meta a {color:#2563eb;text-decoration:none;font-weight:800}
.nn-status-pill {padding:4px 8px;border-radius:99px;font-weight:800;font-size:.67rem}
.nn-status-active {background:#dcfce7;color:#166534}
.nn-status-hidden {background:#f1f5f9;color:#475569}
.nn-deal-actions {display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;border-top:1px solid #f1f5f9;margin-top:12px;padding-top:12px}
.nn-deal-actions form {margin:0}
.nn-action-muted,.nn-action-secondary,.nn-action-danger {border-radius:9px;border:1px solid #cbd5e1;background:#fff;color:#475569;font-size:.71rem;font-weight:760;padding:7px 10px;min-height:33px;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
.nn-action-secondary {background:#eff6ff;border-color:#dbeafe;color:#1d4ed8;list-style:none}
.nn-action-danger {border-color:#fecaca;color:#b91c1c}
.nn-action-danger:hover {background:#fef2f2}
.nn-deal-edit summary::-webkit-details-marker {display:none}
.nn-deal-edit[open] {width:100%;order:10}
.nn-deal-edit[open] summary {width:fit-content;margin:0 0 12px auto}
.nn-deal-edit-form {display:grid;gap:10px;border:1px solid #e2e8f0;background:#f8fafc;padding:15px;border-radius:12px}
.nn-checkbox-inline {display:flex!important;align-items:center;gap:9px!important}
.nn-deals-empty {text-align:center;padding:38px 12px;color:#64748b}
.nn-deals-empty[hidden],.nn-deal-item[hidden] {display:none!important}
.nn-empty-icon {font-size:30px;color:#93c5fd;margin-bottom:8px}
.nn-deals-empty strong {display:block;color:#334155;font-size:.88rem}
.nn-deals-empty p {font-size:.75rem;margin:7px 0}
.nn-deals-footer {margin-top:20px;font-size:.7rem;color:#94a3b8;line-height:1.6}
@media (max-width:1200px){.nn-deals-workspace {grid-template-columns:1fr}body.nn-portal .notary-admin-sidebar{flex-basis:254px;width:254px;max-width:254px}body.nn-portal .notary-admin-main{width:calc(100% - 254px)}}
@media (max-width:991.98px){
  body.nn-portal .notary-admin-shell {display:block}
  body.nn-portal .notary-admin-sidebar {position:fixed!important;top:0;left:0;height:100dvh;width:min(315px,87vw)!important;max-width:min(315px,87vw)!important;transform:translateX(-110%);transition:transform .24s ease;z-index:1201;box-shadow:20px 0 55px rgba(0,0,0,.27);display:block!important;visibility:hidden}
  body.nn-portal.nn-sidebar-open .notary-admin-sidebar {transform:translateX(0);visibility:visible}
  body.nn-portal .notary-admin-main {padding:13px 14px 30px;max-width:100%;width:100%!important;margin:0}
  body.nn-portal .notary-admin-nav {display:block!important}
  body.nn-portal .notary-admin-nav-section {grid-column:auto}
  body.nn-portal .notary-admin-topbar {padding:18px 19px;flex-direction:row;flex-wrap:wrap;align-items:center}
  body.nn-portal .nn-mobile-toolbar {display:flex;align-items:center;gap:13px;margin-bottom:13px}
  body.nn-portal .nn-mobile-brand {font-size:.69rem;font-weight:900;letter-spacing:.1em;color:#64748b}
  body.nn-portal .nn-mobile-menu-button {display:inline-flex;align-items:center;gap:9px;border-radius:11px;background:#0f172a;color:#fff;border:1px solid #334155;font-size:.83rem;padding:10px 14px;font-weight:730;min-height:41px}
  body.nn-portal .nn-sidebar-backdrop {display:block;position:fixed;inset:0;background:rgba(7,15,30,.61);border:0;z-index:1200;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s,visibility .2s}
  body.nn-portal.nn-sidebar-open .nn-sidebar-backdrop {opacity:1;visibility:visible;pointer-events:auto}
  body.nn-portal.nn-sidebar-open {overflow:hidden}
}
@media (max-width:650px){.nn-deals-stat-grid {grid-template-columns:1fr 1fr}.nn-deals-stat:first-child{grid-column:span 2}.nn-deals-hero{padding:24px!important}.nn-deals-hero-graphic{display:none}.nn-deals-toolbar {flex-wrap:wrap}.nn-deals-toolbar select {width:100%;flex:1 1 130px}.nn-deals-editor,.nn-deals-library{padding:16px!important}.nn-deals-stat{padding:15px!important}.nn-deal-actions {justify-content:flex-start}.nn-deal-item{padding:12px}}
/* Optional dark appearance: tables/forms remain readable and retain existing JS behavior. */
body.nn-portal.nn-dark {--nn-page:#090f1c;--nn-surface:#101e33;--nn-ink:#eff6ff;background:var(--nn-page);color:#dbeafe}
body.nn-portal.nn-dark .notary-admin-shell {background:var(--nn-page)}
body.nn-portal.nn-dark .notary-admin-topbar,body.nn-portal.nn-dark .notary-admin-content-panel .card,body.nn-portal.nn-dark .nn-deals-stat,body.nn-portal.nn-dark .nn-deals-editor,body.nn-portal.nn-dark .nn-deals-library,body.nn-portal.nn-dark .nn-deal-item{background:#101e33!important;color:#dbeafe!important;border-color:#263853!important}
body.nn-portal.nn-dark .notary-admin-topbar h1,body.nn-portal.nn-dark .nn-deals-editor h2,body.nn-portal.nn-dark .nn-deals-library h2,body.nn-portal.nn-dark .nn-deal-name,body.nn-portal.nn-dark .nn-stat-number{color:#eff6ff!important}
body.nn-portal.nn-dark .notary-admin-topbar .text-muted,body.nn-portal.nn-dark .nn-field label,body.nn-portal.nn-dark .nn-stat-label{color:#aebfda!important}
body.nn-portal.nn-dark .form-control,body.nn-portal.nn-dark .form-select{background:#142640!important;color:#eff6ff!important;border-color:#304565!important}
body.nn-portal.nn-dark .nn-icon-button,body.nn-portal.nn-dark .nn-system-status{background:#162a45!important;color:#cbd5e1!important;border-color:#304565!important}
body.nn-portal.nn-dark .notary-admin-content-panel .table{--bs-table-color:#dbeafe;--bs-table-bg:#101e33;--bs-table-border-color:#263853}
body.nn-portal.nn-dark .notary-admin-content-panel .table thead th{background:#1b2d48;color:#dbeafe}
body.nn-portal.nn-dark .notary-admin-content-panel .card-header{background:#1b2d48;color:#dbeafe;border-color:#263853}
body.nn-portal.nn-dark .nn-deal-preview-box{background:#162a45;border-color:#38547e}
body.nn-portal.nn-dark .nn-deal-preview-row strong{color:#eff6ff}
body.nn-portal.nn-dark .nn-deal-edit-form{background:#162a45;border-color:#38547e}
@media print {body.nn-portal .nn-mobile-toolbar,body.nn-portal .nn-sidebar-backdrop,body.nn-portal .nn-icon-button,body.nn-portal .nn-sidebar-search-wrap{display:none!important}body.nn-portal .notary-admin-sidebar{display:none!important}body.nn-portal .notary-admin-main{width:100%;padding:0}}
