/* ERRE APPALTI — visual identity, shared by the portal and client sign-in. */
:root {
  --brand: #b30078;
  --brand-hover: #940063;
  --brand-soft: #faedf6;
  --ink: #231c3e;
  --muted: #6b687c;
  --line: #e6e4ed;
  --bg: #f6f6fa;
  --navy: #231c3e;
  --red: var(--brand);
  --red-soft: var(--brand-soft);
  --green: #287660;
}
body { background: var(--bg); color: var(--ink); }
button, a, input, select { transition: background-color .15s, border-color .15s, box-shadow .15s; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #c100854d; outline-offset: 3px;
}
input, select { border-color: #dedbe7; border-radius: 9px; color: var(--ink); }
input:hover, select:hover { border-color: #bcb4cc; }
input:focus, select:focus { border-color: var(--brand); }
.sidebar {
  background: linear-gradient(180deg,#fff 0%,#fff 72%,#faf7fc 100%);
  border-right-color: var(--line); padding-top: 30px;
}
.brand { padding: 0 3px 5px; }
.workspace { margin: 28px 0 27px; background: #f9f8fc; border-color: #ebe7f0; border-radius: 11px; }
.workspace-icon { background: #efe7f3; color: #773d7d; border: 1px solid #e6d7eb; }
.workspace small, .profile small { color: var(--muted); }
.nav-label { color: #81738f; font-size: 9px; letter-spacing: 1.6px; }
nav { gap: 6px; }
nav button { min-height: 45px; border-radius: 9px; color: #706b7e; font-size: 13px; padding: 12px 14px; }
nav button.active { color: #980068; background: var(--brand-soft); box-shadow: inset 3px 0 var(--brand); font-weight: 700; }
nav button:hover:not(.active) { color: var(--ink); background: #f4f2f8; }
nav button .nav-count { border-color: #e4dce9; background: #fff; }
.sidebar-note { background: #f5f2f9; border-color: #e9e2f0; }
.sidebar-note p { color: var(--muted); }
.note-icon { color: var(--brand); background: #f1dff0; }
.plan-link { color: #6e607d; border-bottom-color: var(--line); }
.plan-link:hover { color: var(--brand); }
.profile { padding: 5px 0; }
.avatar { background: #f1eaf5; border-color: #e1d6e9; color: #6b3f80; }
.topbar { height: 72px; border-bottom-color: var(--line); }
.breadcrumb { color: #8c8298; }
.breadcrumb strong { color: var(--ink); font-weight: 600; }
.private-pill { border: 1px solid #e7e0ee; background: #faf8fc; border-radius: 20px; padding: 5px 10px; color: #6e5d7b; }
.header-date { color: #81758d; }
.demo-banner { background: #f0eef7; color: #746783; border-bottom-color: #e5e0ee; padding-top: 11px; padding-bottom: 11px; }
.demo-tag { background: #e3dcef; color: #65427c; border-radius: 4px; }
.demo-banner button { color: #755186; font-weight: 600; }
main { padding-top: 32px; }
.page-heading { margin-bottom: 26px; }
.page-heading .eyebrow { color: #9e237d; letter-spacing: 1.6px; font-weight: 700; font-size: 9px; }
.page-heading h1 { color: var(--ink); font-weight: 800; letter-spacing: -1.2px; font-size: clamp(25px,2.35vw,33px); }
.page-heading p:not(.eyebrow) { font-size: 12px; color: var(--muted); line-height: 1.7; }
.button { min-height: 42px; padding: 10px 15px; font-size: 12px; border-color: #dfdbe7; border-radius: 9px; color: #514563; }
.button:hover { background: #faf7fc; border-color: #c6b7d1; }
.button.primary { color: #fff; background: var(--brand); border-color: var(--brand); box-shadow: 0 3px 8px #b3007812; }
.button.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.button:disabled { box-shadow: none; }
.stats { gap: 14px; margin-bottom: 28px; }
.stat { border-color: var(--line); border-radius: 12px; padding: 18px 19px; box-shadow: 0 3px 12px #231c3e03; }
.stat-top { color: #776782; font-size: 11px; line-height: 1.5; }
.stat-top svg { color: #a08aaa; width: 17px; height: 17px; }
.stat-number { color: var(--ink); font-size: 30px; margin-top: 10px; line-height: 1.3; }
.stat-caption { color: #796b85; font-size: 10px; }
.stat-foot { color: #796b85; font-size: 10px; margin-top: 7px; line-height: 1.5; }
.stat.accent { background: #fff9fc; border-color: #f0d3e6; }
.stat.accent .stat-number { color: var(--brand); }
.search-layout { grid-template-columns: 224px minmax(0,1fr); gap: 24px; }
.filters { border-radius: 12px; border-color: var(--line); padding: 18px; box-shadow: 0 3px 12px #231c3e03; }
.filter-top { border-bottom-color: var(--line); padding-bottom: 16px; }
.filter-top strong { font-size: 13px; }
.filter-top button { color: #9b548c; font-size: 10px; }
.filter-field { margin-top: 19px; }
.filter-field label { font-size: 11px; color: #64536f; font-weight: 600; line-height: 1.6; }
.filter-field input, .filter-field select { font-size: 12px; min-height: 43px; background: #fcfbfe; }
.check-line { color: #72657d; line-height: 1.6; }
.filters .button { width: 100%; margin-top: 10px; }
.filter-bottom { color: #75657f; font-size: 10px; line-height: 1.7; }
.content-toolbar { gap: 10px; margin-bottom: 17px; }
.search-box input { border-radius: 10px; min-height: 47px; background: #fff; font-size: 13px; box-shadow: 0 2px 8px #231c3e03; }
.search-box svg { color: #a08baa; }
.sort-select { font-size: 12px; min-height: 47px; border-radius: 10px; }
.category-tabs { gap: 6px; padding-bottom: 10px; margin-bottom: 17px; border-bottom-color: var(--line); flex-wrap: wrap; }
.category-tabs button { padding: 9px 12px; border: 1px solid transparent; border-radius: 8px; font-size: 12px; color: #81718e; gap: 7px; min-height: 38px; }
.category-tabs button:hover { background: #efebf5; }
.category-tabs button.selected { border-color: #edd0e3; background: #fff3fb; color: #9c006b; }
.tab-count { font-size: 10px; padding: 1px 6px; background: #eae6f0; color: #8b7995; }
.category-tabs button.selected .tab-count { color: #a10070; background: #f3ddec; }
.results-top { color: #7c6a88; font-size: 11px; margin-bottom: 13px; }
.results-top strong { color: #6c527c; font-weight: 600; }
.results-top span:last-child { font-size: 10px; }
.result-list { grid-template-columns: 1fr; gap: 14px; }
.tender-card { position: relative; padding: 22px; margin: 0; border: 1px solid #e4dfeb; border-radius: 13px; box-shadow: 0 3px 12px #231c3e03; min-width: 0; }
.tender-card:hover { border-color: #d3bddc; box-shadow: 0 7px 22px #3c155409; }
.tender-card.due-soon { border-left: 3px solid #ca8c35; padding-left: 20px; }
.card-top { gap: 8px; margin-bottom: 14px; }
.badge { font-size: 9px; border-radius: 5px; padding: 4px 8px; letter-spacing: .6px; }
.badge.Lavori { color: #946321; background: #fcf2df; }
.badge.Servizi { color: #427c6e; background: #edf5f0; }
.badge.Forniture { color: #576d9a; background: #edf0fa; }
.badge.Misto { color: #82578c; background: #f3edf7; }
.new-badge { color: #43806a; font-size: 9px; }
.demo-mini { color: #766182; font-size: 9px; }
.bookmark { min-width: 34px; min-height: 34px; border: 1px solid #eee8f2; border-radius: 8px; color: #a595ae; }
.bookmark:hover { background: #fbf0f8; color: var(--brand); }
.bookmark.saved { background: #fcf0f8; color: var(--brand); border-color: #f1cce5; }
.bookmark.saved svg { fill: #f4d6eb; }
.card-entity { font-size: 11px; color: #75657f; line-height: 1.6; margin: 0 0 6px; }
.card-title, .award-card .card-title { font-size: 15px; line-height: 1.6; font-weight: 750; color: #2d2243; letter-spacing: -.2px; }
.card-title:hover { color: var(--brand); }
.card-meta { margin-top: 13px; font-size: 10px; color: #7b6887; gap: 15px; flex-wrap: wrap; line-height: 1.5; }
.card-meta span { min-width: 0; }
.card-meta svg { color: #a489b0; width: 13px; height: 13px; flex-shrink: 0; }
.soa-card-label { color: #82598e; font-size: 10px; line-height: 1.6; }
p.soa-card-label { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 5px 10px; padding: 5px 9px; background: #f7f0fa; border: 1px solid #eee0f3; border-radius: 6px; margin: 13px 0 0; }
.soa-card-label strong { font-size: 11px; color: #684276; }
.card-bottom { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; gap: 18px; margin-top: 19px; padding-top: 17px; border-top-color: #eee9f2; align-items: end; }
.amount-label, .deadline-label { font-size: 9px; line-height: 1.6; font-weight: 500; letter-spacing: .4px; color: #7b6887; margin-bottom: 5px; }
.amount { font-size: 21px; line-height: 1.35; color: #322543; font-weight: 750; }
.card-deadline { margin-left: 0; }
.deadline-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; }
.deadline { font-size: 13px; line-height: 1.7; color: #655473; font-weight: 600; }
.deadline.urgent { color: #996724; }
.deadline-state { font-size: 9px; color: #71577e; background: #f3eef7; padding: 2px 6px; border-radius: 5px; white-space: nowrap; }
.deadline-state.soon { background: #fff1d9; color: #96601d; }
.deadline-state.past { background: #fce9e9; color: #aa4d56; }
.detail-link { min-height: 38px; border-radius: 8px; border: 1px solid #e9d8e7; background: #fdf7fb; padding: 7px 11px; margin: 0; font-size: 11px; color: #a0006d; gap: 10px; white-space: nowrap; }
.detail-link:hover { background: #faeaf5; border-color: #dcb1d0; }
.detail-link span { color: var(--brand); font-size: 17px; }
.award-winners { background: #faf7fc; border: 1px solid #eee6f4; padding: 12px 14px; border-radius: 8px; margin-top: 17px; }
.award-winners strong { color: #786187; font-size: 11px; }
.award-badge { background: #f1e8f7; color: #8c599c; }
.page-end { padding: 15px 0 4px; font-size: 11px; color: #95869f; }
.pagination button { border-radius: 7px; min-width: 34px; height: 34px; color: #7c648d; }
.pagination button.current { background: var(--navy); border-color: var(--navy); color: #fff; }
.panel { border-color: var(--line); border-radius: 13px; box-shadow: 0 3px 12px #231c3e03; }
.panel h2 { color: #483456; }
.notice { background: #fffaf2; border-color: #f0e3ce; color: #80663c; line-height: 1.8; }
.data-table th { background: #f7f4fa; color: #776383; }
.data-table td { color: #72617e; }
.data-table td, .data-table th { padding: 14px 12px; }
.data-table tbody tr:hover { background: #fdfbfe; }
.detail-dialog { background: #fbf9fd; }
.detail-info { border-color: var(--line); border-radius: 11px; }
.detail-section p { color: #766182; }
.source-symbol { background: #f1ebf7; color: #8d62a0; }
.footer { border-color: var(--line); color: #7d6b88; }
.email-login { background: radial-gradient(ellipse at 90% 0%,#f5ddee 0%,transparent 52%),radial-gradient(ellipse at 0% 95%,#e9e3f6 0%,transparent 50%),#f7f6fb; }
.email-login-card { border: 1px solid #e9deee; border-top: 3px solid var(--brand); border-radius: 20px; box-shadow: 0 20px 70px #4924540d; }
.email-login-card h1 { font-family: Manrope,Arial,sans-serif; font-size: 30px; letter-spacing: -1px; }
.email-login-card .eyebrow { color: #a4508e; }
.email-login-card input { border-radius: 10px; border-color: #e2d9ea; background: #fdfbff; }
.email-login-card .button { min-height: 48px; font-size: 13px; }
.email-login-card a { color: #a33687; }
@media (min-width:1800px) {
  .result-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .search-layout { grid-template-columns: 240px minmax(0,1fr); }
}
@media (max-width:1200px) {
  .search-layout { grid-template-columns: 200px minmax(0,1fr); gap: 19px; }
  .filters { padding: 15px; }
  .stat { padding: 16px; }
  .stat-top { font-size: 10px; }
  .stat-number { font-size: 27px; }
  .card-bottom { gap: 12px; }
  .amount { font-size: 19px; }
}
@media (max-width:980px) {
  .search-layout { grid-template-columns: 1fr; }
  .filters:not(.open) { display: none; }
  .filters.open { display: block; }
  .filter-field { margin-top: 15px; }
  .stat { padding: 14px 12px; }
  .stat-top { font-size: 10px; }
  .stat-number { font-size: 25px; }
  .stat-foot { font-size: 9px; }
}
@media (max-width:700px) {
  .topbar { height: 65px; padding: 0 16px; }
  .mobile-brand { width: 125px; }
  .private-pill { padding: 4px 7px; font-size: 8px; }
  main { padding: 24px 16px; }
  .page-heading h1 { font-size: 27px; line-height: 1.25; }
  .page-heading .eyebrow { font-size: 8px; letter-spacing: 1px; }
  .page-heading p:not(.eyebrow) { font-size: 11px; }
  .heading-actions { padding-top: 20px; gap: 6px; }
  .heading-actions .button { width: 38px; min-height: 40px; padding: 9px; font-size: 0; }
  .stats { gap: 10px; margin-bottom: 23px; }
  .stat { padding: 15px; }
  .stat-number { font-size: 27px; }
  .stat-top { font-size: 10px; }
  .stat-top svg { width: 15px; height: 15px; }
  .stat-foot { font-size: 9px; }
  .demo-banner { padding: 10px 16px; font-size: 9px; }
  .search-box input { font-size: 13px; }
  .mobile-filter-toggle { min-height: 43px; }
  .sort-select { min-height: 43px; }
  .category-tabs { gap: 4px; margin-top: 17px; }
  .category-tabs button { font-size: 11px; min-height: 40px; padding: 8px 10px; }
  .results-top { font-size: 10px; gap: 8px; flex-wrap: wrap; }
  .results-top span:last-child { font-size: 9px; }
  .tender-card { padding: 18px; border-radius: 12px; }
  .tender-card.due-soon { padding-left: 16px; }
  .card-top { margin-bottom: 12px; gap: 6px; }
  .badge { font-size: 8px; }
  .new-badge { font-size: 8px; }
  .demo-mini { font-size: 8px; }
  .bookmark { min-width: 36px; min-height: 36px; }
  .card-entity { font-size: 10px; }
  .card-title, .award-card .card-title { font-size: 14px; }
  .card-meta { font-size: 10px; gap: 8px 13px; }
  .card-bottom { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px 12px; padding-top: 15px; margin-top: 17px; }
  .amount-label, .deadline-label { font-size: 8px; }
  .amount { font-size: 19px; overflow-wrap: anywhere; }
  .deadline { font-size: 12px; }
  .detail-link { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; font-size: 12px; min-height: 42px; padding: 8px 12px; }
  .detail-link span { font-size: 18px; }
  .page-end { font-size: 10px; }
  .pagination button { min-width: 30px; height: 33px; }
  .panel { padding: 20px; }
  .customer-form input { min-width: 0; flex-basis: 100%; }
  .customer-form .button { width: 100%; }
  .email-login-card { padding: 30px 22px; }
  .email-login-card h1 { font-size: 28px; }
}
@media (max-width:700px) {
  .category-tabs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
  .category-tabs button { justify-content: center; padding: 8px 2px; gap: 4px; white-space: nowrap; }
  .category-tabs .tab-count { font-size: 9px; padding: 1px 4px; }
}
@media (max-width:380px) {
  .category-tabs button { font-size: 10px; gap: 3px; }
  .category-tabs .tab-count { font-size: 8px; padding: 1px 3px; }
}

/* Regional procurement directory */
.portal-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:24px}
.portal-overview>div{background:#fff;border:1px solid #e9e3ed;border-radius:16px;padding:22px}
.portal-overview strong{display:block;color:#231c3e;font-size:28px;line-height:1.2;margin-bottom:7px}.portal-overview span{color:#766c82;font-size:13px}
.portal-directory{margin-top:24px}.portal-directory-filters{display:grid;grid-template-columns:1fr 1.5fr 1fr auto;gap:14px;align-items:end;margin:24px 0 18px}.portal-directory-filters label{display:block;font-weight:600;font-size:13px;margin-bottom:8px}.portal-directory-filters input,.portal-directory-filters select{width:100%;min-height:46px;border:1px solid #ded8e5;background:#fff;border-radius:10px;padding:10px 12px;color:#231c3e;font:inherit;min-width:0}.portal-result-count{color:#766c82;font-size:13px;margin-bottom:16px}
.region-group{border:1px solid #e5deeb;border-radius:12px;margin:10px 0;overflow:hidden}.region-group>summary{cursor:pointer;padding:18px 20px;font-weight:700;color:#231c3e;display:flex;align-items:center;gap:14px;background:#faf8fc;list-style:none}.region-group>summary::before{content:'+';font-size:20px;font-weight:400;color:#b30078;min-width:14px}.region-group[open]>summary::before{content:'−'}.region-group>summary::-webkit-details-marker{display:none}.region-portal-count{margin-left:auto;font-size:12px;font-weight:500;color:#766c82;white-space:nowrap}.regional-portals-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.region-group .regional-portals-grid{padding:18px}
.regional-portal-card{border:1px solid #e9e3ed;border-radius:12px;padding:22px;background:#fff;min-width:0}.regional-portal-top{display:flex;flex-wrap:wrap;align-items:flex-start;gap:10px}.regional-portal-card h3{font-size:16px;margin:0;flex:1;min-width:160px;line-height:1.4}.regional-portal-card p{font-size:13px;color:#766c82;line-height:1.65;margin:12px 0}.regional-portal-card .portal-territory{color:#b30078;font-weight:600}.regional-portal-card .portal-import-meta{font-size:12px}.portal-links{display:flex;flex-wrap:wrap;align-items:center;gap:16px;margin-top:18px}.portal-links>a:not(.button){font-size:12px;color:#914b80}.regional-portal-card .portal-link-note{font-size:12px;color:#86602c}.source-sync-details,.national-portals,.source-reading{margin-top:24px}.source-sync-details>summary{cursor:pointer;color:#231c3e;font-weight:700;font-size:17px}.source-sync-body{padding-top:20px}.national-portals .regional-portals-grid{margin:22px 0}
@media(max-width:1100px){.portal-directory-filters{grid-template-columns:1fr 1fr}.regional-portals-grid{grid-template-columns:1fr}}
@media(max-width:650px){.portal-overview{grid-template-columns:1fr 1fr;gap:10px}.portal-overview>div{padding:16px}.portal-overview strong{font-size:22px}.portal-directory-filters{grid-template-columns:1fr}.region-group>summary{padding:16px 12px;font-size:14px}.region-group .regional-portals-grid{padding:10px}.regional-portal-card{padding:16px}.regional-portal-top{display:block}.regional-portal-top .status-tag{display:inline-block;margin-top:8px}.portal-links .button{width:100%;justify-content:center}}

/* TuttoGare directory filters */
.portal-directory-filters{grid-template-columns:1fr 1.4fr 1fr 1fr auto}.regional-portal-card .portal-platform{color:#a50077;font-weight:650;font-size:12px}
@media(max-width:1250px){.portal-directory-filters{grid-template-columns:1fr 1fr}.portal-directory-filters .button{justify-self:start}}
@media(max-width:650px){.portal-directory-filters{grid-template-columns:1fr}.portal-directory-filters .button{width:100%}}

.filters .territory-scope-label{margin-top:12px;font-size:11px;color:#766c82}
