/* Coachdesk theme selector styles.
   Two palettes: Default and Midnight.
   Loaded last so these rules override style.css, interface.css and theme.css.
   The active theme is set on <html data-theme="…"> by app.js from the
   signed-in trainer's saved preference. */

/* ---- Theme selector component (shared by every theme) ---- */
.theme-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:4px 24px 24px}
.theme-option{display:flex;flex-direction:column;gap:14px;text-align:left;padding:16px;border:1px solid var(--line);border-radius:16px;background:transparent;color:inherit;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.theme-option:hover{transform:translateY(-2px);box-shadow:0 10px 24px #0000001f}
.theme-option.selected{border-color:var(--green);box-shadow:0 0 0 2px var(--green) inset}
.theme-swatch{display:flex;gap:6px}
.theme-swatch i{width:26px;height:26px;border-radius:8px;border:1px solid #0000001f;display:block}
.theme-option-body b{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:650}
.theme-option-body small{display:block;margin-top:6px;color:var(--muted);line-height:1.55;font-size:12px}
.theme-current{font-size:10px;letter-spacing:.6px;text-transform:uppercase;background:var(--green);color:#fff;padding:3px 8px;border-radius:999px;font-weight:600}
@media(max-width:700px){.theme-grid{grid-template-columns:1fr;padding-inline:17px}}

/* =====================================================================
   MIDNIGHT — high-contrast dark palette for low-light use (grayscale reference, v0.22.41).
   Page #0a0e15 · cards #212631 · dividers #212631 · text #ffffff · accent #bfc6d4
   ===================================================================== */
html[data-theme="midnight"]{--ink:#ffffff;--muted:#bfc6d4;--line:#212631;--paper:#0a0e15;--green:#bfc6d4;--lime:#bfc6d4;--radius:26px}
/* Base text + page */
[data-theme="midnight"] body{background:var(--paper);color:var(--ink)}
[data-theme="midnight"] main,[data-theme="midnight"] .card,[data-theme="midnight"] dialog{color:var(--ink)}
[data-theme="midnight"] h1,[data-theme="midnight"] h2,[data-theme="midnight"] h3,[data-theme="midnight"] h4{color:#ffffff}
[data-theme="midnight"] .subtitle,[data-theme="midnight"] .subtle,[data-theme="midnight"] .meta-line,[data-theme="midnight"] .muted,[data-theme="midnight"] .empty{color:#bfc6d4}
[data-theme="midnight"] .eyebrow{color:#bfc6d4}
/* Top header */
[data-theme="midnight"] .main-shell>header{background:#0a0e15;border-color:#212631}
[data-theme="midnight"] .breadcrumb,[data-theme="midnight"] .breadcrumb b{color:#e0e4eb}[data-theme="midnight"] .breadcrumb span{color:#667085}
[data-theme="midnight"] .icon-btn{color:#e0e4eb}[data-theme="midnight"] .icon-btn:hover{background:#212631}
[data-theme="midnight"] .header-right .avatar{background:#212631;color:#e0e4eb}
/* Wordmark PNG is dark art on a light plate; screen-blend the inverted image
   so it reads as a light logo on dark surfaces instead of a solid block. */
[data-theme="midnight"] .wordmark{mix-blend-mode:screen;filter:invert(1);opacity:.95}
/* Sidebar */
[data-theme="midnight"] .sidebar{background:#0a0e15;border-color:#212631;color:#e0e4eb;color-scheme:dark}
[data-theme="midnight"] .sidebar .brand{color:#ffffff}
[data-theme="midnight"] .sidebar .workspace-select{background:#212631;color:#e0e4eb;border-color:#212631}
[data-theme="midnight"] .sidebar .nav-label{color:#bfc6d4}
[data-theme="midnight"] .sidebar .nav-link,[data-theme="midnight"] .sidebar .nav-group-title,[data-theme="midnight"] .sidebar .group-active>.nav-group-title{color:#e0e4eb}
[data-theme="midnight"] .sidebar .nav-link:hover{background:#212631;color:#ffffff}
[data-theme="midnight"] .sidebar .nav-link.active{background:#bfc6d4;color:#0a0e15;font-weight:650;box-shadow:0 3px 8px #0a0e1547}
[data-theme="midnight"] .sidebar .nav-group.group-active>.nav-link:not(.active){background:#212631;color:#e0e4eb}
[data-theme="midnight"] .sidebar .nav-children{border-color:#212631}
[data-theme="midnight"] .sidebar .nav-count{background:#212631;color:#e0e4eb}
[data-theme="midnight"] .sidebar .plan-box{background:#0a0e15;border-color:#212631}
[data-theme="midnight"] .sidebar .mini-tag{color:#bfc6d4}[data-theme="midnight"] .sidebar .plan-box p{color:#ffffff}[data-theme="midnight"] .sidebar .plan-box small{color:#bfc6d4}
[data-theme="midnight"] .sidebar .avatar{background:#212631;color:#e0e4eb}
[data-theme="midnight"] .sidebar .profile{color:#e0e4eb}[data-theme="midnight"] .sidebar .profile small{color:#bfc6d4}
[data-theme="midnight"] .nav-divider{background:#212631}
/* Cards / stats */
[data-theme="midnight"] .card,[data-theme="midnight"] .stat,[data-theme="midnight"] .profile-hero{background:#212631;border-color:#212631;box-shadow:0 2px 4px #0a0e1533,0 14px 34px #0a0e1524}
[data-theme="midnight"] .stat-value{color:#ffffff}[data-theme="midnight"] .stat-top{color:#bfc6d4}[data-theme="midnight"] .stat-top svg{color:#bfc6d4}[data-theme="midnight"] .stat-bottom{color:#bfc6d4}[data-theme="midnight"] .positive{color:#bfc6d4}
/* Muted body copy inside cards/rows */
[data-theme="midnight"] .attention-row p,[data-theme="midnight"] .activity-item p,[data-theme="midnight"] .activity-item small,[data-theme="midnight"] .session-info p,[data-theme="midnight"] .exercise-row p,[data-theme="midnight"] .line-item p,[data-theme="midnight"] .workout-card p,[data-theme="midnight"] .chart-meta span,[data-theme="midnight"] .chart-labels,[data-theme="midnight"] .bar-chart .bar span{color:#bfc6d4}
/* Accent surfaces */
[data-theme="midnight"] .insight{background:#212631;border-color:#212631}[data-theme="midnight"] .insight h2{color:#e0e4eb}[data-theme="midnight"] .insight p{color:#bfc6d4}[data-theme="midnight"] .insight-top span{color:#bfc6d4}
[data-theme="midnight"] .client-hero{background:#212631;border-color:#212631;color:#ffffff}[data-theme="midnight"] .client-hero .eyebrow,[data-theme="midnight"] .client-hero p{color:#bfc6d4}[data-theme="midnight"] .client-hero .big-number{color:#bfc6d4}
/* Tinted tiles (icons + numbers) */
[data-theme="midnight"] .workout-icon,[data-theme="midnight"] .activity-icon,[data-theme="midnight"] .list-item-icon,[data-theme="midnight"] .exercise-num,[data-theme="midnight"] .session-section-number,[data-theme="midnight"] .workout-log-section-number,[data-theme="midnight"] .workout-log-exercise-number,[data-theme="midnight"] .plan-slot-order{background:#212631;color:#e0e4eb}
[data-theme="midnight"] .detail-box{background:#0a0e15;border-color:#212631}[data-theme="midnight"] .detail-box small{color:#bfc6d4}[data-theme="midnight"] .detail-box b{color:#ffffff}
/* Buttons */
[data-theme="midnight"] .button{background:#212631;border-color:#373f4e;color:#ffffff}
[data-theme="midnight"] .button:hover{background:#212631;border-color:#373f4e}
[data-theme="midnight"] .button.primary{background:#bfc6d4;border-color:#bfc6d4;color:#0a0e15}
[data-theme="midnight"] .button.primary:hover{background:#bfc6d4;border-color:#bfc6d4}
[data-theme="midnight"] .button.lime-btn{background:#212631;border-color:#373f4e;color:#e0e4eb}
[data-theme="midnight"] .text-btn{color:#bfc6d4}
[data-theme="midnight"] .action-dropdown-trigger[aria-expanded=true]{background:#212631;border-color:#373f4e}
/* Tabs */
[data-theme="midnight"] .profile-tabs,[data-theme="midnight"] .segmented{background:#0a0e15;border-color:#212631}
[data-theme="midnight"] .profile-tab,[data-theme="midnight"] .segmented button{color:#bfc6d4}
[data-theme="midnight"] .profile-tab:hover,[data-theme="midnight"] .segmented button:hover{background:#212631;color:#ffffff}
[data-theme="midnight"] .profile-tab.active,[data-theme="midnight"] .segmented button.selected{background:#bfc6d4;color:#0a0e15}
[data-theme="midnight"] .profile-tabs-select{background:#212631;border-color:#212631}[data-theme="midnight"] .profile-tabs-select>span{color:#bfc6d4}
/* Days */
[data-theme="midnight"] .day b{color:#bfc6d4}[data-theme="midnight"] .day.active{background:#bfc6d4}[data-theme="midnight"] .day.active b{color:#0a0e15}[data-theme="midnight"] .day.active i{background:#0a0e15}
/* Forms */
[data-theme="midnight"] input,[data-theme="midnight"] select,[data-theme="midnight"] textarea,[data-theme="midnight"] .log-field input,[data-theme="midnight"] .log-set input{background:#0a0e15;border-color:#212631;color:#ffffff}
[data-theme="midnight"] input::placeholder{color:#bfc6d4}
[data-theme="midnight"] input[type=checkbox],[data-theme="midnight"] input[type=radio],[data-theme="midnight"] .checklist input{accent-color:#bfc6d4}
[data-theme="midnight"] .search>span{color:#bfc6d4}
[data-theme="midnight"] .field,[data-theme="midnight"] .log-field{color:#e0e4eb}
/* Tables */
[data-theme="midnight"] .clients-toolbar{background:#212631;border-color:#212631}
[data-theme="midnight"] th{background:#0a0e15;border-color:#212631;color:#bfc6d4}[data-theme="midnight"] th+th{border-left-color:#212631}
[data-theme="midnight"] td{border-color:#212631}[data-theme="midnight"] tbody tr:hover{background:#212631}
[data-theme="midnight"] .client-name b,[data-theme="midnight"] .client-name-link,[data-theme="midnight"] .item-name-link,[data-theme="midnight"] .profile-session-link{color:#ffffff}
[data-theme="midnight"] .client-name small,[data-theme="midnight"] .client-package-summary small,[data-theme="midnight"] .client-next-session small{color:#bfc6d4}
[data-theme="midnight"] .client-next-session{color:#bfc6d4}
[data-theme="midnight"] .client-name-link:hover,[data-theme="midnight"] .item-name-link:hover,[data-theme="midnight"] .profile-session-link:hover{color:#e0e4eb}
/* Status filter badges */
[data-theme="midnight"] .client-status-badge{background:#212631;border-color:#212631;color:#e0e4eb}
[data-theme="midnight"] .client-status-badge:hover{background:#212631;color:#ffffff}
[data-theme="midnight"] .client-status-badge.selected{background:#bfc6d4;border-color:#bfc6d4;color:#0a0e15}
[data-theme="midnight"] .client-status-badge.status-active:not(.selected){background:#212631;color:#bfc6d4;border-color:#212631}
[data-theme="midnight"] .client-status-badge.status-onboarding:not(.selected){background:#212631;color:#e0e4eb;border-color:#373f4e}
[data-theme="midnight"] .client-status-badge.status-paused:not(.selected){background:#212631;color:#e0e4eb;border-color:#373f4e}
[data-theme="midnight"] .client-status-badge.status-archived:not(.selected){background:#212631;color:#bfc6d4;border-color:#373f4e}
/* Badges + avatars */
[data-theme="midnight"] .badge{background:#212631;color:#e0e4eb}
[data-theme="midnight"] .badge.gray{background:#212631;color:#bfc6d4}[data-theme="midnight"] .badge.orange{background:#212631;color:#e0e4eb}[data-theme="midnight"] .badge.purple{background:#212631;color:#e0e4eb}
[data-theme="midnight"] .avatar{background:#212631;color:#e0e4eb}[data-theme="midnight"] .avatar.lime{background:#212631;color:#e0e4eb}
/* Calendar */
[data-theme="midnight"] .calendar-day{background:#212631;border-color:#212631}
[data-theme="midnight"] .calendar-day.today{background:#0a0e15;border-color:#373f4e}
[data-theme="midnight"] .calendar-day-heading span{color:#bfc6d4}
[data-theme="midnight"] .calendar-event .calendar-session-time,[data-theme="midnight"] .calendar-event .calendar-session-client{color:#e0e4eb}
[data-theme="midnight"] .calendar-event .calendar-session-title,[data-theme="midnight"] .calendar-event span{color:#e0e4eb}
[data-theme="midnight"] .calendar-event{background:#0a0e15;border-left-color:#bfc6d4}
[data-theme="midnight"] .calendar-event.session-type-personal,[data-theme="midnight"] .calendar-event.session-type-personal_training{background:#0a0e15;border-left-color:#bfc6d4}
[data-theme="midnight"] .calendar-event.session-type-consultation{background:#0a0e15;border-left-color:#bfc6d4}
[data-theme="midnight"] .calendar-event.session-type-class{background:#212631;border-left-color:#bfc6d4}
[data-theme="midnight"] .calendar-event.session-type-online{background:#212631;border-left-color:#bfc6d4}
[data-theme="midnight"] .calendar-event.session-type-block{background:#212631;border-left-color:#bfc6d4}
[data-theme="midnight"] .calendar-event.session-type-assessment{background:#0a0e15;border-left-color:#bfc6d4}
[data-theme="midnight"] .calendar-event.session-type-group{background:#0a0e15;border-left-color:#bfc6d4}
[data-theme="midnight"] .calendar-event .pill-type,[data-theme="midnight"] .calendar-event .pill-status{background:#0a0e1573;border-color:transparent;color:#e0e4eb}
/* Session pills */
[data-theme="midnight"] .session-pill{background:#212631;border-color:#373f4e;color:#e0e4eb}
[data-theme="midnight"] .session-pill.pill-type{background:#212631;border-color:#212631;color:#e0e4eb}
[data-theme="midnight"] .session-pill.pill-status{background:#212631;border-color:#212631;color:#bfc6d4}
[data-theme="midnight"] .session-pill.pill-location{background:#0a0e15;border-color:#212631;color:#e0e4eb}
[data-theme="midnight"] .session-pill.pill-muted{background:#212631;border-color:#373f4e;color:#bfc6d4}
[data-theme="midnight"] .session-pill.pill-fact{background:#0a0e15;border-color:#212631;color:#e0e4eb}
/* Session detail / workout / plans */
[data-theme="midnight"] .session-workout{background:#0a0e15;border-color:#212631}
[data-theme="midnight"] .session-workout-notes,[data-theme="midnight"] .session-exercise p{color:#bfc6d4}
[data-theme="midnight"] .session-workout-empty{background:#212631;color:#bfc6d4}[data-theme="midnight"] .session-workout-empty h3{color:#ffffff}
[data-theme="midnight"] .session-training-block,[data-theme="midnight"] .session-participant,[data-theme="midnight"] .builder-section{background:#212631;border-color:#212631}
[data-theme="midnight"] .session-section{border-color:#212631}
[data-theme="midnight"] .workout-log-intro{background:#0a0e15;border-color:#212631;color:#bfc6d4}[data-theme="midnight"] .workout-log-intro p{color:#e0e4eb}
[data-theme="midnight"] .workout-log-section{background:#212631}
[data-theme="midnight"] .workout-log-section-head{background:#0a0e15;border-color:#212631}[data-theme="midnight"] .workout-log-section-head>span{color:#bfc6d4}
[data-theme="midnight"] .workout-log-section-note,[data-theme="midnight"] .log-set-number,[data-theme="midnight"] .workout-log-prescription{color:#bfc6d4}
[data-theme="midnight"] .workout-log-prescription strong{color:#ffffff}
[data-theme="midnight"] .workout-log-sets{background:#0a0e15;border-color:#212631}
[data-theme="midnight"] .training-plan-head p,[data-theme="midnight"] .plan-block>p,[data-theme="midnight"] .plan-notes{color:#bfc6d4}
[data-theme="midnight"] .plan-summary-grid{background:#212631}[data-theme="midnight"] .plan-summary-grid>div{background:#0a0e15}[data-theme="midnight"] .plan-summary-grid strong{color:#ffffff}
[data-theme="midnight"] .plan-progress{background:#212631}
[data-theme="midnight"] .plan-slot{background:#212631;border-color:#212631}[data-theme="midnight"] .plan-slot:hover{background:#212631}
[data-theme="midnight"] .plan-slot-completed .plan-slot-order{background:#212631;color:#bfc6d4}
[data-theme="midnight"] .plan-slot-skipped .plan-slot-order,[data-theme="midnight"] .plan-slot-cancelled .plan-slot-order{background:#212631;color:#bfc6d4}
[data-theme="midnight"] .management-list-item:hover{background:#212631}
/* Messaging */
[data-theme="midnight"] .bubble{background:#212631;color:#ffffff}[data-theme="midnight"] .bubble.mine{background:#bfc6d4;color:#0a0e15}
[data-theme="midnight"] .conversation{background:#212631;border-color:#212631}[data-theme="midnight"] .conversation.selected{background:#212631}
[data-theme="midnight"] .conversation b{color:#ffffff}[data-theme="midnight"] .conversation p{color:#bfc6d4}
[data-theme="midnight"] .chat-form{border-color:#212631}
/* Dialog + close */
[data-theme="midnight"] dialog{background:#212631;border-color:#212631;box-shadow:0 22px 80px #0a0e1580;color:var(--ink)}
[data-theme="midnight"] dialog::backdrop{background:#0a0e15cc;backdrop-filter:blur(5px)}
[data-theme="midnight"] .modal-heading .icon-btn[data-action="close"]{color:#e0e4eb}[data-theme="midnight"] .modal-heading .icon-btn[data-action="close"]:hover{background:#212631;color:#ffffff}
/* Notices, dropdown, footer, misc */
[data-theme="midnight"] .notice{background:#212631;color:#e0e4eb}
[data-theme="midnight"] .error-box{background:#212631;color:#e0e4eb}
[data-theme="midnight"] .action-dropdown{background:#212631;border-color:#212631;box-shadow:0 12px 40px #0a0e1580}
[data-theme="midnight"] .action-dropdown .action-dropdown-item{color:#ffffff}
[data-theme="midnight"] .action-dropdown .action-dropdown-item:hover{background:#212631}
[data-theme="midnight"] .action-dropdown .destructive-action{color:#bfc6d4}[data-theme="midnight"] .action-dropdown .destructive-action:hover{background:#212631}
[data-theme="midnight"] footer{color:#bfc6d4}
[data-theme="midnight"] .progress{background:#212631}[data-theme="midnight"] .progress span,[data-theme="midnight"] .session-line{background:#bfc6d4}
[data-theme="midnight"] .counter{background:#212631;color:#e0e4eb}
[data-theme="midnight"] .bar-chart .bar{background:#212631}[data-theme="midnight"] .bar-chart .bar.current{background:#bfc6d4}
[data-theme="midnight"] hr{border-color:#212631}
[data-theme="midnight"] .theme-current{color:#0a0e15}
