/* FTV Euro 7 · interfaccia interna */

:root {
    --sap-brand:        #0a6ed1;
    --sap-brand-dark:   #0854a0;
    --sap-brand-light:  #eaf3fc;
    --sap-accent:       #f58b32;
    --sap-positive:     #188918;
    --sap-positive-bg:  #eaf7ea;
    --sap-critical:     #e76500;
    --sap-critical-bg:  #fff3e8;
    --sap-negative:     #bb0000;
    --sap-negative-bg:  #fdeaea;
    --sap-info:         #0a6ed1;
    --sap-info-bg:      #eaf3fc;
    --sap-neutral:      #556b82;
    --sap-neutral-bg:   #eef2f6;
    --sap-bg:           #eef1f5;
    --sap-bg-alt:       #f7f9fb;
    --sap-shell:        #1b2e44;
    --sap-shell-mid:    #24384f;
    --sap-shell-dark:   #142536;
    --sap-card:         #ffffff;
    --sap-line:         #dce3ea;
    --sap-line-strong:  #c9d4de;
    --sap-text:         #1d2d3e;
    --sap-text-muted:   #5b738b;
    --sap-text-light:   #8396a8;
    --sap-radius:       10px;
    --sap-radius-sm:    6px;
    --sap-radius-lg:    14px;
    --sap-shadow-1:     0 1px 2px rgba(20, 37, 54, .04), 0 1px 1px rgba(20, 37, 54, .03);
    --sap-shadow-2:     0 8px 24px rgba(20, 37, 54, .08);
    --sap-shadow-3:     0 18px 40px rgba(20, 37, 54, .12);
    --sap-font:         "IBM Plex Sans", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--sap-font);
    color: var(--sap-text);
    background: var(--sap-bg);
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--sap-brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4 { color: var(--sap-text); font-weight: 600; letter-spacing: -.02em; }
h1 { font-size: 26px; margin: 0 0 6px; }
h2 { font-size: 20px; margin: 0 0 6px; }
h3 { font-size: 16px; margin: 0 0 6px; }
.muted { color: var(--sap-text-muted); font-size: 13px; }
hr { border: 0; border-top: 1px solid var(--sap-line); margin: 18px 0; }

.sap-shell {
    display: grid;
    grid-template-columns: 248px 1fr;
    grid-template-rows: 56px 1fr;
    min-height: 100vh;
    background: var(--sap-bg);
}
.sap-topbar {
    grid-column: 1 / -1;
    background: linear-gradient(180deg, var(--sap-shell-dark) 0%, #112030 100%);
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 20px 0 16px;
    gap: 14px;
    box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 8px 24px rgba(0,0,0,.18);
    position: sticky;
    top: 0;
    z-index: 50;
}
.sap-topbar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .04em;
    white-space: nowrap;
}
.sap-topbar .brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--sap-brand) 0%, var(--sap-accent) 100%);
    box-shadow: 0 2px 8px rgba(10,110,209,.35);
    flex: 0 0 28px;
}
.sap-topbar .brand span { color: #9eb0c2; font-weight: 400; margin-left: 2px; font-size: 12px; letter-spacing: 0; }
.sap-topbar .spacer { flex: 1; }
.sap-topbar .breadcrumb {
    color: #c5d0dc;
    font-size: 13px;
    padding: 5px 12px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;
}
.sap-topbar .user { color: #d9e1ea; font-size: 13px; display: flex; align-items: center; gap: 12px; }
.sap-topbar .user .avatar {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--sap-brand), #3d8be0);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    box-shadow: 0 0 0 2px rgba(255,255,255,.12);
}
.sap-topbar .user a { color: #d9e1ea; }
.sap-topbar .user a:hover { color: #fff; text-decoration: none; }
.sap-topbar .logout {
    padding: 6px 12px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}
.sap-topbar .logout:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.28); }

.sap-sidebar {
    background: linear-gradient(180deg, var(--sap-shell) 0%, #162433 100%);
    color: #d9e1ea;
    padding: 12px 10px 28px;
    border-right: 1px solid rgba(0,0,0,.2);
    overflow-y: auto;
    max-height: calc(100vh - 56px);
}
.sap-sidebar .group {
    padding: 16px 12px 6px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #7e90a4;
    font-weight: 600;
}
.sap-sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin: 1px 0;
    color: #d3deea;
    font-size: 13.5px;
    line-height: 1.2;
    border-radius: 8px;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.sap-sidebar a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.sap-sidebar a.active,
.sap-sidebar .nav-top.active {
    background: rgba(10,110,209,.28);
    color: #fff;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(120,180,240,.18);
}
.sap-sidebar .nav-acc { margin: 2px 0; }
.sap-sidebar .nav-acc-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    margin: 1px 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #d3deea;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.sap-sidebar .nav-acc-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
.sap-sidebar .nav-acc-btn.has-active {
    color: #fff;
    background: rgba(255,255,255,.05);
}
.sap-sidebar .nav-acc-label { flex: 1; min-width: 0; }
.sap-sidebar .nav-acc-btn .chev {
    opacity: .55;
    transition: transform .18s ease;
}
.sap-sidebar .nav-acc.open .nav-acc-btn .chev { transform: rotate(180deg); opacity: .9; }
.sap-sidebar .nav-acc-body {
    display: none;
    padding: 2px 0 6px 8px;
    margin: 0 0 4px 10px;
    border-left: 1px solid rgba(255,255,255,.1);
}
.sap-sidebar .nav-acc.open .nav-acc-body { display: block; }
.sap-sidebar .nav-acc-body a {
    font-size: 13px;
    padding: 7px 10px;
    font-weight: 400;
}
.sap-sidebar .ic {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: .9;
    flex: 0 0 22px;
}
.sap-sidebar .ic svg { width: 16px; height: 16px; display: block; }

.sap-main { padding: 24px 28px 72px; min-width: 0; }
.sap-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--sap-line);
    flex-wrap: wrap;
}
.sap-page-header .title h1 { line-height: 1.15; }
.sap-page-header .title .muted { margin: 0; }

.sap-card {
    background: var(--sap-card);
    border: 1px solid var(--sap-line);
    border-radius: var(--sap-radius-lg);
    box-shadow: var(--sap-shadow-1);
    padding: 20px 22px;
}
.sap-card.padded-lg { padding: 24px; }
.sap-card-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--sap-text-muted);
    margin: 0 0 14px;
}
.sap-card .sap-table { border: 0; box-shadow: none; border-radius: 0; }
.sap-card[style*="padding:0"] .sap-table,
.sap-card.flush { padding: 0; overflow: hidden; }

.sap-tile {
    background: var(--sap-card);
    border: 1px solid var(--sap-line);
    border-radius: var(--sap-radius-lg);
    padding: 18px 18px 16px;
    box-shadow: var(--sap-shadow-1);
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 118px;
}
.sap-tile .label { color: var(--sap-text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.sap-tile .value { font-size: 24px; font-weight: 700; color: var(--sap-text); line-height: 1.15; letter-spacing: -.03em; }
.sap-tile .delta { font-size: 12px; color: var(--sap-text-muted); }
.sap-tile.brand {
    background: linear-gradient(145deg, #0a6ed1 0%, #074a8c 100%);
    color: #fff;
    border: 0;
    box-shadow: 0 10px 24px rgba(10,110,209,.28);
}
.sap-tile.brand .label, .sap-tile.brand .delta, .sap-tile.brand .value { color: #fff; }
.sap-tile.brand .label { color: rgba(255,255,255,.78); }
.sap-tile.positive .value { color: var(--sap-positive); }
.sap-tile.critical .value { color: var(--sap-critical); }
.sap-tile.negative .value { color: var(--sap-negative); }

.sap-grid { display: grid; gap: 16px; }
.sap-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.sap-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.sap-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.sap-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) {
    .sap-grid.cols-3, .sap-grid.cols-4, .sap-grid.cols-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .sap-grid.cols-2, .sap-grid.cols-3, .sap-grid.cols-4, .sap-grid.cols-5 { grid-template-columns: 1fr; }
    .sap-shell { grid-template-columns: 1fr; }
    .sap-sidebar { display: none; }
    .sap-main { padding: 16px 14px 48px; }
}

.sap-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 2px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 650; line-height: 1.6;
    background: var(--sap-neutral-bg); color: var(--sap-neutral);
}
.sap-badge.tone-success  { background: var(--sap-positive-bg); color: var(--sap-positive); }
.sap-badge.tone-info     { background: var(--sap-info-bg); color: var(--sap-info); }
.sap-badge.tone-warning  { background: var(--sap-critical-bg); color: var(--sap-critical); }
.sap-badge.tone-danger   { background: var(--sap-negative-bg); color: var(--sap-negative); }
.sap-badge.tone-neutral  { background: var(--sap-neutral-bg); color: var(--sap-neutral); }

.sap-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--sap-card);
    border: 1px solid var(--sap-line);
    border-radius: var(--sap-radius-lg);
    overflow: hidden;
}
.sap-table thead th {
    background: #f4f7fa;
    color: var(--sap-text-muted);
    text-align: left;
    font-weight: 650;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--sap-line);
}
.sap-table tbody td { padding: 13px 16px; border-bottom: 1px solid #eef2f6; vertical-align: middle; }
.sap-table tbody tr:hover td { background: #f6fafd; }
.sap-table tbody tr:last-child td { border-bottom: 0; }
.sap-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.sap-table .actions { white-space: nowrap; }

.field { display: block; margin: 0; min-width: 0; }
.field > span {
    display: block;
    font-size: 11px;
    font-weight: 650;
    color: var(--sap-text-muted);
    margin-bottom: 6px;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.field input,
.field select,
.field textarea,
input.sap-input,
select.sap-input,
textarea.sap-input {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 40px;
    border: 1px solid var(--sap-line-strong);
    background: #fbfcfd;
    padding: 8px 12px;
    border-radius: var(--sap-radius-sm);
    font-family: inherit;
    font-size: 14px;
    color: var(--sap-text);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.field select, select.sap-input {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%235b738b' d='M1 1l5 5 5-5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.field textarea, textarea.sap-input { height: auto; min-height: 96px; resize: vertical; padding: 10px 12px; }
.field input[type=checkbox], .field input[type=radio] {
    display: inline-block;
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
}
.field input:hover, .field select:hover, .field textarea:hover,
input.sap-input:hover, select.sap-input:hover, textarea.sap-input:hover {
    border-color: #b7c4d0;
    background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus,
input.sap-input:focus, select.sap-input:focus, textarea.sap-input:focus {
    outline: 0;
    background: #fff;
    border-color: var(--sap-brand);
    box-shadow: 0 0 0 3px rgba(10,110,209,.16);
}
.checkbox { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-row-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px 16px;
}
.g-2 { grid-column: span 2; }
.g-3 { grid-column: span 3; }
.g-4 { grid-column: span 4; }
.g-5 { grid-column: span 5; }
.g-6 { grid-column: span 6; }
.g-8 { grid-column: span 8; }
.g-12 { grid-column: span 12; }
@media (max-width: 980px) {
    .form-row-4 { grid-template-columns: 1fr 1fr; }
    .g-2, .g-3, .g-4, .g-5 { grid-column: span 6; }
}
@media (max-width: 720px) {
    .form-row, .form-row-3, .form-row-4 { grid-template-columns: 1fr; }
    .g-2, .g-3, .g-4, .g-5, .g-6, .g-8, .g-12 { grid-column: span 12; }
}

form.sap-card h3,
.sap-form-card h3 {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--sap-brand-dark);
    margin: 22px 0 14px;
    padding: 8px 12px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--sap-brand-light) 0%, #fff 70%);
    border-left: 3px solid var(--sap-brand);
}
form.sap-card h3:first-of-type { margin-top: 0; }

.form-section {
    background: var(--sap-card);
    border: 1px solid var(--sap-line);
    border-radius: var(--sap-radius-lg);
    box-shadow: var(--sap-shadow-1);
    margin-bottom: 14px;
    overflow: hidden;
}
.form-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    background: linear-gradient(180deg, #f8fbfe 0%, #f3f7fb 100%);
    border-bottom: 1px solid var(--sap-line);
}
.form-section-head h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: none;
    color: var(--sap-text);
}
.form-section-head p { margin: 0; color: var(--sap-text-muted); font-size: 12px; }
.form-section-body { padding: 18px 20px 16px; }
.form-actions {
    position: sticky;
    bottom: 0;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 14px 4px 0;
    margin-top: 6px;
    background: linear-gradient(180deg, transparent, var(--sap-bg) 28%);
}

.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--sap-line-strong);
    background: #fff;
    color: var(--sap-text);
    font-family: inherit; font-size: 13px; font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 1px 0 rgba(20,37,54,.04);
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { border-color: var(--sap-brand); color: var(--sap-brand); text-decoration: none; background: #f4f9ff; }
.btn.primary {
    background: var(--sap-brand);
    border-color: var(--sap-brand);
    color: #fff;
    box-shadow: 0 6px 14px rgba(10,110,209,.22);
}
.btn.primary:hover { background: var(--sap-brand-dark); border-color: var(--sap-brand-dark); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--sap-text-muted); box-shadow: none; }
.btn.ghost:hover { color: var(--sap-brand); background: var(--sap-brand-light); }
.btn.danger { background: #fff; border-color: #e3b4b4; color: var(--sap-negative); }
.btn.danger:hover { background: var(--sap-negative); border-color: var(--sap-negative); color: #fff; }
.btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; box-shadow: none; }
.btn.block { display: flex; justify-content: center; width: 100%; }

.sap-progress { background: var(--sap-bg-alt); height: 8px; border-radius: 999px; overflow: hidden; }
.sap-progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--sap-brand), var(--sap-positive)); border-radius: 999px; }
.alert { padding: 12px 14px; border-radius: 10px; border-left: 4px solid; background: #fff; margin-bottom: 16px; }
.alert.info     { border-color: var(--sap-info);     background: var(--sap-info-bg); }
.alert.success  { border-color: var(--sap-positive); background: var(--sap-positive-bg); }
.alert.warning  { border-color: var(--sap-critical); background: var(--sap-critical-bg); }
.alert.danger   { border-color: var(--sap-negative); background: var(--sap-negative-bg); }
.alert.error    { border-color: var(--sap-negative); background: var(--sap-negative-bg); }

.sap-login {
    min-height: 100vh;
    background: radial-gradient(1200px 500px at 20% -10%, #3a7bd5 0%, transparent 50%), linear-gradient(160deg, #12263a 0%, #0a6ed1 100%);
    display: flex; align-items: center; justify-content: center;
    padding: 30px;
}
.sap-login .card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0,0,0,.22);
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
}
.sap-login .logo { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.sap-login .logo .dot { width: 36px; height: 36px; border-radius: 8px; background: linear-gradient(135deg, var(--sap-brand) 0%, var(--sap-accent) 100%); }
.sap-login .logo .name { font-weight: 700; font-size: 20px; }
.sap-login .logo .name span { color: var(--sap-text-muted); font-weight: 400; }
.sap-login .demo-keys {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--sap-line);
}
.sap-login .demo-keys-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--sap-text-muted);
    margin-bottom: 10px;
}
.sap-login .demo-account {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
    margin: 0 0 8px;
    padding: 12px 14px;
    text-align: left;
    background: var(--sap-bg-alt);
    border: 1px solid var(--sap-line);
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    color: inherit;
}
.sap-login .demo-account:hover { border-color: var(--sap-brand); }
.sap-login .demo-account strong { font-size: 13px; }
.sap-login .demo-account span { font-size: 13px; color: var(--sap-text-muted); }
.sap-login .demo-account code {
    font-family: Consolas, "Segoe UI Mono", monospace;
    font-size: 12px;
    color: var(--sap-text);
    background: #fff;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid var(--sap-line);
}
.sap-login .demo-keys-hint {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--sap-text-muted);
}

.score-ring {
    width: 120px; height: 120px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center; flex-direction: column;
    background: conic-gradient(var(--sap-brand) calc(var(--p, 0) * 1%), var(--sap-bg-alt) 0);
    position: relative;
    margin: 0 auto;
}
.score-ring::before { content: ''; position: absolute; inset: 8px; background: #fff; border-radius: 50%; }
.score-ring .v { position: relative; font-size: 26px; font-weight: 700; color: var(--sap-brand); }
.score-ring .l { position: relative; font-size: 11px; color: var(--sap-text-muted); }

.sap-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--sap-line); margin-bottom: 18px; flex-wrap: wrap; }
.sap-tabs a {
    padding: 10px 16px;
    color: var(--sap-text-muted); font-weight: 600; font-size: 13px;
    border-bottom: 2px solid transparent;
    text-decoration: none;
}
.sap-tabs a:hover { color: var(--sap-brand); text-decoration: none; }
.sap-tabs a.active { color: var(--sap-brand); border-bottom-color: var(--sap-brand); }

.filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: end;
    margin-bottom: 16px;
    padding: 14px 16px;
}
.filters .field { margin: 0; min-width: 180px; flex: 1; }
.btn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spaced > * + * { margin-top: 14px; }
.kbd { font-family: monospace; background: var(--sap-bg-alt); padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.empty { padding: 36px 20px; text-align: center; color: var(--sap-text-muted); }

.object-header {
    background: var(--sap-card);
    border: 1px solid var(--sap-line);
    border-radius: var(--sap-radius-lg);
    padding: 20px 22px;
    margin-bottom: 16px;
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    box-shadow: var(--sap-shadow-1);
}
.object-kpis { display: flex; gap: 28px; flex-wrap: wrap; }
.object-kpis .k .l { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--sap-text-muted); font-weight: 650; }
.object-kpis .k .v { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }

.pipeline { display: flex; gap: 12px; overflow-x: auto; align-items: flex-start; padding-bottom: 16px; }
.pipeline-col {
    min-width: 240px; width: 240px; flex: 0 0 240px;
    background: #e8eef4;
    border-radius: var(--sap-radius-lg);
    padding: 12px;
}
.pipeline-col h3 {
    font-size: 13px; margin: 0 0 10px; padding-bottom: 8px;
    border-bottom: 3px solid var(--sap-brand);
    display: flex; justify-content: space-between; align-items: center;
}
.deal-card {
    display: block;
    background: #fff;
    border: 1px solid var(--sap-line);
    border-left: 3px solid var(--sap-brand);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    color: inherit;
    text-decoration: none;
    cursor: grab;
}
.deal-card:hover { box-shadow: var(--sap-shadow-2); text-decoration: none; }
.deal-card .t { font-weight: 600; font-size: 13px; }
.deal-card .m { font-size: 12px; color: var(--sap-text-muted); margin-top: 4px; }
.pipeline-col.drag-over { outline: 2px dashed var(--sap-brand); }

.timeline { border-left: 2px solid var(--sap-line); margin: 8px 0 0 10px; padding-left: 18px; }
.timeline-item { position: relative; margin-bottom: 16px; }
.timeline-item::before {
    content: ''; position: absolute; left: -24px; top: 6px;
    width: 10px; height: 10px; border-radius: 50%; background: var(--sap-brand);
}
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .hd { font-size: 11px; text-transform: uppercase; color: var(--sap-text-muted); text-align: center; padding: 6px; }
.cal .day {
    min-height: 92px; background: #fff; border: 1px solid var(--sap-line);
    border-radius: 8px; padding: 6px; font-size: 12px;
}
.cal .day.off { background: var(--sap-bg-alt); color: var(--sap-text-light); }
.cal .day.today { border-color: var(--sap-brand); box-shadow: 0 0 0 1px var(--sap-brand); }
.cal .ev { display: block; background: var(--sap-info-bg); color: var(--sap-brand); border-radius: 4px; padding: 1px 4px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .ev.task { background: var(--sap-critical-bg); color: var(--sap-critical); }

.notif { position: relative; }
.notif-bell {
    width: 34px; height: 34px; border-radius: 50%; border: 0;
    background: var(--sap-brand); color: #fff; font-weight: 700; cursor: pointer;
    box-shadow: 0 4px 10px rgba(10,110,209,.3);
}
.notif-panel {
    position: absolute; right: 0; top: 44px; width: 320px;
    background: #fff; color: var(--sap-text); border: 1px solid var(--sap-line);
    border-radius: 12px; padding: 10px; z-index: 80;
    max-height: 360px; overflow: auto;
    box-shadow: var(--sap-shadow-3);
}
.notif-item { padding: 8px 0; border-bottom: 1px solid var(--sap-bg-alt); font-size: 12px; display: flex; flex-direction: column; gap: 2px; }
.notif-item.unread strong { color: var(--sap-brand); }
.hidden { display: none !important; }
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 13px; }
.dl dt { color: var(--sap-text-muted); }
.dl dd { margin: 0; }

.due-overdue { color: var(--sap-negative); font-weight: 600; }
.due-soon { color: var(--sap-critical); font-weight: 600; }
.learn-list { margin: 0; padding-left: 20px; }
.learn-list li { margin: 8px 0; }
.learn-list li.done a { color: var(--sap-positive); }
.learn-body { font-size: 15px; line-height: 1.65; white-space: pre-wrap; }
.quiz-q { border: 0; margin: 0 0 18px; padding: 0; }
.quiz-q legend { font-weight: 600; margin-bottom: 8px; }
.cert-sheet {
    max-width: 720px; margin: 24px auto; background: #fff;
    border: 1px solid var(--sap-line); border-radius: 16px;
    padding: 48px 40px; text-align: center;
    box-shadow: var(--sap-shadow-2);
}
.cert-sheet h1 { font-size: 28px; margin: 12px 0 24px; }
.cert-sheet h2 { font-size: 26px; color: var(--sap-brand); margin: 8px 0 20px; }
.tag-picks { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.tag-chip { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.tag-chip-label {
    display: inline-block; font-size: 11px; font-weight: 650; padding: 2px 8px;
    border: 1px solid var(--sap-line); border-radius: 999px; margin-left: 6px;
}
.hse-picks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 12px; }
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.photo-card { margin: 0; }
.photo-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--sap-line);
    display: block;
    background: #f3f6f9;
}
.photo-card figcaption {
    font-size: 12px;
    color: var(--sap-text-muted);
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
@media print {
    .sap-sidebar, .sap-topbar, .btn-row, .notif { display: none !important; }
    .sap-shell { display: block; }
    .cert-sheet { box-shadow: none; border: 0; }
}
