/* ============================================================================
   IPAV member portal — clean SaaS design layer  [Loco 2026-08-25, Phase 2]
   Scope: everything under .mp-shell (the logged-in dashboard) + two site-wide
   components Adam asked to clean up (the account dropdown, the cookie consent).
   This RETARGETS the existing markup/classes — form names/ids are untouched, so
   nothing functional changes. Loaded after ipav-polish.css in header.blade.php.
   ========================================================================== */

.mp-shell {
    --mp-bg: #F5F7FA;
    --mp-card: #FFFFFF;
    --mp-line: #E5EAF1;
    --mp-line-soft: #EEF2F7;
    --mp-ink: #1B2437;
    --mp-navy: #16264F;
    --mp-gold: #C49B3D;
    --mp-gold-deep: #A8822C;
    --mp-gold-soft: #FBF5E8;
    --mp-muted: #66708A;
    --mp-faint: #8A94AB;
    --mp-green: #1E7B4D;
    --mp-green-soft: #E8F5EE;
    --mp-amber: #B15309;
    --mp-amber-soft: #FCF0E4;
    --mp-focus: rgba(22, 38, 79, .14);
    --mp-r: 14px;
    --mp-r-sm: 10px;
    --mp-sh: 0 1px 2px rgba(16, 24, 40, .05);
    --mp-sh-md: 0 10px 30px rgba(16, 24, 40, .08);
}

/* ---- Canvas: kill the navy well, breathe ---- */
section.dashboard-box.mp-shell {
    background: var(--mp-bg);
    padding: 44px 0 72px;
}
.mp-shell .dashboard-row { --bs-gutter-x: 28px; }

/* ---- Sidebar → clean nav card ---- */
.mp-shell .dashboard-sidebar {
    background: var(--mp-card);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-r);
    box-shadow: var(--mp-sh);
    padding: 20px 16px 16px;
    position: sticky;
    top: 96px;
}
.mp-shell .dashboard-sidebar .title {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--mp-faint);
    margin: 0 0 6px 12px;
    background: none;
    -webkit-text-fill-color: currentColor;
}
/* member identity card injected above the nav */
.mp-shell .mp-me {
    display: flex; align-items: center; gap: 12px;
    padding: 4px 12px 16px; margin-bottom: 12px;
    border-bottom: 1px solid var(--mp-line-soft);
}
.mp-shell .mp-me-avatar {
    width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto;
    background: var(--mp-navy); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px; letter-spacing: .02em;
}
.mp-shell .mp-me-name { font-size: 14.5px; font-weight: 700; color: var(--mp-ink); line-height: 1.25; }
.mp-shell .mp-me-mail { font-size: 12px; color: var(--mp-muted); word-break: break-all; }

.mp-shell .profile-tab-list { border: 0; gap: 2px; display: flex; flex-direction: column; }
.mp-shell .profile-tab-list .profile-iconbox {
    display: flex; align-items: center; gap: 11px;
    border: 0; border-radius: var(--mp-r-sm);
    background: transparent;
    padding: 10px 12px;
    font-size: 14px; font-weight: 600; color: var(--mp-muted);
    transition: background .15s ease, color .15s ease;
    box-shadow: none;
}
.mp-shell .profile-tab-list .profile-iconbox i {
    width: 20px; text-align: center; font-size: 15px; color: var(--mp-faint);
    transition: color .15s ease;
}
.mp-shell .profile-tab-list .profile-iconbox:hover {
    background: #F6F8FB; color: var(--mp-ink);
}
.mp-shell .profile-tab-list .profile-iconbox:hover i { color: var(--mp-navy); }
.mp-shell .profile-tab-list .profile-iconbox.active {
    background: #F0F3F9; color: var(--mp-navy);
    box-shadow: inset 3px 0 0 var(--mp-gold);
}
.mp-shell .profile-tab-list .profile-iconbox.active i { color: var(--mp-gold-deep); }

/* ---- Content card ---- */
.mp-shell .dashboard-content-box {
    background: var(--mp-card);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-r);
    box-shadow: var(--mp-sh);
    padding: 28px 30px 32px;
}
.mp-shell .profile-section-header { border: 0; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--mp-line-soft); }
.mp-shell .profile-section-header .title {
    font-size: 19px; font-weight: 700; color: var(--mp-ink);
    letter-spacing: -.01em; margin: 0;
    background: none; -webkit-text-fill-color: currentColor;
}
.mp-shell .profile-section-header .title i { color: var(--mp-gold-deep); font-size: 17px; margin-right: 8px; }

/* ---- Forms: quiet, modern ---- */
.mp-shell .form-label-custom {
    font-size: 12.5px; font-weight: 600; color: #46536D;
    margin-bottom: 7px; letter-spacing: .01em;
}
.mp-shell .form-label-custom .required-star, .mp-shell .text-danger { color: #C33F38; }
.mp-shell .form-group-custom input[type="text"],
.mp-shell .form-group-custom input[type="email"],
.mp-shell .form-group-custom input[type="password"],
.mp-shell .form-group-custom input[type="tel"],
.mp-shell .form-group-custom input[type="number"],
.mp-shell .form-group-custom input[type="date"],
.mp-shell .form-group-custom select,
.mp-shell .form-group-custom textarea {
    background: #fff;
    border: 1px solid #D9E0EA;
    border-radius: var(--mp-r-sm);
    color: var(--mp-ink);
    font-size: 14px;
    padding: 10px 14px;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.mp-shell .form-group-custom input:focus,
.mp-shell .form-group-custom select:focus,
.mp-shell .form-group-custom textarea:focus {
    border-color: var(--mp-navy);
    box-shadow: 0 0 0 3px var(--mp-focus);
    outline: none;
}
.mp-shell .form-group-custom input::placeholder,
.mp-shell .form-group-custom textarea::placeholder { color: #A6AFC2; }
.mp-shell .form-group-custom .input-icon { color: #A6AFC2; }
.mp-shell .form-group-custom input:disabled,
.mp-shell .form-group-custom input[readonly] {
    background: #F7F9FC; color: var(--mp-muted); border-color: var(--mp-line);
}
.mp-shell .form-group-custom .invalid-feedback { font-size: 12px; }

/* select2 to match */
.mp-shell .form-group-custom .select2-container--default .select2-selection--single {
    border: 1px solid #D9E0EA; border-radius: var(--mp-r-sm); height: auto; padding: 9px 14px;
    background: #fff;
}

/* ---- Buttons ---- */
.mp-shell .theme-btn {
    background: var(--mp-navy);
    border: 1px solid var(--mp-navy);
    border-radius: var(--mp-r-sm);
    color: #fff;
    font-size: 14px; font-weight: 600;
    padding: 11px 22px;
    box-shadow: var(--mp-sh);
    transition: filter .15s ease, transform .05s ease;
}
.mp-shell .theme-btn:hover { background: #1D3161; border-color: #1D3161; color: #fff; filter: none; }
.mp-shell .theme-btn:active { transform: translateY(1px); }
.mp-shell .btn-upload-photo, .mp-shell .btn-remove-photo {
    border-radius: var(--mp-r-sm); font-weight: 600; font-size: 13px;
}

/* ============================================================================
   CPD — banner + My CPD tab, light SaaS treatment
   ========================================================================== */

/* ---- Summary banner (white card, ring, chip, CTA) ---- */
.mp-shell .cpd-banner {
    background: var(--mp-card);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-r);
    box-shadow: var(--mp-sh);
    color: var(--mp-ink);
    padding: 20px 24px;
    margin: 0 0 26px;
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.mp-shell .cpd-ring {
    --p: 0;
    width: 66px; height: 66px; border-radius: 50%; flex: 0 0 auto;
    background: conic-gradient(var(--mp-gold) calc(var(--p) * 1%), #E9EDF4 0);
    display: flex; align-items: center; justify-content: center;
}
.mp-shell .cpd-ring.cpd-ring-done { background: conic-gradient(var(--mp-green) calc(var(--p) * 1%), #E9EDF4 0); }
.mp-shell .cpd-ring > span {
    width: 50px; height: 50px; border-radius: 50%; background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13.5px; color: var(--mp-navy);
    font-variant-numeric: tabular-nums;
    box-shadow: inset 0 0 0 1px var(--mp-line-soft);
}
.mp-shell .cpd-banner-main { flex: 1 1 260px; min-width: 220px; }
.mp-shell .cpd-banner-kicker {
    font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
    color: var(--mp-gold-deep); font-weight: 700; margin-bottom: 2px;
}
.mp-shell .cpd-banner-line { font-size: 17px; font-weight: 700; color: var(--mp-ink); line-height: 1.35; }
.mp-shell .cpd-banner-sub { font-size: 13px; color: var(--mp-muted); margin-top: 2px; }
.mp-shell .cpd-banner-sub a { color: var(--mp-gold-deep); font-weight: 600; }
.mp-shell .cpd-chip {
    display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .03em;
    border-radius: 999px; padding: 3px 11px; margin-left: 10px; vertical-align: 2px;
}
.mp-shell .cpd-chip.is-ok   { background: var(--mp-green-soft); color: var(--mp-green); }
.mp-shell .cpd-chip.is-warn { background: var(--mp-amber-soft); color: var(--mp-amber); }
.mp-shell .cpd-banner-btn {
    background: var(--mp-gold); color: #2B2411;
    font-weight: 700; font-size: 14px;
    border: 0; border-radius: var(--mp-r-sm);
    padding: 12px 22px; white-space: nowrap; cursor: pointer;
    box-shadow: var(--mp-sh);
    transition: filter .15s ease;
}
.mp-shell .cpd-banner-btn:hover { filter: brightness(1.06); }

/* ---- My CPD pane ---- */
.mp-shell .cpd-pane-head {
    display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
    background: #FAFBFD;
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-r);
    padding: 22px 24px; margin-bottom: 20px;
}
.mp-shell .cpd-ring-lg {
    --p: 0;
    width: 112px; height: 112px; border-radius: 50%; flex: 0 0 auto;
    background: conic-gradient(var(--mp-gold) calc(var(--p) * 1%), #E9EDF4 0);
    display: flex; align-items: center; justify-content: center;
}
.mp-shell .cpd-ring-lg.cpd-ring-done { background: conic-gradient(var(--mp-green) calc(var(--p) * 1%), #E9EDF4 0); }
.mp-shell .cpd-ring-lg > span {
    width: 86px; height: 86px; border-radius: 50%; background: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-variant-numeric: tabular-nums;
    box-shadow: inset 0 0 0 1px var(--mp-line-soft);
}
.mp-shell .cpd-ring-lg b { font-size: 22px; color: var(--mp-navy); line-height: 1; }
.mp-shell .cpd-ring-lg small {
    font-size: 10px; color: var(--mp-faint); margin-top: 3px;
    text-transform: uppercase; letter-spacing: .07em;
}
.mp-shell .cpd-stats { display: flex; gap: 12px; flex-wrap: wrap; flex: 1 1 300px; }
.mp-shell .cpd-stat {
    flex: 1 1 96px; min-width: 96px;
    background: var(--mp-card);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-r-sm);
    padding: 14px 16px;
    box-shadow: var(--mp-sh);
}
.mp-shell .cpd-stat b { display: block; font-size: 23px; color: var(--mp-navy); font-variant-numeric: tabular-nums; }
.mp-shell .cpd-stat.cpd-warn b { color: var(--mp-amber); }
.mp-shell .cpd-stat.cpd-ok b { color: var(--mp-green); }
.mp-shell .cpd-stat span {
    font-size: 10.5px; color: var(--mp-faint);
    text-transform: uppercase; letter-spacing: .07em;
}
.mp-shell .cpd-carry {
    font-size: 13px; color: #6B5A2B;
    background: var(--mp-gold-soft); border: 1px solid #EFE2C2;
    border-radius: var(--mp-r-sm); padding: 9px 14px;
    margin: 0 0 18px; display: inline-block;
}
.mp-shell .cpd-carry i { color: var(--mp-gold-deep); }
.mp-shell .cpd-events { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 6px; }
.mp-shell .cpd-events th {
    font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--mp-faint);
    text-align: left; padding: 9px 12px;
    background: #FAFBFD; border-top: 1px solid var(--mp-line-soft); border-bottom: 1px solid var(--mp-line-soft);
}
.mp-shell .cpd-events th:first-child { border-radius: 8px 0 0 8px; }
.mp-shell .cpd-events th:last-child { border-radius: 0 8px 8px 0; }
.mp-shell .cpd-events td { padding: 12px; border-bottom: 1px solid var(--mp-line-soft); color: var(--mp-ink); }
.mp-shell .cpd-events td:last-child { text-align: right; font-weight: 700; color: var(--mp-navy); white-space: nowrap; }
.mp-shell .cpd-note { font-size: 12.5px; color: var(--mp-faint); margin-top: 16px; line-height: 1.55; }
.mp-shell .cpd-note a { color: var(--mp-gold-deep); font-weight: 600; font-size: inherit; }   /* [Loco 2026-09-18] the global link size was overriding the note - two links looked oversized */
.mp-shell .cpd-cta {
    display: inline-block; background: var(--mp-navy); color: #fff !important;
    font-weight: 600; font-size: 14px;
    border-radius: var(--mp-r-sm); padding: 11px 20px;
    margin: 16px 8px 0 0; text-decoration: none;
    box-shadow: var(--mp-sh);
    transition: background .15s ease;
}
.mp-shell .cpd-cta:hover { background: #1D3161; }
.mp-shell .cpd-stale {
    background: var(--mp-amber-soft); border: 1px solid #F3DDC4; color: var(--mp-amber);
    border-radius: var(--mp-r-sm); padding: 9px 14px; font-size: 13px; margin-bottom: 16px;
}
/* [Loco 2026-10-02] Jakub's note (1 Oct): recently completed CPD can take a few weeks to be recorded */
.mp-shell .cpd-recent {
    display: flex; gap: 10px; align-items: flex-start;
    font-size: 13px; line-height: 1.5; color: var(--mp-muted);
    background: #F6F8FB; border: 1px solid #E6EAF2;
    border-radius: var(--mp-r-sm); padding: 10px 14px; margin: 22px 0 0;
}
.mp-shell .cpd-recent i { color: var(--mp-gold-deep); margin-top: 3px; }
.mp-shell h4.cpd-events-title { font-size: 15.5px; color: var(--mp-ink); font-weight: 700; margin: 6px 0 4px; }

/* ---- Mobile ---- */
@media (max-width: 991px) {
    .mp-shell .dashboard-sidebar { position: static; margin-bottom: 22px; }
    .mp-shell .profile-tab-list { flex-direction: row; flex-wrap: wrap; gap: 6px; }
    .mp-shell .profile-tab-list .profile-iconbox { flex: 0 0 auto; padding: 8px 12px; font-size: 13px; }
    .mp-shell .profile-tab-list .profile-iconbox.active { box-shadow: inset 0 -2px 0 var(--mp-gold); }
    .mp-shell .mp-me { border-bottom: 0; padding-bottom: 6px; }
}
@media (max-width: 640px) {
    section.dashboard-box.mp-shell { padding: 24px 0 48px; }
    .mp-shell .dashboard-content-box { padding: 20px 16px 24px; }
    .mp-shell .cpd-banner { padding: 16px; }
    .mp-shell .cpd-banner-btn { width: 100%; }
    .mp-shell .cpd-pane-head { padding: 16px; gap: 16px; }
    .mp-shell .cpd-events td, .mp-shell .cpd-events th { padding: 9px 8px; }
}

/* ============================================================================
   Site-wide cleanups (Adam, 2026-08-25): account dropdown + cookie consent
   ========================================================================== */

/* ---- The "My account" dropdown ---- */
.top-dropdown.dropdown-menu {
    border: 1px solid #E8ECF3;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(16, 24, 40, .12);
    padding: 6px;
    min-width: 190px;
    margin-top: 8px !important;
}
.top-dropdown .dropdown-item {
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #33405C;
    display: flex; align-items: center; gap: 10px;
    transition: background .12s ease;
}
.top-dropdown .dropdown-item i { color: #8A94AB; font-size: 15px; width: 18px; text-align: center; }
.top-dropdown .dropdown-item:hover { background: #F4F6FA; color: #16264F; }
.top-dropdown .dropdown-item:hover i { color: #16264F; }
.top-dropdown .dropdown-item.text-danger { color: #C33F38 !important; }
.top-dropdown .dropdown-item.text-danger i { color: #C33F38; }
.top-dropdown .dropdown-item.text-danger:hover { background: #FDF1F0; }
.top-dropdown li + li { margin-top: 1px; }

/* ---- Cookie consent modal ---- */
.cookie-popup .modal-content {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(16, 24, 40, .22);
    overflow: hidden;
}
.cookie-popup .modal-header {
    border-bottom: 1px solid #EEF2F7;
    padding: 20px 26px;
}
.cookie-popup .modal-title { font-size: 17px; font-weight: 700; color: #1B2437; letter-spacing: -.01em; }
.cookie-popup .popup-close {
    background: #F4F6FA; border: 0; border-radius: 8px;
    width: 32px; height: 32px; color: #66708A;
    transition: background .12s ease;
}
.cookie-popup .popup-close:hover { background: #E8ECF3; color: #1B2437; }
.cookie-popup .modal-body { padding: 22px 26px; }
.cookie-popup .consent-intro-box { margin-bottom: 18px; }
.cookie-popup .consent-intro p { font-size: 13.5px; line-height: 1.6; color: #66708A; margin-bottom: 10px; }
.cookie-popup .show-more-btn { font-size: 13px; font-weight: 600; color: #A8822C; }
.cookie-popup .cookie-faq {
    border: 1px solid #E8ECF3; border-radius: 10px;
    padding: 0; margin-bottom: 8px; background: #fff;
}
.cookie-popup .cookie-question { padding: 13px 16px; }
.cookie-popup .cookie-question h4 { font-size: 14px; font-weight: 700; color: #1B2437; margin: 0; }
.cookie-popup .cookie-question h4 i { color: #8A94AB; font-size: 12px; margin-right: 6px; }
.cookie-popup .cookie-status { font-size: 12px; font-weight: 700; color: #1E7B4D; }
.cookie-popup .cookie-answer { padding: 0 16px 13px; }
.cookie-popup .cookie-answer p { font-size: 13px; color: #66708A; line-height: 1.55; }
.cookie-popup .no-cookie-msg { font-size: 12px; color: #8A94AB; background: #FAFBFD; border-radius: 8px; padding: 8px 12px; }
.cookie-popup .modal-footer {
    border-top: 1px solid #EEF2F7;
    padding: 16px 26px;
    gap: 10px;
}
.cookie-popup .footer-btn {
    border-radius: 10px;
    font-size: 13.5px; font-weight: 700;
    padding: 10px 18px;
    border: 1px solid #D9E0EA;
    background: #fff; color: #46536D;
    transition: background .12s ease, border-color .12s ease;
}
.cookie-popup .footer-btn:hover { background: #F4F6FA; }
.cookie-popup .footer-btn.btn-accept {
    background: #16264F; border-color: #16264F; color: #fff;
}
.cookie-popup .footer-btn.btn-accept:hover { background: #1D3161; }

/* Inputs that carry a leading icon (.input-wrapper > .input-icon) need clearance —
   the flat 14px padding put text under the icon (caught in visual pass r1). */
.mp-shell .form-group-custom .input-wrapper { position: relative; }
.mp-shell .form-group-custom .input-wrapper .input-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    pointer-events: none; font-size: 14px;
}
.mp-shell .form-group-custom .input-wrapper input,
.mp-shell .form-group-custom .input-wrapper select,
.mp-shell .form-group-custom .input-wrapper textarea { padding-left: 42px; }

/* [2026-08-25 Adam feedback] The bundled theme forces white text on dropdown hover/active —
   assert readable colours across every interactive state, and keep Bootstrap's :active
   (mouse-down / touch) from flashing its blue. */
ul.top-dropdown .dropdown-item:hover,
ul.top-dropdown .dropdown-item:focus,
ul.top-dropdown .dropdown-item:active,
ul.top-dropdown .dropdown-item.active {
    background: #F4F6FA !important;
    color: #16264F !important;
}
ul.top-dropdown .dropdown-item:hover i,
ul.top-dropdown .dropdown-item:focus i,
ul.top-dropdown .dropdown-item:active i { color: #16264F !important; }
ul.top-dropdown .dropdown-item.text-danger:hover,
ul.top-dropdown .dropdown-item.text-danger:focus,
ul.top-dropdown .dropdown-item.text-danger:active {
    background: #FDF1F0 !important;
    color: #C33F38 !important;
}
ul.top-dropdown .dropdown-item.text-danger:hover i,
ul.top-dropdown .dropdown-item.text-danger:active i { color: #C33F38 !important; }

/* [2026-08-25 Adam feedback] "View my CPD": white text like the site's own gold buttons
   (Apply for Membership), on the deeper gold so the contrast holds. */
.mp-shell .cpd-banner-btn {
    background: #A8822C;
    color: #fff;
}
.mp-shell .cpd-banner-btn:hover { background: #96731F; filter: none; }

/* [Loco 2026-08-27] Bootstrap's modal layers (backdrop 1050, modal 1055) sit BELOW the
   site's fixed header (z-index 99999), so a viewport-centred modal slides UNDER the nav
   on shorter laptop screens - the consent modal's whole title bar vanished behind it and
   the nav stayed undimmed. Lift modals above the header; everything else stays put. */
.modal-backdrop { z-index: 100000; }
.modal { z-index: 100001; }

/* [Loco 2026-08-27] Responsive pass fixes. */
/* Member-area menu wrapped into ragged 2-up rows on phones - stack it. */
@media (max-width: 575px) {
    .mp-shell .profile-tab-list { display: flex; flex-direction: column; }
    .mp-shell .profile-tab-list .list-group-item { width: 100%; }
}
/* CPD stat tiles wrapped 2+1 beside the ring at laptop widths - keep the three
   tiles on one even row instead. */
@media (max-width: 1199px) {
    .mp-shell .cpd-stat { flex: 1 1 0; min-width: 0; padding: 12px 10px; }
}
