:root {
  --pdlab-primary: #155eef;
  --pdlab-primary-dark: #0d46bc;
  --pdlab-ink: #132238;
  --pdlab-muted: #667085;
  --pdlab-border: #e7ebf1;
  --pdlab-bg: #f6f8fb;
  --pdlab-radius: 18px;
  --pdlab-shadow: 0 14px 45px rgba(16, 40, 75, .08);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  color: var(--pdlab-ink);
  background: var(--pdlab-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.app-body { min-height: 100vh; display: flex; flex-direction: column; }
.app-main { flex: 1; }
a { color: var(--pdlab-primary); }
.btn { border-radius: 10px; font-weight: 650; padding: .65rem 1rem; }
.btn-primary { background: var(--pdlab-primary); border-color: var(--pdlab-primary); }
.btn-primary:hover { background: var(--pdlab-primary-dark); border-color: var(--pdlab-primary-dark); }
.form-control, .form-select { min-height: 46px; border-color: #dce2ea; border-radius: 10px; }
.form-control:focus, .form-select:focus { border-color: #84adff; box-shadow: 0 0 0 .22rem rgba(21,94,239,.1); }
.form-label { font-size: .875rem; font-weight: 650; color: #344054; }
.navbar { min-height: 78px; }
.navbar-brand img { display: block; max-height: 48px; width: auto; }
.nav-link { color: #475467; font-weight: 600; border-radius: 9px; padding: .6rem .75rem !important; }
.nav-link:hover { color: var(--pdlab-primary); background: #f2f6ff; }
.user-menu { display: flex; align-items: center; gap: .55rem; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto; background: #eaf0ff; color: var(--pdlab-primary); font-size: .75rem; font-weight: 800;
}
.avatar-lg { width: 56px; height: 56px; font-size: 1rem; }
.avatar-xl { width: 76px; height: 76px; font-size: 1.3rem; }
.eyebrow { display: block; color: var(--pdlab-primary); font-size: .75rem; font-weight: 800; letter-spacing: .12em; }
.page-heading h1 { margin: .35rem 0 .35rem; font-size: clamp(1.8rem, 4vw, 2.55rem); font-weight: 760; letter-spacing: -.035em; }
.page-heading p { margin: 0; color: var(--pdlab-muted); }
.back-link { display: inline-flex; gap: .5rem; align-items: center; color: var(--pdlab-muted); text-decoration: none; font-size: .875rem; font-weight: 650; }
.back-link:hover { color: var(--pdlab-primary); }
.panel { background: #fff; border: 1px solid var(--pdlab-border); border-radius: var(--pdlab-radius); box-shadow: 0 4px 16px rgba(16,40,75,.025); overflow: hidden; }
.panel-header { padding: 1.4rem 1.5rem; }
.panel-header h2 { margin: 0; font-size: 1.08rem; font-weight: 750; }
.panel-header p { margin: .2rem 0 0; color: var(--pdlab-muted); font-size: .875rem; }
.panel-body { padding: 1.5rem; }
.panel-footer { padding: 1rem 1.5rem; background: #fbfcfe; border-top: 1px solid var(--pdlab-border); }
.filters { padding: 1.4rem 1.5rem; }
.table { --bs-table-bg: transparent; }
.table thead th { padding: .8rem 1.5rem; background: #f9fafb; color: #667085; border-bottom-color: var(--pdlab-border); font-size: .73rem; text-transform: uppercase; letter-spacing: .045em; white-space: nowrap; }
.table tbody td { padding: 1rem 1.5rem; border-color: #eef1f5; color: #344054; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfcff; }
.member-cell { display: flex; align-items: center; gap: .75rem; min-width: 210px; }
.member-cell strong, .member-cell small { display: block; }
.member-cell small { color: var(--pdlab-muted); margin-top: .15rem; }
.status { display: inline-flex; align-items: center; gap: .42rem; width: max-content; padding: .32rem .62rem; border-radius: 100px; font-size: .76rem; font-weight: 750; white-space: nowrap; }
.status i { font-size: .42rem; }
.status-success { color: #067647; background: #ecfdf3; }
.status-warning { color: #b54708; background: #fffaeb; }
.status-danger { color: #b42318; background: #fef3f2; }
.empty-state { padding: 3rem !important; text-align: center; color: var(--pdlab-muted) !important; }
.stat-card { height: 100%; min-height: 112px; display: flex; align-items: center; gap: .9rem; background: #fff; border: 1px solid var(--pdlab-border); border-radius: 16px; padding: 1.1rem; }
.stat-card strong, .stat-card span { display: block; }
.stat-card strong { font-size: 1.65rem; line-height: 1; }
.stat-card div > span { margin-top: .4rem; color: var(--pdlab-muted); font-size: .78rem; }
.dashboard-link { position: relative; color: inherit; text-decoration: none; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.dashboard-link:hover { color: inherit; transform: translateY(-2px); border-color: #bfd0f5; box-shadow: 0 10px 28px rgba(16,40,75,.08); }
.dashboard-link-arrow { margin-left: auto; color: #98a2b3; font-size: .8rem; transition: transform .18s ease, color .18s ease; }
.dashboard-link:hover .dashboard-link-arrow { color: var(--pdlab-primary); transform: translateX(3px); }
.membership-summary-card { height: 100%; min-height: 112px; padding: .9rem 1rem; background: #fff; border: 1px solid var(--pdlab-border); border-radius: 16px; }
.membership-summary-title { display: flex; align-items: center; gap: .5rem; color: #475467; font-size: .78rem; font-weight: 750; }
.membership-summary-title i { color: var(--pdlab-primary); }
.membership-summary-links { display: grid; grid-template-columns: repeat(3,1fr); gap: .35rem; margin-top: .7rem; }
.membership-summary-links a { padding: .35rem; border-radius: 9px; color: inherit; text-align: center; text-decoration: none; }
.membership-summary-links a:hover { background: #f2f6ff; color: var(--pdlab-primary); }
.membership-summary-links strong, .membership-summary-links span { display: block; }
.membership-summary-links strong { font-size: 1.15rem; line-height: 1; }
.membership-summary-links span { margin-top: .3rem; color: var(--pdlab-muted); font-size: .62rem; line-height: 1.15; }
.stat-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; flex: 0 0 auto; }
.stat-icon.blue { color: #155eef; background: #eff4ff; }.stat-icon.cyan { color:#0788a5;background:#ecfdff;}.stat-icon.violet{color:#6938ef;background:#f4f3ff}.stat-icon.green{color:#079455;background:#ecfdf3}.stat-icon.amber{color:#dc6803;background:#fffaeb}
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: #98a2b3; z-index: 2; }
.input-icon .form-control { padding-left: 2.75rem; }
.password-toggle { position: absolute; right: .65rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #667085; padding: .4rem; z-index: 3; }
.login-page { min-height: calc(100vh - 78px); display: flex; align-items: center; padding: 3rem 0; background: radial-gradient(circle at 8% 0%, #e7efff, transparent 32%), var(--pdlab-bg); }
.min-vh-75 { min-height: 72vh; }
.login-shell { border-radius: 24px; box-shadow: var(--pdlab-shadow); border: 1px solid rgba(255,255,255,.7); }
.login-intro { position: relative; min-height: 600px; padding: 4rem; align-items: flex-end; color: #fff; background: linear-gradient(145deg, #0a358a, #2563eb); }
.login-brand { position: absolute; top: 3.5rem; left: 4rem; }
.login-brand img { display: block; width: 210px; height: auto; filter: brightness(0) invert(1); opacity: .96; }
.login-intro h1 { max-width: 480px; margin: .7rem 0 1rem; font-size: 2.6rem; line-height: 1.08; font-weight: 760; letter-spacing: -.04em; }
.login-intro p { max-width: 430px; color: rgba(255,255,255,.78); }
.login-intro a { color: #fff; text-decoration: none; font-weight: 700; }
.login-intro .eyebrow { color: #b9d2ff; }
.login-form-wrap { padding: 4.5rem 4rem; }
.login-form-wrap h2 { font-size: 2rem; font-weight: 760; }
.form-section-title { margin: 2rem 0 1rem; padding-top: 1.4rem; border-top: 1px solid var(--pdlab-border); font-size: .82rem; color: #475467; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; }
.form-section-title:first-child { margin-top: 0; padding-top: 0; border: 0; }
.timeline { position: relative; }
.timeline-item { position: relative; padding: 0 0 1.5rem 1.5rem; border-left: 1px solid #e4e7ec; }
.timeline-item:last-child { padding-bottom: 0; border-color: transparent; }
.timeline-dot { position: absolute; left: -6px; top: 4px; width: 11px; height: 11px; border-radius: 50%; box-shadow: 0 0 0 4px #fff; }
.timeline-dot.paid { background: #12b76a; }.timeline-dot.pending { background:#f79009; }
.timeline-item small { color: var(--pdlab-muted); }.timeline-item p { margin: .35rem 0 0; font-size: .78rem; color: var(--pdlab-muted); }
.summary-list { margin: 0; }
.summary-list > div { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid #eef1f5; }
.summary-list > div:last-child { border-bottom: 0; }
.summary-list dt { color: var(--pdlab-muted); font-weight: 500; }.summary-list dd { margin: 0; text-align: right; font-weight: 650; }
.membership-hero { position: relative; min-height: 300px; overflow: hidden; display: flex; align-items: center; border-radius: 22px; padding: clamp(1.6rem,4vw,3rem); }
.membership-hero.is-active { background: linear-gradient(135deg,#eafbf3,#f7fffb); border: 1px solid #b7ebcf; }
.membership-hero.is-due { background: linear-gradient(135deg,#fff8e8,#fffdf7); border: 1px solid #f4dc9b; }
.membership-copy { position: relative; z-index: 2; max-width: 590px; }
.membership-copy h2 { margin: 1rem 0 .6rem; font-size: clamp(1.7rem,4vw,2.35rem); font-weight: 760; letter-spacing: -.03em; }
.membership-copy p { color: #475467; }
.membership-mark { position: absolute; right: 4%; bottom: -18%; font-size: 13rem; color: rgba(21,94,239,.08); transform: rotate(-8deg); }
.days-count { display: flex; align-items: baseline; gap: .65rem; margin-top: 1.5rem; }
.days-count strong { font-size: 3rem; line-height: 1; }.days-count span { color: var(--pdlab-muted); }
.profile-summary { text-align: center; }.profile-summary h3 { margin: .8rem 0 .2rem; font-size: 1.15rem; }.profile-summary > p { color: var(--pdlab-muted); font-size: .875rem; }
.support-card { display: flex; gap: 1rem; padding: 1.4rem; border-radius: 16px; background: #eef4ff; color: #1849a9; }
.support-card > i { font-size: 1.5rem; }.support-card strong { display:block; }.support-card p { margin:.3rem 0 .6rem; color:#475467; font-size:.85rem; }.support-card a { font-weight:700; text-decoration:none; font-size:.85rem; }
.modal-content { border-radius: 18px; box-shadow: var(--pdlab-shadow); }
.event-list { display: grid; gap: .75rem; }
.event-row, .event-card { display: flex; align-items: center; gap: 1rem; }
.event-row { padding: 1rem; border: 1px solid var(--pdlab-border); border-radius: 14px; }
.event-row .event-info { flex: 1; }
.event-date { width: 58px; height: 64px; flex: 0 0 auto; display: grid; place-content: center; text-align: center; border-radius: 13px; color: var(--pdlab-primary); background: #eef4ff; line-height: 1; }
.event-date strong { font-size: 1.55rem; }.event-date span { margin-top: .25rem; font-size: .65rem; font-weight: 800; letter-spacing: .08em; }
.event-info h3, .event-info h2 { margin: .2rem 0 .35rem; font-size: 1.05rem; font-weight: 740; }
.event-info p { margin: 0; color: var(--pdlab-muted); font-size: .82rem; }
.event-type { color: var(--pdlab-primary); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.event-card { height: 100%; align-items: flex-start; padding: 1.4rem; }
.event-card .event-info { flex: 1; }.event-card .event-info h2 { font-size: 1.25rem; }
.event-description { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--pdlab-border); color: #475467; font-size: .9rem; }
footer { background: transparent; }

@media (max-width: 991.98px) {
  .navbar-collapse { padding: 1rem 0; }
  .login-form-wrap { padding: 3rem 2rem; }
  .table thead th, .table tbody td { padding-left: 1rem; padding-right: 1rem; }
}
@media (max-width: 575.98px) {
  .app-main .container { padding-left: 1rem; padding-right: 1rem; }
  .login-page { padding: 1rem 0; align-items: flex-start; }
  .login-shell { border-radius: 18px; }
  .login-form-wrap { padding: 2.3rem 1.3rem; }
  .membership-hero { min-height: 360px; align-items: flex-start; }
  .membership-mark { font-size: 9rem; }
}

/* --------------------------------------------------------------------------
   PDlab visual language
   Palette ricavata dal logo originale: RGB 96, 153, 171.
   -------------------------------------------------------------------------- */
:root {
  --pdlab-primary: #6099ab;
  --pdlab-primary-dark: #477b8c;
  --pdlab-ink: #2c414a;
  --pdlab-muted: #748187;
  --pdlab-border: #dde3e5;
  --pdlab-bg: #f2f4f5;
  --pdlab-radius: 10px;
  --pdlab-shadow: 0 18px 50px rgba(40, 62, 71, .08);
}

body {
  font-family: "Manrope", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: -.01em;
  background:
    linear-gradient(90deg, rgba(96,153,171,.035) 1px, transparent 1px) 0 0 / 42px 42px,
    var(--pdlab-bg);
}

h1, .login-form-wrap h2, .membership-copy h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
}

a { color: var(--pdlab-primary-dark); }

.app-header {
  position: relative;
  z-index: 20;
  box-shadow: 0 1px 0 rgba(44,65,74,.04);
}

.navbar {
  min-height: 72px;
  background: rgba(255,255,255,.97) !important;
}

.navbar-brand img { max-height: 43px; }

.nav-link {
  color: #58676d;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.nav-link:hover {
  color: var(--pdlab-primary-dark);
  background: rgba(96,153,171,.08);
}

.dropdown-menu {
  padding: .55rem;
  border-radius: 8px;
}

.dropdown-item {
  border-radius: 6px;
  font-size: .75rem;
}

.btn {
  min-height: 39px;
  padding: .56rem 1.05rem;
  border-radius: 999px;
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.btn-sm {
  min-height: 32px;
  padding: .38rem .75rem;
  font-size: .63rem;
}

.btn-lg {
  min-height: 47px;
  font-size: .76rem;
}

.btn-primary {
  background-color: var(--pdlab-primary);
  border-color: var(--pdlab-primary);
  box-shadow: 0 8px 20px rgba(96,153,171,.2);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--pdlab-primary-dark);
  border-color: var(--pdlab-primary-dark);
}

.btn-dark {
  background: #344f5a;
  border-color: #344f5a;
}

.btn-outline-secondary {
  color: #51646c;
  border-color: #cbd4d7;
}

.form-control,
.form-select {
  min-height: 42px;
  border-color: #d7dfe2;
  border-radius: 7px;
  background-color: #fcfdfd;
  color: var(--pdlab-ink);
  font-size: .76rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--pdlab-primary);
  box-shadow: 0 0 0 .2rem rgba(96,153,171,.12);
}

.form-label {
  margin-bottom: .38rem;
  color: #4a5b62;
  font-size: .68rem;
  letter-spacing: .025em;
}

.page-heading h1 {
  margin-top: .2rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.025em;
}

.page-heading p {
  max-width: 680px;
  font-size: .78rem;
}

.eyebrow {
  color: var(--pdlab-primary-dark);
  font-size: .62rem;
  letter-spacing: .16em;
}

.back-link {
  color: #7b888d;
  font-size: .66rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.app-main > .container { max-width: 1240px; }

.panel {
  border-color: var(--pdlab-border);
  border-radius: var(--pdlab-radius);
  box-shadow: 0 8px 30px rgba(40,62,71,.035);
}

.panel::before {
  display: block;
  width: 100%;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--pdlab-primary), rgba(96,153,171,0));
}

.panel-header { padding: 1.15rem 1.3rem; }

.panel-header h2 {
  color: #334d58;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
}

.panel-header p { font-size: .7rem; }
.panel-body { padding: 1.3rem; }
.panel-footer { padding: .85rem 1.3rem; }
.filters { padding: 1.15rem 1.3rem; }

.stat-card,
.membership-summary-card {
  min-height: 96px;
  border-radius: 8px;
  border-color: #dce3e5;
  box-shadow: 0 6px 24px rgba(40,62,71,.035);
}

.stat-card { padding: .9rem 1rem; }

.stat-card strong { color: #304a55; font-size: 1.45rem; font-weight: 600; }
.stat-card div > span { font-size: .66rem; letter-spacing: .02em; }

.stat-icon {
  width: 39px;
  height: 39px;
  border-radius: 50%;
}

.stat-icon.blue,
.stat-icon.cyan,
.stat-icon.violet {
  color: var(--pdlab-primary-dark);
  background: rgba(96,153,171,.11);
}

.stat-icon.green {
  color: #4d7f70;
  background: #edf5f1;
}

.stat-icon.amber {
  color: #a77a42;
  background: #f8f2e9;
}

.membership-summary-card { padding: .75rem .9rem; }
.membership-summary-title { font-size: .66rem; }
.membership-summary-links strong { color: #304a55; font-size: 1rem; }
.membership-summary-links span { font-size: .56rem; }

.table thead th {
  padding: .72rem 1.25rem;
  background: #f5f7f7;
  color: #77858a;
  font-size: .6rem;
  letter-spacing: .075em;
}

.table tbody td {
  padding: .82rem 1.25rem;
  color: #4c5e65;
  font-size: .72rem;
}

.member-cell { min-width: 195px; }
.member-cell strong { color: #354d57; font-size: .73rem; font-weight: 650; }
.member-cell small { font-size: .62rem; }

.avatar {
  width: 34px;
  height: 34px;
  color: #fff;
  background: linear-gradient(145deg, #79adbc, #527f8e);
  font-size: .64rem;
}

.status {
  padding: .28rem .55rem;
  font-size: .61rem;
  letter-spacing: .02em;
}

.status-success { color: #477668; background: #edf5f1; }
.status-warning { color: #946c3b; background: #faf3e9; }
.status-danger { color: #9b5656; background: #faeeee; }

.login-page {
  background:
    radial-gradient(circle at 12% 10%, rgba(96,153,171,.16), transparent 30%),
    linear-gradient(135deg, #eef2f3, #f8f9f9);
}

.login-shell {
  border: 0;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(41,62,70,.13);
}

.login-intro {
  background:
    linear-gradient(155deg, rgba(43,72,83,.96), rgba(96,153,171,.94));
}

.login-brand img { width: 195px; }

.login-intro h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.65rem;
  font-weight: 600;
  line-height: 1;
}

.login-intro p,
.login-form-wrap > p { font-size: .76rem; }

.login-form-wrap h2 {
  color: #2c414a;
  font-size: 2.25rem;
  line-height: 1;
}

.membership-hero {
  border-radius: 10px;
}

.membership-hero.is-active {
  background: linear-gradient(135deg, #f0f6f4, #fbfdfc);
  border-color: #cfdfd9;
}

.membership-hero.is-due {
  background: linear-gradient(135deg, #f8f4ee, #fdfcf9);
  border-color: #e5d7c1;
}

.support-card {
  border: 1px solid rgba(96,153,171,.2);
  border-radius: 8px;
  background: rgba(96,153,171,.08);
  color: #426d7b;
}

.modal-content { border-radius: 10px; }
.modal-header, .modal-footer { border-color: #e5eaeb; }
.modal-title { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; }

.form-section-title {
  color: var(--pdlab-primary-dark);
  font-size: .61rem;
  letter-spacing: .12em;
}

footer { font-size: .67rem; }

@media (max-width: 767.98px) {
  body { font-size: 12.5px; }
  .navbar { min-height: 64px; }
  .page-heading h1 { font-size: 2.15rem; }
  .panel-header, .panel-body, .filters { padding-left: 1rem; padding-right: 1rem; }
}
