/* ===================================================================
   APPLE-STYLE THEME (override layer)
   Carga este archivo DESPUES de styles.css para aplicar la estetica
   apple.com sobre el resto de la app. Mantiene la estructura existente.
   =================================================================== */

:root {
    /* Paleta Apple */
    --apple-white: #ffffff;
    --apple-bg-light: #f5f5f7;
    --apple-black: #000000;
    --apple-bg-dark: #1d1d1f;
    --apple-text: #1d1d1f;
    --apple-text-secondary: #6e6e73;
    --apple-text-tertiary: #86868b;
    --apple-text-light: #f5f5f7;

    /* Marca nutricionista.io: amarillo del logo + negro */
    --brand-yellow: #FFCC00;
    --brand-yellow-hover: #FFD60A;
    --brand-yellow-soft: #FFF5CC;
    --brand-black: #1d1d1f;
    --brand-black-hover: #2a2a2c;

    /* Sobrescribe los tokens del tema original */
    --primary: #1d1d1f;
    --primary-dark: #000000;
    --primary-light: #FFF5CC;
    --primary-gradient: #1d1d1f;
    --accent: #FFCC00;
    --accent-light: #FFF5CC;
    --purple: #1d1d1f;
    --purple-light: #FFF5CC;

    --bg: #f5f5f7;
    --bg-card: #ffffff;
    --text: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;
    --border: rgba(0, 0, 0, 0.08);
    --border-light: rgba(0, 0, 0, 0.05);

    --shadow-xs: none;
    --shadow: none;
    --shadow-md: none;
    --shadow-lg: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 1px 3px rgba(0, 0, 0, 0.04);

    --radius: 22px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --radius-full: 980px;
}

/* === Tipografia base === */
html, body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
                 "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #1d1d1f;
    letter-spacing: -0.015em;
    background: #f5f5f7;
}

h1, h2, h3, h4, h5, h6,
.gate-title,
.home-hero h2,
.home-hero-compact h2,
.page-title,
#page-title,
.section-title,
.modal-title {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
                 "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 600;
    letter-spacing: -0.022em;
    color: #1d1d1f;
    line-height: 1.08;
}

h1 { font-size: clamp(28px, 4.5vw, 40px); }
h2 { font-size: clamp(24px, 4vw, 32px); }
h3 { font-size: clamp(20px, 3.5vw, 24px); }
h4 { font-size: 18px; }

p, label, span, a, li, input, textarea, select, button {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
                 "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    letter-spacing: -0.01em;
}

p { line-height: 1.47; color: #1d1d1f; }
.subhead, .home-hero p, .auth-logo p {
    color: #6e6e73;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* === Fondos / pagina === */
body { background: #f5f5f7; }
#main-content { background: #f5f5f7; }
.page { background: transparent; }

/* === Botones estilo Apple (pill) === */
.btn {
    border-radius: 980px;
    font-weight: 400;
    letter-spacing: -0.01em;
    padding: 12px 22px;
    font-size: 17px;
    transition: background 0.2s ease, opacity 0.2s ease, transform 0.15s ease;
    box-shadow: none !important;
}
.btn-primary {
    background: #1d1d1f !important;
    color: #ffffff !important;
    box-shadow: none !important;
}
.btn-primary:hover { background: #000000 !important; }
.btn-primary:active { background: #000000 !important; transform: none; }

/* Variante acento amarillo de marca */
.btn-accent,
.btn-yellow {
    background: #FFCC00 !important;
    color: #1d1d1f !important;
    box-shadow: none !important;
    border-radius: 980px;
    font-weight: 500;
}
.btn-accent:hover, .btn-yellow:hover { background: #FFD60A !important; }

.btn-outline {
    background: transparent;
    color: #1d1d1f;
    border: 1px solid #1d1d1f;
}
.btn-outline:hover { background: rgba(0, 0, 0, 0.04); }

.btn-danger {
    background: #1d1d1f;
    color: #ffffff;
}
.btn-danger:hover { background: #2a2a2c; }

.btn-large { padding: 14px 28px; font-size: 17px; border-radius: 980px; }
.btn-small { padding: 8px 18px; font-size: 14px; border-radius: 980px; }

/* Variante link estilo Apple */
.btn-link, a.btn-link {
    color: #1d1d1f;
    font-size: 17px;
    text-decoration: none;
    background: transparent;
    padding: 0;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn-link::after { content: " \203A"; transition: transform 0.2s ease; }
.btn-link:hover::after { transform: translateX(3px); }

/* === Inputs === */
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="search"], input[type="tel"],
input[type="date"], input[type="time"], textarea, select {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 17px;
    color: #1d1d1f;
    letter-spacing: -0.01em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: none;
}
input:focus, textarea:focus, select:focus {
    border-color: #1d1d1f;
    box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.35);
    outline: none;
}

/* === Header (navbar Apple) === */
#app-header {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: none;
}
#app-header h2, #page-title {
    font-weight: 600;
    letter-spacing: -0.022em;
    color: #1d1d1f;
}
.header-logo { border-radius: 8px; }
.header-profile-btn {
    background: rgba(0, 0, 0, 0.04);
    color: #1d1d1f;
}
.header-profile-btn:hover { background: rgba(0, 0, 0, 0.08); }

/* === Bottom nav (claro y minimal) === */
.bottom-nav {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 980px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.bottom-nav-item {
    color: #86868b;
    font-weight: 400;
}
.bottom-nav-item.active {
    color: #1d1d1f;
    background: #FFCC00;
}
.bottom-nav-item:hover { color: #1d1d1f; }

/* === Cards / hero / contenedores === */
.home-hero,
.home-hero-compact,
.card,
.stat-card,
.feature-card,
.recipe-card,
.lesson-card,
.tracker-card,
.glass-card,
.section-card,
.list-card {
    background: #ffffff;
    border-radius: 22px;
    border: none;
    box-shadow: none;
    color: #1d1d1f;
}

.home-hero::before,
.home-hero::after { display: none !important; }

.home-hero h2,
.home-hero-compact h2 {
    color: #1d1d1f;
    font-weight: 600;
    letter-spacing: -0.022em;
}
.home-hero p { color: #6e6e73; }

/* Tarjetas tipo bento sobre el fondo gris claro */
.bento-card {
    background: #f5f5f7;
    border-radius: 28px;
    padding: 48px 36px;
}

/* === Auth screens === */
#auth-screen,
#gate-screen {
    background: #f5f5f7 !important;
}
.auth-logo h1, .gate-title {
    font-weight: 600;
    letter-spacing: -0.022em;
    color: #1d1d1f;
}
.auth-form input,
.pin-box {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 14px;
}
.pin-box:focus,
.pin-box.filled {
    border-color: #1d1d1f;
    background: #FFF5CC;
    box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.35);
}

.auth-notice {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    color: #6e6e73 !important;
}
.auth-notice a { color: #1d1d1f !important; font-weight: 600 !important; border-bottom: 2px solid #FFCC00; }

/* === Links === */
a {
    color: #1d1d1f;
    text-decoration: none;
    letter-spacing: -0.01em;
}
a:hover { text-decoration: underline; text-decoration-color: #FFCC00; text-decoration-thickness: 2px; }

/* === Quitar gradientes / sombras agresivas globalmente === */
*[class*="gradient"] {
    background-image: none;
}
*[style*="box-shadow"] { /* no-op: dejamos los inline si los hay */ }

/* === Modales === */
.modal, .modal-content, .modal-body {
    background: #ffffff;
    border-radius: 22px;
    border: none;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}
.modal-overlay {
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* === Chips / pills === */
.chip, .tag, .badge {
    background: #f5f5f7;
    color: #1d1d1f;
    border-radius: 980px;
    font-weight: 500;
    letter-spacing: -0.01em;
    border: none;
}
.chip.active, .tag.active, .badge.active,
.chip.selected, .tag.selected {
    background: #1d1d1f;
    color: #ffffff;
}

/* === Tablas === */
table { border-collapse: collapse; }
th, td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 12px 8px;
    font-size: 15px;
    letter-spacing: -0.01em;
}
th { font-weight: 600; color: #1d1d1f; }

/* === Animacion sutil de entrada de pagina === */
@keyframes appleFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.page.active { animation: appleFadeIn 0.5s ease both; }

/* === Scrollbar discreto === */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 980px;
}
::-webkit-scrollbar-track { background: transparent; }

/* === Quitar emojis decorativos === */
.emoji-decor, .decor-emoji { display: none !important; }

/* === Tipografia hero a lo Apple en pantallas medias/grandes === */
@media (min-width: 768px) {
    .home-hero h2,
    .home-hero-compact h2 {
        font-size: clamp(32px, 4vw, 56px);
        line-height: 1.07;
    }
    .page { padding: 32px; }

    /* Desktop: oculta el logo del header (el sidebar ya tiene branding) */
    #app-header .header-logo { display: none; }
    #app-header > a:first-child { display: none !important; }

    /* Sidebar (desktop): logo nutricionista.io en negro solido, activo en amarillo */
    .bottom-nav {
        background: #ffffff !important;
        border-right: 1px solid rgba(0, 0, 0, 0.06) !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    .bottom-nav::before {
        content: 'Área Privada';
        background: #1d1d1f !important;
        -webkit-background-clip: text !important;
        background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        font-weight: 600 !important;
        font-size: 20px !important;
        letter-spacing: -0.022em !important;
        padding: 6px 14px 2px !important;
        border-bottom: none !important;
        margin-bottom: 0 !important;
        line-height: 1.15 !important;
        order: -2;
    }
    .bottom-nav::after {
        content: 'de nutricionista.io';
        display: block;
        font-style: italic;
        font-weight: 400;
        font-size: 13px;
        color: #6e6e73;
        letter-spacing: -0.01em;
        padding: 0 14px 16px;
        margin-bottom: 6px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        order: -1;
    }
    .bottom-nav-item.active {
        background: #FFCC00 !important;
        color: #1d1d1f !important;
        box-shadow: none !important;
        font-weight: 600;
    }
    .bottom-nav-item.active:hover { color: #1d1d1f !important; }
}

/* === Acentos amarillos para elementos visualmente azules === */

/* Links de "Anadir alimento" y similares dentro de cards */
.nt-meal-card a,
.nt-meal-card button,
.meal-add-link,
[class*="anadir"],
[class*="add-food"] {
    color: #1d1d1f !important;
}

/* Chips/tabs estilo kcal-tab y filtros activos */
.kcal-tab.active,
.tab.active,
.filter-tab.active,
.recipe-filter.active,
.macro-tab.active {
    background: #1d1d1f !important;
    color: #ffffff !important;
    border-color: #1d1d1f !important;
}

.kcal-tab,
.tab,
.filter-tab {
    border-radius: 980px;
}

/* Macro pills (P/G/CH) usan amarillo suave para el de hidratos */
.macro-pill, .nt-pill, .ingredient-macro {
    background: #f5f5f7;
    color: #1d1d1f;
    border-radius: 980px;
    font-weight: 500;
}

/* Numeros de "restante" y datos clave en negro semibold */
.macro-remaining,
.kcal-remaining,
[class*="-rest"],
.macro-value-rest {
    color: #1d1d1f !important;
    font-weight: 600;
}

/* Progress rings / barras: trazo en amarillo, base en gris */
.progress-ring-fill,
.progress-bar-fill,
.macro-ring-fill,
circle[stroke="#3B82F6"],
circle[stroke="var(--primary)"] {
    stroke: #FFCC00 !important;
}
.progress-bar,
.macro-bar-bg {
    background: rgba(0, 0, 0, 0.06) !important;
}
.progress-bar-fill,
.macro-bar-fill {
    background: #FFCC00 !important;
}

/* Iconos coloreados con stroke azul -> negro */
svg [stroke="#3B82F6"],
svg [stroke="#2563EB"],
svg [fill="#3B82F6"],
svg [fill="#2563EB"] {
    stroke: #1d1d1f;
    fill: #1d1d1f;
}

/* Toggle switches: ON en amarillo */
input[type="checkbox"]:checked + .toggle-slider,
.toggle-switch.active,
.switch.on {
    background: #FFCC00 !important;
}

/* Date selector "Hoy" y flechas */
.date-selector,
.date-nav,
.day-selector {
    color: #1d1d1f;
}
.date-selector .current,
.date-selector .today {
    font-weight: 600;
    color: #1d1d1f;
}

/* Selection text */
::selection { background: #FFCC00; color: #1d1d1f; }

/* Caret en inputs amarillo no, mejor negro */
input, textarea { caret-color: #1d1d1f; }

/* ===================================================================
   MI DIARIO — rediseno profesional
   =================================================================== */

/* --- Date nav: acciones rapidas a la derecha --- */
.nt-date-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0 16px;
    flex-wrap: wrap;
}
.nt-date-label {
    background: transparent;
    border: none;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.022em;
    color: #1d1d1f;
    padding: 8px 12px;
    border-radius: 980px;
    cursor: pointer;
    min-width: 140px;
}
.nt-date-label:hover { background: rgba(0, 0, 0, 0.04); }

.nt-date-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nt-streak {
    font-size: 12px;
    font-weight: 600;
    color: #1d1d1f;
    background: #FFF5CC;
    border: 1px solid rgba(255, 204, 0, 0.4);
    padding: 4px 10px 4px 8px;
    border-radius: 980px;
    display: none;
    align-items: center;
    gap: 4px;
    letter-spacing: -0.01em;
}
.nt-streak.visible { display: inline-flex; }
.nt-streak::before {
    content: "";
    width: 6px;
    height: 6px;
    background: #FFCC00;
    border-radius: 50%;
    margin-right: 2px;
}

.nt-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #1d1d1f;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: 980px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    letter-spacing: -0.01em;
}
.nt-quick-btn:hover { background: #FFF5CC; border-color: #FFCC00; }
.nt-quick-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* --- Hero ring: anillo grande + macros concentricos --- */
.nt-macros-hero {
    background: #ffffff;
    border-radius: 22px;
    padding: 24px 20px 20px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
}

.nt-hero-ring-wrap {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto;
}
.nt-hero-ring { width: 100%; height: 100%; display: block; }
.nt-hero-ring circle {
    transition: stroke-dashoffset 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.nt-hero-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    text-align: center;
}
.nt-hero-kcal {
    font-size: 44px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1;
    color: #1d1d1f;
}
.nt-hero-kcal-unit {
    font-size: 13px;
    color: #6e6e73;
    letter-spacing: -0.01em;
    margin-top: 2px;
}
.nt-hero-goal {
    font-size: 13px;
    color: #6e6e73;
    margin-top: 6px;
    letter-spacing: -0.01em;
}
.nt-hero-pct {
    font-size: 12px;
    font-weight: 600;
    color: #1d1d1f;
    background: #FFF5CC;
    border-radius: 980px;
    padding: 3px 10px;
    margin-top: 8px;
    letter-spacing: -0.01em;
}
.nt-hero-pct.exceeded { background: #FFE5E5; color: #C0392B; }

/* Macro chips bajo el anillo */
.nt-macro-chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.nt-macro-chip {
    background: #f5f5f7;
    border-radius: 14px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.nt-macro-chip-head {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.nt-macro-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.nt-macro-name {
    font-size: 12px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nt-macro-vals {
    font-size: 13px;
    color: #1d1d1f;
    white-space: nowrap;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nt-macro-vals strong {
    color: #1d1d1f;
    font-weight: 600;
    margin-right: 1px;
}
.nt-macro-vals .nt-macro-goal {
    color: #86868b;
    font-weight: 400;
}
.nt-macro-bar {
    height: 4px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 980px;
    overflow: hidden;
}
.nt-macro-bar-fill {
    height: 100%;
    width: 0;
    border-radius: 980px;
    transition: width 0.5s ease;
}

/* Balance bar */
.nt-balance {
    padding-top: 6px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.nt-balance-track {
    position: relative;
    height: 6px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 980px;
    overflow: visible;
    margin-bottom: 8px;
}
.nt-balance-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #FFCC00 0%, #1d1d1f 100%);
    border-radius: 980px;
    transition: width 0.5s ease;
}
.nt-balance-marker {
    position: absolute;
    top: -2px;
    width: 2px;
    height: 10px;
    background: #1d1d1f;
    border-radius: 2px;
    transform: translateX(-50%);
}
.nt-balance-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6e6e73;
    letter-spacing: -0.01em;
}
.nt-balance-meta strong { color: #1d1d1f; font-weight: 600; }

/* --- Meal cards densos --- */
.nt-meal-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 16px 18px 14px;
    margin-bottom: 12px;
    border: none;
    transition: box-shadow 0.2s ease;
}
.nt-meal-card:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); }

.nt-meal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.nt-meal-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}
.nt-meal-status.has-entries { background: #FFCC00; }
.nt-meal-status.exceeded { background: #1d1d1f; }
.nt-meal-title {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.015em;
}
.nt-meal-time {
    font-size: 12px;
    color: #86868b;
    font-weight: 400;
    letter-spacing: -0.01em;
    margin-left: 2px;
}
.nt-meal-kcal {
    margin-left: auto;
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.01em;
}
.nt-meal-kcal.empty { color: #86868b; font-weight: 400; }

.nt-meal-macro-bar {
    display: flex;
    height: 4px;
    border-radius: 980px;
    overflow: hidden;
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.04);
}
.nt-meal-macro-bar .seg-p { background: #1d1d1f; }
.nt-meal-macro-bar .seg-f { background: #86868b; }
.nt-meal-macro-bar .seg-c { background: #FFCC00; }
.nt-meal-macro-bar.empty { background: rgba(0, 0, 0, 0.04); }

.nt-meal-entries {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 4px;
}

.nt-entry {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.nt-entry:hover { background: transparent; }
.nt-entry:last-child { border-bottom: none; }
.nt-entry-name {
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    letter-spacing: -0.01em;
}
.nt-entry-meta {
    font-size: 11px;
    color: #86868b;
    letter-spacing: -0.01em;
}
.nt-entry-kcal {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.01em;
}
.nt-pill,
.nt-aside-recipe-macros .nt-pill,
span.nt-pill[style] {
    background: #f5f5f7 !important;
    background-color: #f5f5f7 !important;
    color: #1d1d1f !important;
    border-radius: 980px !important;
    padding: 2px 8px !important;
    font-size: 10px !important;
    font-weight: 500 !important;
}

/* Aside tabs: filtros por rango de kcal -> scroll horizontal compacto */
.nt-aside-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    min-height: 32px;
    align-items: center;
}
.nt-aside-tabs::-webkit-scrollbar { display: none; }
.nt-aside-tab {
    flex: 0 0 auto !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    min-height: 28px;
    white-space: nowrap;
    background: #f5f5f7 !important;
    color: #1d1d1f !important;
    border: none !important;
    border-radius: 980px !important;
    cursor: pointer;
    box-shadow: none !important;
    letter-spacing: -0.01em;
}
.nt-aside-tab:hover { background: #ececef !important; }
.nt-aside-tab.active {
    background: #1d1d1f !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.nt-entry-del {
    background: transparent;
    border: none;
    color: #86868b;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.nt-entry-del:hover { background: rgba(0, 0, 0, 0.06); color: #1d1d1f; }

/* Quick chips: comidas habituales (1 toque) */
.nt-quick-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 8px 0 2px;
}
.nt-quick-chips-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #86868b;
    margin-right: 2px;
}
.nt-quick-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FFF7DB;
    border: 1px solid #FFE680;
    color: #7a5d00;
    border-radius: 999px;
    padding: 6px 10px 6px 12px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    max-width: 220px;
}
.nt-quick-chip:hover {
    background: #FFE680;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 204, 0, 0.25);
}
.nt-quick-chip-name {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nt-quick-chip-kcal {
    font-size: 11px;
    font-weight: 700;
    color: #b45309;
    background: rgba(255, 255, 255, 0.6);
    padding: 1px 6px;
    border-radius: 999px;
}

/* Meal actions: dos botones cuando vacio (anadir + escanear) */
.nt-meal-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.nt-meal-card .nt-add-food-btn {
    flex: 1;
    width: auto;
    background: #f5f5f7;
    border: none !important;
    border-top: none !important;
    color: #1d1d1f;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.15s ease;
    letter-spacing: -0.01em;
    margin-top: 0;
}
.nt-meal-card .nt-add-food-btn:hover { background: #FFF5CC; }

.nt-scan-meal-btn {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #1d1d1f;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.nt-scan-meal-btn:hover { background: #FFF5CC; border-color: #FFCC00; }

.nt-save-recipe-btn {
    margin-top: 8px;
    background: transparent;
    border: none;
    color: #86868b;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: -0.01em;
}
.nt-save-recipe-btn:hover { color: #1d1d1f; }

/* Goals btn */
.nt-goals-btn {
    background: transparent;
    border: 1px dashed rgba(0, 0, 0, 0.12);
    color: #6e6e73;
    border-radius: 14px;
    padding: 12px;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.01em;
}
.nt-goals-btn:hover { border-color: #1d1d1f; color: #1d1d1f; background: transparent; }

/* Empty state global del dia (no comidas y dia con hora avanzada) */
.nt-day-empty {
    background: #ffffff;
    border-radius: 18px;
    padding: 24px;
    text-align: center;
    margin-bottom: 16px;
}
.nt-day-empty h4 {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.022em;
    margin-bottom: 6px;
}
.nt-day-empty p {
    font-size: 14px;
    color: #6e6e73;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

/* === Histórico semanal === */
.nt-history-card {
    background: #ffffff;
    border-radius: 22px;
    padding: 20px;
    margin-top: 16px;
}
.nt-history-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}
.nt-history-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: #1d1d1f;
}
.nt-history-avg {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.nt-history-avg-label {
    font-size: 11px;
    color: #86868b;
    letter-spacing: -0.01em;
}
.nt-history-avg-val {
    font-size: 17px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.015em;
    line-height: 1;
}
.nt-history-avg-unit { font-size: 12px; font-weight: 400; color: #6e6e73; }

.nt-history-macros {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 8px 0 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 12px;
    color: #6e6e73;
    letter-spacing: -0.01em;
    align-items: center;
}
.nt-history-macros .nt-macro-dot {
    display: inline-block;
    margin-right: 4px;
    vertical-align: middle;
}
.nt-history-macros strong { color: #1d1d1f; font-weight: 600; }
.nt-history-adh {
    margin-left: auto;
    background: #FFF5CC;
    color: #1d1d1f;
    border-radius: 980px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
}

.nt-history-rows {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.nt-history-row {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: background 0.15s ease;
    border-radius: 8px;
}
.nt-history-row:last-child { border-bottom: none; }
.nt-history-row:hover { background: rgba(0, 0, 0, 0.02); }
.nt-history-row.today { font-weight: 600; }
.nt-history-row.today .nt-history-day { color: #1d1d1f; }
.nt-history-day {
    font-size: 13px;
    color: #6e6e73;
    letter-spacing: -0.01em;
    text-transform: capitalize;
}
.nt-history-day small {
    display: block;
    font-size: 11px;
    color: #86868b;
    font-weight: 400;
    margin-top: 1px;
}
.nt-history-bar-wrap {
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 980px;
    overflow: hidden;
    position: relative;
}
.nt-history-bar-fill {
    height: 100%;
    background: #FFCC00;
    border-radius: 980px;
    transition: width 0.4s ease;
}
.nt-history-bar-fill.exceeded { background: #1d1d1f; }
.nt-history-bar-fill.empty { background: transparent; }
.nt-history-kcal {
    font-size: 13px;
    color: #1d1d1f;
    font-weight: 500;
    letter-spacing: -0.01em;
    min-width: 70px;
    text-align: right;
}
.nt-history-kcal.zero { color: #c5c5c8; font-weight: 400; }

@media (max-width: 1023px) {
    .nt-history-card { padding: 16px; }
    .nt-history-row { grid-template-columns: 48px 1fr auto; gap: 8px; }
}

/* ===================================================================
   MOVIL (< 1024px): Mi Diario ajustes
   =================================================================== */
@media (max-width: 1023px) {
    /* Orden: resumen arriba, comidas abajo */
    .nt-layout {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    .nt-col-summary { order: 1; margin-bottom: 16px; }
    .nt-col-meals   { order: 2; }

    /* Date nav: que la fila no rompa de forma rara */
    .nt-date-nav {
        gap: 4px;
        padding: 0 0 14px;
    }
    .nt-date-label {
        font-size: 15px;
        min-width: 100px;
        padding: 8px 8px;
    }
    .nt-date-actions {
        gap: 6px;
        margin-left: auto;
    }
    .nt-quick-btn {
        font-size: 12px;
        padding: 6px 10px;
    }
    .nt-quick-btn span { display: none; }
    .nt-quick-btn { width: 32px; height: 32px; justify-content: center; padding: 0; }
    .nt-streak {
        font-size: 11px;
        padding: 3px 8px 3px 6px;
    }

    /* Anillo hero un poco mas pequeno */
    .nt-hero-ring-wrap { width: 180px; height: 180px; }
    .nt-hero-kcal { font-size: 38px; }
    .nt-hero-goal { font-size: 12px; }
    .nt-hero-pct { font-size: 11px; padding: 2px 8px; }

    /* Macro chips compactos */
    .nt-macro-chip { padding: 8px 10px; gap: 4px; }
    .nt-macro-name { font-size: 11px; }
    .nt-macro-vals { font-size: 12px; }

    /* Meal cards */
    .nt-meal-card { padding: 14px 14px 12px; border-radius: 16px; }
    .nt-meal-title { font-size: 14px; }
    .nt-meal-time { font-size: 11px; }
    .nt-meal-kcal { font-size: 13px; }
    .nt-add-food-btn,
    .nt-meal-card .nt-add-food-btn { font-size: 13px; padding: 10px 12px; }

    /* Goals btn */
    .nt-goals-btn { padding: 11px; font-size: 12px; }
}

@media (max-width: 380px) {
    /* Pantallas muy estrechas: hero mas pequeno */
    .nt-hero-ring-wrap { width: 160px; height: 160px; }
    .nt-hero-kcal { font-size: 32px; }
    .nt-macros-hero { padding: 18px 14px 14px; }
    .nt-macro-chips { gap: 6px; }
    .nt-macro-chip { padding: 8px; }
    .nt-macro-name { font-size: 10px; }
    .nt-macro-vals { font-size: 11px; }

    /* Date label aun mas compacto */
    .nt-date-label { min-width: 80px; font-size: 14px; }
    .nt-streak { display: none !important; } /* libera espacio */
}
