/* ============================================================================
   MODERN UI THEME FOR DIETITIAN CRM
   ============================================================================ */

/* TYPOGRAPHY & FONTS */
html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
                 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.5px;
}

/* COLOR PALETTE - Health/Nutrition themed */
:root {
    --primary: #10b981;          /* Modern green - health/wellness */
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    --secondary: #f59e0b;        /* Warm amber - nutrition/food */
    --secondary-light: #fef3c7;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --info: #3b82f6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --bg-light: #f9fafb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* LINKS & BUTTONS */
a, .btn-link {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover, .btn-link:hover {
    color: var(--primary-dark);
}

.btn-primary {
    color: white;
    background-color: var(--primary);
    border-color: var(--primary);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* CONTENT LAYOUT */
.content {
    padding-top: 1.5rem;
}

h1:focus {
    outline: none;
}

/* FORM VALIDATION */
.valid.modified:not([type=checkbox]) {
    outline: 2px solid var(--success);
    outline-offset: 2px;
}

.invalid {
    outline: 2px solid var(--danger);
    outline-offset: 2px;
}

.validation-message {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ERROR BOUNDARY */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #ef4444;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* FORM ELEMENTS */
.darker-border-checkbox.form-check-input {
    border-color: var(--border-color);
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--text-secondary);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* MODERN CARD STYLING */
.modern-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.modern-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

/* UTILITY SPACING CLASSES */
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.section-spacing {
    padding: 1.5rem;
    margin-bottom: 0.5rem;
}

.mud-tabs-panels {
    padding: 16px;
}

/* LOGIN PAGE STYLING */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* ============================================================================
   LOGIN SHELL — two-pane: brand on the left, form on the right.
   Drops to a single column under 900 px so phones get the form filling
   the viewport (brand panel hidden — would push the form below the fold).
   ========================================================================= */

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    background: #f7f8fb;
}

.login-brand {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 48px 56px;
    display: flex;
    align-items: center;
    background:
        radial-gradient(900px 600px at 90% 110%, rgba(245,158,11,0.18), transparent 60%),
        radial-gradient(700px 600px at -10% -10%, rgba(255,255,255,0.18), transparent 50%),
        linear-gradient(135deg, #047857 0%, #059669 45%, #10b981 100%);
}

.login-brand-content {
    position: relative;
    z-index: 2;
    max-width: 460px;
    margin: 0 auto;
}

.login-brand-mark {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.2px;
    margin-bottom: 36px;
}

/* Icon cluster: drop (nutrition) + dumbbell (fitness) + cutlery (diet plan),
   each in a soft translucent circle. Signals "both dietitians and trainers"
   at a glance before any text is read. */
.login-brand-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}
.login-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.login-brand-title {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 8px;
    text-shadow: 0 2px 16px rgba(0,0,0,0.10);
}

/* Fitness-focused accent line under the title, in the warm secondary brand
   colour so it reads as a complementary audience, not a sub-heading. */
.login-brand-subtitle {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 16px;
    color: #fde68a;
    text-shadow: 0 1px 10px rgba(0,0,0,0.10);
}

.login-brand-tag {
    font-size: 1rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.92);
    margin: 0 0 28px;
    max-width: 420px;
}

.login-brand-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}
.login-brand-bullets li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.95);
}
.login-brand-bullets .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.85);
    box-shadow: 0 0 0 4px rgba(255,255,255,0.15);
    flex-shrink: 0;
}

.login-brand-blob {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}
.login-brand-blob.blob-a {
    width: 560px; height: 560px;
    top: -160px; right: -180px;
}
.login-brand-blob.blob-b {
    width: 460px; height: 460px;
    bottom: -200px; left: -120px;
}

.login-form-pane {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 32px 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
}

.login-form-wrap {
    width: 100%;
    max-width: 440px;
}

/* Lift the existing MudPaper login card slightly so it reads as elevated
   against the form pane's soft gradient. Keeps form layout unchanged. */
.login-form-wrap > .mud-paper {
    border-radius: 16px !important;
    box-shadow: 0 24px 60px -20px rgba(16,185,129,0.20), 0 4px 16px rgba(0,0,0,0.04) !important;
    border: 1px solid rgba(16,185,129,0.10);
}

.login-form-footer {
    margin-top: 24px;
    font-size: 0.78rem;
    color: #9ca3af;
}

/* Legacy class — kept so any old @Body content (and a couple of pages that
   refer to it) still has a wrapper to nest inside. */
.login-card-wrapper {
    width: 100%;
    max-width: 420px;
}

@media (max-width: 900px) {
    .login-shell {
        grid-template-columns: 1fr;
    }
    .login-brand {
        display: none;
    }
    .login-form-pane {
        padding: 32px 20px 24px;
        min-height: 100vh;
    }
}

/* ============================================================================
   SIDEBAR NAVIGATION
   ============================================================================ */

.sidebar-nav {
    padding: 8px 0 24px;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-section {
    margin-bottom: 4px;
}

.nav-section-label {
    display: block;
    padding: 18px 20px 6px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #9ca3af;
    text-transform: uppercase;
    user-select: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px 9px 16px;
    margin: 1px 10px;
    border-radius: 8px;
    color: #374151;
    text-decoration: none !important;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
    cursor: pointer;
    line-height: 1.4;
}

.nav-item:hover {
    background-color: #f0fdf4;
    color: #059669;
}

.nav-item.active {
    background-color: #d1fae5;
    color: #059669;
    font-weight: 600;
}

.nav-item-icon,
.nav-item .mud-icon-root {
    flex-shrink: 0;
    width: 20px !important;
    height: 20px !important;
    font-size: 20px !important;
    color: inherit !important;
}

/* ============================================================================
   STATS CARDS (Clients page)
   ============================================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-green  { background: #d1fae5; color: #059669; }
.stat-icon-blue   { background: #dbeafe; color: #2563eb; }
.stat-icon-amber  { background: #fef3c7; color: #d97706; }
.stat-icon-rose   { background: #ffe4e6; color: #e11d48; }

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 4px;
    font-weight: 500;
}

/* ============================================================================
   CLIENT AVATAR (Clients table)
   ============================================================================ */

.client-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.client-row-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.client-row-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: #111827;
}

.client-row-email {
    font-size: 0.75rem;
    color: #6b7280;
}

.goal-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.goal-chip-lose   { background: #dbeafe; color: #1d4ed8; }
.goal-chip-gain   { background: #d1fae5; color: #065f46; }
.goal-chip-keep   { background: #fef3c7; color: #92400e; }
.goal-chip-muscle { background: #ede9fe; color: #6d28d9; }

/* ============================================================================
   DASHBOARD STAT CARDS
   ============================================================================ */

.dash-stat-card {
    height: 100%;
    cursor: pointer;
    transition: box-shadow 0.25s ease, transform 0.25s ease !important;
}

.dash-stat-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-3px);
}
/* ============================================================================
   MOBILE RESPONSIVE — Phase 1: AppBar / Layout
   Additive only. Desktop layout must not regress.
   ============================================================================ */
@media (max-width: 720px) {
    /* Tighten AppBar padding on phones so brand + actions fit */
    .mud-appbar.app-topbar {
        padding-left: 4px;
        padding-right: 4px;
    }
    .app-topbar .app-brand {
        margin-left: 4px !important;
        gap: 6px !important;
    }
    .app-topbar .app-brand .mud-typography-h6 {
        font-size: 1.05rem;
    }
    /* Reduce default MudContainer side padding on phone to claim more width */
    .mud-main-content .mud-container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
}

/* ============================================================================
   MOBILE RESPONSIVE — Phase 2: Clients list + ClientProfile
   Additive only. Desktop layout must not regress.
   ============================================================================ */
@media (max-width: 720px) {
    /* Tighten generic section/tab padding on phone */
    .section-spacing {
        padding: 0.75rem;
    }
    .mud-tabs-panels {
        padding: 8px;
    }

    /* PageHeader: stack title + actions, full-width search/buttons on phone */
    .page-header {
        gap: 8px !important;
    }
    .page-header-actions {
        width: 100%;
    }
    .page-header-actions .mud-input-control,
    .page-header-actions .mud-input-control-input-control {
        min-width: 0 !important;
        width: 100%;
    }
    .page-header-actions .mud-button-root {
        flex: 1 1 auto;
    }

    /* Clients page: card grid stays 1 column with full row */
    .client-card-grid {
        grid-template-columns: 1fr !important;
    }

    /* Stats cards: 2-up on phones to keep summary compact */
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .stat-card {
        padding: 12px;
        gap: 8px;
    }
    .stat-icon {
        width: 36px;
        height: 36px;
    }
    .stat-value {
        font-size: 1.25rem;
    }
    .stat-label {
        font-size: 0.7rem;
    }

    /* Client category section: less side padding */
    .client-category-section {
        padding: 12px;
    }

    /* ClientProfile hero header: tighter on phone, action buttons full-width */
    .client-hero-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    .client-hero-actions > .mud-button-root {
        width: 100%;
    }

    /* InfoRow: stack label/value if very narrow */
    .info-row-mobile-stack > .mud-typography-caption {
        min-width: 0 !important;
    }
}

/* ============================================================================
   PUBLIC FORM LAYOUT (anonymous questionnaire response, etc.)
   Single centered column — no half-screen brand panel. Comfortable width so
   answer fields are full-size and readable on desktop, full-bleed on phones.
   ============================================================================ */
.publicform-shell {
    min-height: 100vh;
    background: #f1f5f9;
}
.publicform-topbar {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    padding: 14px 20px;
}
.publicform-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    max-width: 880px;
    margin: 0 auto;
    width: 100%;
}
.publicform-body {
    max-width: 880px;
    margin: 0 auto;
    padding: 28px 16px 72px;
    width: 100%;
    box-sizing: border-box;
}
/* Roomier answer textareas on the response form. */
.publicform-body .mud-input-control { font-size: 1rem; }

/* ============================================================================
   CLIENT PORTAL — meal-plan / workout-plan expansion panels
   Replaces the old `<ul><li>name — detail</li></ul>` dash-separated lists with
   a card-per-section + flex row layout. Also exposes an explicit "Detayları
   Gör" hint next to the panel chevron so mobile users see the affordance.
   ============================================================================ */
.portal-detail-hint {
    font-size: 0.78rem;
    color: #059669;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
@media (max-width: 480px) {
    /* On small phones save room: hide the text label, the chevron + the PDF
       icon button are still tappable affordances. */
    .portal-detail-hint { display: none; }
}
.portal-meal-card {
    background: #f9fafb;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #e5e7eb;
}
.portal-section-header {
    font-weight: 700;
    color: #047857;
    font-size: 0.95rem;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #d1fae5;
}
.portal-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dashed #f3f4f6;
}
.portal-row:last-child { border-bottom: none; }
.portal-row-name {
    font-weight: 500;
    color: #1f2937;
    flex: 1;
    min-width: 0;
}
.portal-row-detail {
    color: #6b7280;
    font-size: 0.85rem;
    text-align: right;
    flex-shrink: 0;
}
@media (max-width: 480px) {
    /* Stack on narrow phones — wide phones get the two-column row. */
    .portal-row { flex-direction: column; gap: 2px; align-items: flex-start; }
    .portal-row-detail { text-align: left; }
}

/* ============================================================================
   MOBILE RESPONSIVE — Phase 3: AppointmentsCalendar
   Hide the 7-col month grid on phone, show a stacked day list.
   ============================================================================ */
.cal-mobile-list { display: none; }

/* The desktop month grid — a real 7-column CSS grid (replaces the previous
   MudGrid layout where xs="12/7" was C# integer division and silently
   collapsed to 12-per-row, mis-aligning weekday headers and date cells). */
.cal-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}
.cal-month-headcell {
    padding: 8px 4px;
    text-align: center;
    border-radius: 4px;
}

@media (max-width: 720px) {
    .cal-desktop-grid { display: none !important; }
    .cal-mobile-list { display: block; }

    .cal-day-section {
        margin-bottom: 16px;
    }
    .cal-day-header {
        display: flex;
        align-items: baseline;
        gap: 8px;
        padding: 8px 4px;
        border-bottom: 1px solid #e5e7eb;
        margin-bottom: 8px;
    }
    .cal-day-num {
        font-size: 1.5rem;
        font-weight: 700;
        color: #1f2937;
        line-height: 1;
    }
    .cal-day-name {
        font-size: 0.85rem;
        color: #6b7280;
        font-weight: 500;
    }
    .cal-day-today {
        margin-left: auto;
        background: #3b82f6;
        color: white;
        font-size: 0.7rem;
        font-weight: 700;
        padding: 2px 8px;
        border-radius: 999px;
    }
    .cal-appt-card {
        display: block;
        width: 100%;
        text-align: left;
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 8px;
        cursor: pointer;
        transition: all 0.15s ease;
    }
    .cal-appt-card:hover,
    .cal-appt-card:focus {
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        transform: translateY(-1px);
        outline: none;
    }
    .cal-appt-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 4px;
    }
    .cal-appt-time {
        font-size: 1rem;
        font-weight: 700;
        color: #1f2937;
    }
    .cal-appt-status {
        font-size: 0.75rem;
        color: #6b7280;
        font-weight: 600;
    }
    .cal-appt-client {
        font-size: 0.9rem;
        color: #374151;
    }
}

/* ============================================================================
   MOBILE RESPONSIVE — Phase 4: MealPlanner
   Tighten paddings, make day-tabs scroll horizontally, sidebar collapses
   below day grid (already handled by MudItem xs=12 md=8/4).
   ============================================================================ */
@media (max-width: 720px) {
    /* Reduce MudPaper paddings throughout planner */
    .meal-planner-shell .mud-paper.pa-6 {
        padding: 14px !important;
    }
    .meal-planner-shell .mud-grid > .mud-grid-item {
        padding: 6px;
    }
    /* Day-buttons row: allow horizontal scroll instead of wrap */
    .meal-planner-shell .meal-day-strip,
    .meal-planner-shell > * > * > .d-flex.flex-wrap.gap-2.pa-4 {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 8px !important;
    }
    .meal-planner-shell > * > * > .d-flex.flex-wrap.gap-2.pa-4 > * {
        flex-shrink: 0;
    }
    /* Tighten meal card header buttons — reduce icon-button padding */
    .meal-planner-shell .mud-icon-button {
        padding: 4px;
    }
    /* Macros sidebar cards: less padding */
    .meal-planner-shell .mud-paper.pa-6.mb-4 {
        padding: 12px !important;
    }
    /* Top-of-page back button + title gap */
    .meal-planner-shell > .d-flex.align-center.mb-5 {
        gap: 8px !important;
        margin-bottom: 16px !important;
    }
}

/* ============================================================================
   MEAL PLANNER DAY STRIP
   Card-style weekday selector mirroring the workout planner's .wo-day-strip
   (kept in sync visually). Active day is solid teal with a halo; inactive
   cards are outlined white. Per-card meta shows the day's calorie total,
   coloured green (within target) / amber (off target). Purely a visual
   surface — SelectDay / _selectedDay behaviour is unchanged.
   ============================================================================ */
.mp-day-strip {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 12px;
}
.mp-day-strip::-webkit-scrollbar { height: 6px; }
.mp-day-strip::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
.mp-day-card {
    flex: 0 0 auto;
    min-width: 96px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1.5px solid #e5e7eb;
    background: white;
    color: #6b7280;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
    user-select: none;
    font-family: inherit;
}
.mp-day-card:hover {
    border-color: #10b981;
    color: #10b981;
}
.mp-day-card.active {
    background: #10b981;
    border-color: #059669;
    color: white;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.28);
    transform: translateY(-1px);
}
.mp-day-card-name {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.mp-day-card-meta {
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.85;
}
.mp-day-card-meta.met { color: #059669; }
.mp-day-card-meta.over { color: #d97706; }
/* On the active (teal) card the coloured meta would clash — keep it legible. */
.mp-day-card.active .mp-day-card-meta,
.mp-day-card.active .mp-day-card-meta.met,
.mp-day-card.active .mp-day-card-meta.over { color: rgba(255, 255, 255, 0.92); }

@media (max-width: 720px) {
    .mp-day-strip { padding: 8px; gap: 6px; }
    .mp-day-card { min-width: 80px; padding: 8px 10px; }
    .mp-day-card-name { font-size: 0.85rem; }
    .mp-day-card-meta { font-size: 0.66rem; }
}

/* ============================================================================
   MEAL PLANNER DRAG-DROP HOVER
   Highlight toggled by app.js (dcrmDrag) purely client-side while dragging —
   no SignalR round-trip per cursor move. Overrides the server-rendered inline
   background/border on the drop zone, so !important is required.
   ============================================================================ */
.meal-drop-zone.meal-drop-hover {
    background: #dbeafe !important;
    border-color: #3b82f6 !important;
}

/* ============================================================================
   SUBSCRIPTION BANNER ACTION
   The app-wide subscription warning strip (SubscriptionBanner.razor) lays its
   message + call-to-action button out with justify-space-between. MudAlert's
   message slot doesn't flex-grow by default, so without this the button would
   hug the text instead of pinning to the right edge of the strip.
   ============================================================================ */
.subscription-banner .mud-alert-message { flex: 1 1 auto; }
