/* ================= Colour themes ================= */
body{--grad:linear-gradient(135deg,#1a7f50,#0f5132);--soft:#e8f3ec;--accent:#198754;--bg:#f4f6f5}
body[data-theme="ocean"]{--brand:#1e56a0;--brand-dark:#163f78;--grad:linear-gradient(135deg,#1e3c72 0%,#2a5298 45%,#00b4db 100%);--soft:#e3eefb;--accent:#00a3cc;--bg:#f1f6fc}
body[data-theme="sunset"]{--brand:#e0365a;--brand-dark:#b0213f;--grad:linear-gradient(135deg,#ff6a3d 0%,#f53d6b 55%,#c2185b 100%);--soft:#ffe8ec;--accent:#ff6a3d;--bg:#fff7f5}
body[data-theme="royal"]{--brand:#5b3fd8;--brand-dark:#3d25a8;--grad:linear-gradient(135deg,#6a11cb 0%,#2575fc 100%);--soft:#ede8ff;--accent:#2575fc;--bg:#f6f4ff}
body[data-theme="aurora"]{--brand:#0f9b8e;--brand-dark:#0b7268;--grad:linear-gradient(135deg,#0f9b8e 0%,#2dc2a8 45%,#3a7bd5 100%);--soft:#dcf5f0;--accent:#3a7bd5;--bg:#f0faf8}
body[data-theme="rainbow"]{--brand:#7209b7;--brand-dark:#560bad;--grad:linear-gradient(120deg,#f72585 0%,#7209b7 35%,#4361ee 70%,#4cc9f0 100%);--soft:#f3e8fc;--accent:#f72585;--bg:#f8f6fd}

body{background:var(--bg)}
.topbar{background:var(--grad)!important}
.btn-brand{background:var(--grad);border:0;color:#fff;box-shadow:0 2px 6px rgba(0,0,0,.12)}
.btn-brand:hover,.btn-brand:focus{background:var(--grad);filter:brightness(1.08);color:#fff}
.sidebar .nav-link:hover{background:var(--soft)}
.sidebar .nav-link.active{background:var(--soft);border-left-color:var(--brand);color:var(--brand-dark)}
.sidebar .nav-link.active i{color:var(--brand)}
.form-section{color:var(--brand-dark)}
.page-head h1 > i{color:var(--brand)}
.page-item.active .page-link{background:var(--brand);border-color:var(--brand)}
.page-link{color:var(--brand)}
.form-check-input:checked{background-color:var(--brand);border-color:var(--brand)}
.form-control:focus,.form-select:focus{border-color:var(--brand);box-shadow:0 0 0 .2rem color-mix(in srgb,var(--brand) 20%,transparent)}
.cal .today{background:var(--soft)}
.auth-bg{background:var(--grad)}
.card-header{border-bottom:1px solid color-mix(in srgb,var(--brand) 12%,#e3e7e5)}

/* stat tiles get a coloured strip */
.stat{position:relative;overflow:hidden}
.stat::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--grad)}
body[data-theme="rainbow"] .row > div:nth-child(5n+1) .stat::before{background:linear-gradient(#f72585,#b5179e)}
body[data-theme="rainbow"] .row > div:nth-child(5n+2) .stat::before{background:linear-gradient(#7209b7,#560bad)}
body[data-theme="rainbow"] .row > div:nth-child(5n+3) .stat::before{background:linear-gradient(#4361ee,#3a0ca3)}
body[data-theme="rainbow"] .row > div:nth-child(5n+4) .stat::before{background:linear-gradient(#4cc9f0,#4895ef)}
body[data-theme="rainbow"] .row > div:nth-child(5n+5) .stat::before{background:linear-gradient(#06d6a0,#118ab2)}
body[data-theme="rainbow"] .card-header{background:linear-gradient(90deg,#fdf2fb,#f3f5ff)}
body[data-theme="sunset"] .card-header{background:linear-gradient(90deg,#fff5f2,#fff)}
body[data-theme="ocean"] .card-header{background:linear-gradient(90deg,#f0f6ff,#fff)}
body[data-theme="royal"] .card-header{background:linear-gradient(90deg,#f4f0ff,#fff)}
body[data-theme="aurora"] .card-header{background:linear-gradient(90deg,#effbf8,#fff)}

/* theme picker in Settings */
.theme-pick{cursor:pointer;border:2px solid transparent;border-radius:14px;overflow:hidden;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.08);transition:transform .1s}
.theme-pick:hover{transform:translateY(-2px)}
.btn-check:checked + .theme-pick{border-color:#212529;box-shadow:0 0 0 3px rgba(0,0,0,.08)}
.theme-pick .sw{height:64px;position:relative}
.theme-pick .sw span{position:absolute;bottom:8px;left:10px;right:10px;height:10px;border-radius:5px;background:rgba(255,255,255,.55)}
