/* Royal system — compact list proposal extended across the application.
   Screen presentation only: document exports and print templates are untouched. */
@media screen {
:root{--rs-bg:#f4f6f8;--rs-paper:#fff;--rs-ink:#172a43;--rs-muted:#526173;--rs-line:#dce2e8;--rs-gold:#80632f;--rs-green:#21664c;--royal-canvas:var(--rs-bg);--royal-surface:var(--rs-paper);--royal-ink:var(--rs-ink);--royal-muted:var(--rs-muted);--royal-border:var(--rs-line);--royal-action:var(--rs-gold);--royal-accent:var(--rs-gold)}
body,body.royal-compact{background:var(--rs-bg)!important;color:var(--rs-ink)!important}
body.royal-compact{--ink:var(--rs-ink);--gold:var(--rs-gold);font-size:14px;line-height:1.55}
/* Shared rhythm and hierarchy. */
.royal-compact #app>header,.royal-compact .project-module>header,.royal-compact .royal-dashboard-head{gap:16px;padding-bottom:20px;margin-bottom:22px;align-items:center;border-bottom:1px solid var(--rs-line)}
.royal-compact #app>header h1,.royal-compact .project-module>header h1,.royal-compact .royal-dashboard-head h1{font:34px/1.2 Georgia,serif;letter-spacing:-.6px;margin:0 0 8px;color:var(--rs-ink)}
.royal-compact #app>header p,.royal-compact .project-module>header p,.royal-compact .royal-dashboard-head p{font-size:14px!important;line-height:1.65;color:var(--rs-muted)!important;margin:0}
.royal-compact #app>header .actions,.royal-compact .project-module>header .actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.royal-compact :is(.panel,.card,.royal-recent-panel,.royal-context-panel,.royal-kpi-strip,.project-card,.project-kpis>div,.project-list-summary>div,.project-list-table-wrap,.project-compact-progress,.project-compact-kpis>div),.royal-compact .project-compact-layout .panel{background:var(--rs-paper)!important;border:1px solid var(--rs-line)!important;border-radius:8px;box-shadow:none!important}
.royal-compact #app>.panel{padding:22px;margin-top:18px}.royal-compact #app>.cards{gap:14px;margin:20px 0}.royal-compact #app>.cards>.card{padding:20px 22px}
.royal-compact :is(.royal-panel-heading,.royal-context-heading){padding:18px 22px;border-bottom:1px solid var(--rs-line)}
.royal-compact .royal-panel-heading h2,.royal-compact .royal-context-heading h2,.royal-compact #app>.panel>h2{font:24px/1.3 Georgia,serif;color:var(--rs-ink);margin:0}
.royal-compact :is(.project-muted,.royal-project-meta li,.royal-context-reference,.royal-context-empty p,.royal-documents-empty p,.royal-project-amounts>div,.royal-stages li){font-size:13px!important;color:var(--rs-muted)!important}
/* Brand and compact navigation. */
.royal-compact>aside.royal-icon-rail,.royal-community .rc-rail{background:#172a43!important;border-right:1px solid #243a54}
.royal-compact .royal-topbar,.royal-compact .royal-primarybar,.royal-community .rc-topbar{background:var(--rs-bg)!important;border-color:var(--rs-line)!important}
.royal-compact .royal-topbar{gap:18px}.royal-compact .royal-wordmark{font-size:21px;letter-spacing:2px}.royal-primarybar>nav{gap:20px}.royal-compact .royal-primarybar nav :is(button,a){font-size:13px;padding-top:15px;padding-bottom:14px;color:#34475e}.royal-compact .royal-primarybar nav button.active{border-bottom:3px solid #a18140;color:var(--rs-ink)}
.royal-icon-rail #nav .active,.royal-rail-bottom>button.active{background:#ffffff16!important;color:#e4c98e!important;border:1px solid #b99a5c80!important}
.royal-compact .royal-command-search{height:40px;background:#fff!important;border:1px solid var(--rs-line)!important}.royal-compact .royal-command-search input{font-size:13px}
.royal-compact :is(.royal-profile-dropdown,.royal-accounting-menu){background:#fff!important;border:1px solid var(--rs-line)!important;border-radius:8px;box-shadow:0 8px 24px #172a4312}
/* Buttons and fields: clear hierarchy, consistent geometry. */
.royal-compact button:not(.project-list-name),.royal-compact .royal-module-subnav button{border-radius:6px;line-height:1.45;box-shadow:none;transition:background-color .12s}
.royal-compact #app :is(button,.button):not(.royal-row-select):not(.project-list-name):not(.rde-toolbar button):not(.rde-paper button){min-height:40px;font-size:13px}
.royal-compact button.primary,.royal-compact #app>.panel .actions>.primary,.royal-compact .royal-dashboard button.primary,.royal-public .rp-button,.royal-access-page .button,.landing .button,.support-page .button,.ei-page .ei-primary{background:var(--rs-gold)!important;border-color:var(--rs-gold)!important;color:white!important;border-radius:6px;box-shadow:none!important}
.royal-compact button.primary:hover,.royal-public .rp-button:hover,.royal-access-page .button:hover,.landing .button:hover,.ei-page .ei-primary:hover{background:#6d5327!important;border-color:#6d5327!important}
.royal-compact #app :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not(.rde-paper input):not(.rde-paper select):not(.rde-paper textarea),.royal-compact dialog :is(input,select,textarea):not([type=checkbox]):not([type=radio]),.landing :is(input,select,textarea):not([type=checkbox]):not([type=radio]),.royal-access-page input{background:#fff!important;border:1px solid #bdc8d3!important;border-radius:6px;color:var(--rs-ink)!important;font-size:14px;line-height:1.5;padding:10px 12px}
.royal-compact #app label,.royal-compact dialog label{font-size:13px;color:#34475e}.royal-compact #app .actions{gap:10px;flex-wrap:wrap}
body :is(a,button,summary,input,select,textarea):focus-visible{outline:3px solid #547699!important;outline-offset:3px}
/* Financial summaries: pale cards, prominent figures, no dark first card. */
.royal-compact .royal-kpi-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;padding:21px 0;margin-bottom:22px}
.royal-compact .royal-kpi-strip>div{padding:0 22px;min-width:0}.royal-compact .royal-kpi-strip small{font-size:13px!important;letter-spacing:0;color:var(--rs-muted)!important}.royal-compact .royal-kpi-strip strong{font:600 29px/1.4 'Segoe UI',sans-serif;color:var(--rs-ink);overflow-wrap:anywhere}
.royal-compact #app>.cards>.card strong{font:600 29px/1.4 'Segoe UI',sans-serif!important;color:var(--rs-ink)!important}.royal-compact #app:has(#accountFilter)>.cards>.card:first-child strong{color:var(--rs-green)!important}
/* Shared table treatment, excluding the document editor and PDF template. */
.royal-compact #app>.panel>table,.royal-compact .royal-documents-table,.royal-compact .project-list-table,.admin table{background:#fff!important;border-collapse:collapse}
.royal-compact #app>.panel>table th,.royal-compact .royal-documents-table th,.royal-compact .project-list-table th,.admin th{background:#f0f3f6;color:#526173;font-size:12px!important;font-weight:600;text-transform:none;letter-spacing:0;padding:15px 12px;border-bottom:1px solid var(--rs-line)}
.royal-compact #app>.panel>table td,.royal-compact .royal-documents-table td,.royal-compact .project-list-table td,.admin td{font-size:13px!important;padding:16px 12px;border-bottom:1px solid var(--rs-line);color:var(--rs-ink)}
.royal-compact .royal-row-select strong{font-size:14px!important}.royal-compact .royal-documents-table small{font-size:12px!important;color:var(--rs-muted)!important}.royal-compact .royal-documents-scroll{padding:0 12px 12px}.royal-compact .royal-documents-table tbody tr:hover,.royal-compact #app>.panel>table tbody tr:hover{background:#f7f9fb}
.royal-compact .royal-status{border-radius:5px;padding:6px 9px;font-size:12px}.royal-compact :is(.royal-status.is-paid,.royal-quote-accepted){background:#e6f0e9!important;color:#21664c!important}.royal-compact .project-list-summary>div{padding:15px 22px}
.royal-compact .project-list-name{background:none!important;border:0!important;padding:0!important;min-height:0!important;font-size:15px!important}.royal-compact .project-list-table td{padding:16px 10px}.royal-compact .project-list-actions details>div{background:#fff}.royal-compact .project-list-actions button{background:none}
/* Dialogs and auxiliary modules follow the same card system. */
.royal-compact dialog:not(.project-photo-viewer){border:1px solid var(--rs-line);border-radius:10px;background:#fff;color:var(--rs-ink);box-shadow:0 18px 65px #172a4324}.royal-compact dialog::backdrop{background:#172a4370}.royal-compact .project-photo-viewer{background:#fff}
.landing:not(.royal-public):not(.comm-page){max-width:1240px;padding:28px 32px}.landing>header,.admin>header{padding-bottom:20px;gap:16px;border-color:var(--rs-line)}
.landing:not(.royal-public) h1,.admin h1{font:36px/1.2 Georgia,serif;letter-spacing:-.6px;margin:25px 0 14px;color:var(--rs-ink)}
.landing :is(.box,.ei-production,.ei-card,.ei-section .box),.admin table,.landing .comm-panel,.landing .comm-post,.landing .comm-member{background:#fff!important;border:1px solid var(--rs-line)!important;border-radius:8px;box-shadow:none!important;padding:24px}
.landing:not(.royal-public) p,.admin p{font-size:14px;line-height:1.7;color:var(--rs-muted)}.ei-page .ei-intro{padding:28px 0 24px}.ei-page .ei-production{padding:24px;border-radius:8px}.ei-page .ei-section{padding:28px 0;border-color:var(--rs-line)}.ei-page .ei-steps{gap:22px;margin-top:24px}.ei-page .ei-section h2{font-size:27px;color:var(--rs-ink)}
.admin{max-width:1300px;margin:24px auto;padding:24px 32px}.admin .table-wrap{border:1px solid var(--rs-line);border-radius:8px}.admin table{border:0!important;border-radius:0}.admin button{min-height:40px;border-color:var(--rs-line);background:#f0f3f6;color:var(--rs-ink)}
/* Community and private messages. Content and images keep their natural proportions. */
.landing.comm-page.royal-community{background:var(--rs-bg)!important;--rc-navy:#172a43;--rc-gold:var(--rs-gold)}
.royal-community .comm-hero{padding-top:24px;padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid var(--rs-line)}.royal-community .comm-hero h1{font-size:34px;margin:0 0 9px}.royal-community .comm-columns{gap:20px}.royal-community .comm-sidebar{gap:16px}
.royal-community :is(.comm-panel,.comm-post,.comm-member,.comm-rules){background:#fff!important;border:1px solid var(--rs-line)!important;border-radius:8px;padding:20px;box-shadow:none!important}.royal-community .comm-post{margin-bottom:16px}.royal-community .comm-post h2{font-size:23px}.royal-community .comm-author{gap:11px}.royal-community .comm-post-meta{font-size:12px!important}.royal-community .comm-body{font-size:14px;line-height:1.7}.royal-community .comm-tabs{gap:18px;border-color:var(--rs-line)}.royal-community .comm-tabs a{font-size:14px;padding:12px 0}.royal-community .comm-tabs .active{border-color:#a18140;color:var(--rs-ink)}
.royal-community .comm-message-layout{background:#fff!important;border:1px solid var(--rs-line)!important;border-radius:8px}.royal-community .comm-inbox{background:#f5f7f9!important}.royal-community .comm-conversation{padding:15px 16px;border-bottom:1px solid var(--rs-line)}.royal-community .comm-conversation.selected{background:#eaf0f5}.royal-community .comm-history{background:#f7f9fb!important}.royal-community .comm-bubble{background:#fff!important;border:1px solid var(--rs-line);border-radius:10px}.royal-community .comm-bubble.mine{background:#e8f0eb!important;border-color:#d4e2d8}.royal-community .comm-thread-head,.royal-community .comm-message-compose{padding:16px 20px;border-color:var(--rs-line)}.royal-community .comm-bubble p{font-size:14px}.royal-community .comm-message-compose textarea{background:#fff!important;min-height:72px}.royal-community .comm-modal{border:1px solid var(--rs-line);border-radius:10px;background:#fff}
/* Public home and access pages: same typography, surfaces and button geometry. */
.royal-public{max-width:1400px;padding-top:24px}.royal-public .rp-header{background:var(--rs-bg)!important;padding-bottom:20px;border-color:var(--rs-line)}.royal-public .rp-hero{padding-top:36px;padding-bottom:38px;gap:30px}.royal-public .rp-hero h1{font-size:clamp(36px,3.4vw,46px);line-height:1.18}.royal-public .rp-section{padding:35px 0;border-color:var(--rs-line)}.royal-public .rp-section-heading h2{font-size:32px}.royal-public :is(.rp-feature-grid article,.rp-price-grid article,.rp-account-card,.rp-product-frame){background:#fff!important;border:1px solid var(--rs-line)!important;border-radius:8px;box-shadow:none!important}.royal-public .rp-feature-grid{gap:16px}.royal-public .rp-feature-grid article{padding:22px}.royal-public .rp-start{border-radius:8px;background:#172a43!important;padding:30px}.royal-public .rp-price-grid article{padding:26px}.royal-public .rp-price-annual{border-color:#a18140!important}.royal-public .rp-button{min-height:44px;font-size:14px}.royal-public .rp-mini-action{background:var(--rs-gold)}
.royal-access-page .royal-access-header{background:var(--rs-bg)!important;border-color:var(--rs-line)}.royal-access-page .royal-access-layout{gap:24px;margin-top:28px}.royal-access-page .royal-access-card{background:#fff!important;border:1px solid var(--rs-line)!important;border-radius:8px;padding:30px;box-shadow:none!important}.royal-access-page .royal-access-story{background:#172a43!important;border-radius:8px;padding:32px}.royal-access-page .royal-access-card-heading h1,.royal-access-page .royal-access-card-heading h2{font-size:30px}.royal-access-page .role-card{border:1px solid var(--rs-line);border-radius:7px;padding:17px;background:#fff}.royal-access-page .role-card:has(input:checked){border-color:#a18140;background:#faf8f2}.royal-access-page .royal-access-tabs{border-color:var(--rs-line)}.royal-access-page .royal-access-features{gap:16px}.royal-access-page .button{min-height:44px;font-size:14px;padding:12px 18px}
@media(max-width:1050px){.royal-compact .royal-primarybar>nav{gap:17px}.royal-compact .royal-primarybar nav :is(button,a){font-size:12px}.royal-compact .royal-kpi-strip>div{padding:0 16px}.royal-compact .royal-kpi-strip strong{font-size:25px}.royal-public .rp-hero{gap:24px}}
@media(max-width:800px){.royal-compact .project-list-table td{padding:0;border:0}.royal-compact .project-list-table tbody tr{background:#fff!important}.royal-compact .project-list-table td:before{font-size:12px}.royal-compact .project-list-table-wrap{border:0!important;background:none!important}.royal-compact .project-list-summary>div{padding:12px 10px}}
@media(max-width:700px){body.royal-compact{font-size:14px}.royal-compact #app>header,.royal-compact .project-module>header,.royal-compact .royal-dashboard-head{align-items:flex-start;gap:14px;padding-bottom:16px;margin-bottom:18px}.royal-compact #app>header h1,.royal-compact .project-module>header h1,.royal-compact .royal-dashboard-head h1{font-size:29px}.royal-compact #app>header p,.royal-compact .royal-dashboard-head p{font-size:13px!important}.royal-compact .royal-primarybar nav :is(button,a){min-height:44px;font-size:12px;padding:12px 0}.royal-compact #app :is(button,.button):not(.royal-row-select):not(.project-list-name):not(.rde-paper button){min-height:44px}.royal-compact #app :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not(.rde-paper input):not(.rde-paper select):not(.rde-paper textarea),.royal-compact dialog :is(input,select,textarea):not([type=checkbox]):not([type=radio]),.landing :is(input,select,textarea):not([type=checkbox]):not([type=radio]),.royal-access-page input{font-size:16px}.royal-compact .royal-kpi-strip{padding:16px 0}.royal-compact .royal-kpi-strip>div{padding:0 12px}.royal-compact .royal-kpi-strip small{font-size:12px!important}.royal-compact .royal-kpi-strip strong{font-size:23px}.royal-compact #app>.panel{padding:16px}.royal-compact .royal-panel-heading,.royal-compact .royal-context-heading{padding:16px}.royal-compact .royal-documents-scroll{overflow-x:auto}.royal-compact #app>.cards{gap:10px}.royal-compact #app>.cards>.card{padding:16px}.royal-compact #app>.cards>.card strong{font-size:26px!important}.landing:not(.royal-public):not(.comm-page),.admin{padding:22px 16px}.landing:not(.royal-public) h1,.admin h1{font-size:29px}.royal-community .comm-hero h1{font-size:29px}.royal-community .comm-columns{gap:16px}.royal-community :is(.comm-panel,.comm-post,.comm-member,.comm-rules){padding:16px}.royal-community .comm-thread-head,.royal-community .comm-message-compose{padding:14px}.royal-community .comm-tabs{overflow-x:auto}.royal-community .comm-tabs a{white-space:nowrap;min-height:44px}.royal-public .rp-hero{padding:28px 0}.royal-public .rp-hero h1{font-size:36px}.royal-public .rp-section{padding:28px 0}.royal-public .rp-section-heading h2{font-size:28px}.royal-public .rp-start{padding:24px}.royal-public .rp-feature-grid article{padding:19px}.royal-access-page .royal-access-layout{gap:18px;margin-top:20px}.royal-access-page .royal-access-card{padding:22px}.royal-access-page .royal-access-story{padding:25px}.royal-access-page .royal-access-card-heading h1,.royal-access-page .royal-access-card-heading h2{font-size:28px}}
@media(prefers-reduced-motion:reduce){.royal-compact button{transition:none}}
}
@media screen{
.royal-compact #app :is(input,select):not([type=checkbox]):not([type=radio]):not(.rde-paper input):not(.rde-paper select),.royal-compact dialog :is(input,select):not([type=checkbox]):not([type=radio]),.landing :is(input,select):not([type=checkbox]):not([type=radio]),.royal-access-page input{min-height:44px}
.royal-community .comm-filter{align-items:center;gap:14px}.royal-community .comm-filter form{align-items:center;gap:10px}.royal-community .comm-filter :is(input,select,button){margin:0;min-height:44px;height:44px;font-size:14px!important}.royal-community .comm-filter :is(input,select){padding:9px 12px!important}.royal-community .comm-tabs button{min-height:44px;font-size:13px;padding:12px 0}.royal-community .comm-actions button,.royal-community .comm-message-layout button{min-height:40px;font-size:13px}
@media(max-width:700px){.royal-community .comm-filter :is(input,select){font-size:16px!important}.royal-community .comm-actions button,.royal-community .comm-message-layout button{min-height:44px}}
}
@media screen{.royal-compact .royal-documents-scroll{position:relative;max-width:100%;min-width:0;overflow-x:auto}.royal-compact .royal-documents-scroll .royal-sr{left:0;top:0}.royal-compact .royal-dashboard-grid>*{min-width:0}.royal-compact .project-list-table-wrap{position:relative}}
