:root { font-family: system-ui, sans-serif; color: #13213a; background: #f4f7fb; }
body { margin: 0; }
header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 2rem; background: #102b54; color: white; }
header div { display: flex; align-items: center; gap: 1rem; }
header nav { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; }
header nav a, header nav span { display: inline-flex; align-items: center; min-height: 2.5rem; box-sizing: border-box; padding: .45rem .75rem; border-radius: .5rem; }
header nav a { text-decoration: none; }
header nav a:hover, header nav a:focus-visible { background: #ffffff1f; text-decoration: underline; }
header nav span[aria-current="page"] { background: white; color: #102b54; font-weight: 700; }
button { border: 0; border-radius: .45rem; padding: .65rem .9rem; background: #1d5bb8; color: white; font-weight: 650; cursor: pointer; }
header button { background: white; color: #102b54; }
header a { color: white; }
main { max-width: 1200px; margin: auto; padding: 1.5rem; }
section { background: white; margin-bottom: 1.5rem; padding: 1.25rem; border-radius: .8rem; box-shadow: 0 .3rem 1.4rem #17345b10; }
h1, h2 { margin-top: 0; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 1rem; }
.metric { padding: 1rem; border-left: .3rem solid #1d5bb8; background: #f6f9fe; }
.metric strong { display: block; font-size: 1.7rem; }
.section-title { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
input { padding: .65rem; border: 1px solid #aab5c5; border-radius: .45rem; min-width: 16rem; }
select { padding: .65rem; border: 1px solid #aab5c5; border-radius: .45rem; min-width: 17rem; background: white; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .7rem; text-align: left; border-bottom: 1px solid #e1e6ee; }
.sites-page main { box-sizing: border-box; max-width: none; width: 100%; }
.sites-page .section-title > :last-child { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.sites-page .sites-list-table { min-width: 70rem; }
.sites-page .sites-list-table th,
.sites-page .sites-list-table td { white-space: nowrap; }
.sites-page .sites-list-table th:first-child,
.sites-page .sites-list-table td:first-child { white-space: normal; min-width: 12rem; }
.badge { display: inline-block; border-radius: 1rem; padding: .25rem .55rem; background: #e8edf5; }
.active { background: #dff5e6; color: #12642e; }
.pending { background: #fff0cc; color: #714b00; }
#message { min-height: 1.4rem; color: #9b1c1c; }
dialog { max-width: 38rem; width: calc(100% - 3rem); border: 0; border-radius: .8rem; box-shadow: 0 1rem 4rem #0004; }
dialog::backdrop { background: #10204099; }
.close { float: right; background: transparent; color: #13213a; font-size: 1.5rem; padding: 0; }
textarea { box-sizing: border-box; width: 100%; padding: .7rem; resize: none; }
dialog label { display: block; margin-top: 1rem; font-weight: 650; }
dialog input { box-sizing: border-box; width: 100%; }
#user-dialog select { box-sizing: border-box; width:100%; min-width:0; }
#user-form-message { min-height:1.4rem; color:#9b1c1c; }
#user-sites-count { margin:.4rem 0; color:#35516f; }
.user-sites-list { max-height:15rem; overflow-y:auto; border:1px solid #bdcce0; border-radius:.4rem; padding:.3rem .7rem; }
.user-sites-list label { display:flex; align-items:flex-start; gap:.5rem; margin:0; padding:.4rem 0; border-bottom:1px solid #edf1f6; font-weight:400; }
.user-sites-list label:last-child { border-bottom:0; }
.user-sites-list input[type="checkbox"] { width:auto; flex:none; margin:.2rem 0 0; }
.user-sites-list label[hidden] { display:none; }
#invitation-message { min-height:1.4rem; color:#9b1c1c; }
#invitation-dialog select { box-sizing:border-box; width:100%; min-width:0; }
.danger { background:#9b1c1c; }
.user-actions { display:flex; flex-wrap:wrap; gap:.4rem; }
.user-actions button.secondary { background:#e8eef9; color:#174ea6; }
#proposal-dialog { box-sizing: border-box; max-width: 58rem; max-height: 90vh; overflow-y: auto; padding: 1.25rem; }
#proposal-dialog select { box-sizing: border-box; width: 100%; min-width: 0; }
#original-proposal { margin: 1rem 0; padding: .8rem; background: #f3f6fb; border-radius: .5rem; }
#original-proposal summary { cursor: pointer; font-weight: 650; }
.proposal-summary { display: grid; grid-template-columns: minmax(8rem,1fr) minmax(0,2fr); gap: .5rem 1rem; }
.proposal-summary dt { font-weight: 650; }
.proposal-summary dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.proposal-summary dd p { margin: 0 0 .5rem; }
@media (max-width: 650px) { .proposal-summary { grid-template-columns: 1fr; } .proposal-summary dd { margin-bottom: .6rem; } }
@media (max-width: 650px) { header, .section-title { align-items: stretch; flex-direction: column; } header .header-navigation,header .header-account,header nav{align-items:stretch;flex-direction:column;width:100%}header nav a,header nav span{justify-content:center;width:100%} input { min-width: 0; } .sites-page .section-title > :last-child { align-items: stretch; flex-direction: column; } }
