/* ─── Importar Material Symbols (por si no está en index.html) ─── */
/* Ya está en index.html, no se re-importa aquí */

/* ─── Reset minimalista ─────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

img,
video {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

ul,
ol {
    list-style: none;
    padding: 0;
    margin: 0;
}


.bg-emerald-light {
    background-color: var(--primary-light);
}

/* ─── Layout base ────────────────────────────────────────────────── */
#app {
    min-height: 100dvh;
    background: var(--bg);
    color: var(--on-surface);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.main-content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 clamp(1rem, 3vw, 3rem);
    max-width: 1216px;
    /* 1200 + padding */
    margin: 0 auto;
    width: 100%;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    padding: 0 0.25rem;
    padding-left: clamp(1rem, 4vw, 3.5rem);
}

.dashboard-header h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 800;
    color: var(--on-surface);
    letter-spacing: -0.5px;
    margin: 0;
}

.screen-wrapper {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* ─── Animación Fade In ──────────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp .25s ease forwards;
}

/* ─── Loading / Empty States ─────────────────────────────────────── */
.loading-state,
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 60dvh;
    color: var(--on-surface-variant);
    text-align: center;
}

.loading-inline {
    display: flex;
    justify-content: center;
    padding: 24px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    padding: clamp(2rem, 5vw, 4rem) 1rem;
    text-align: center;
    color: var(--on-surface-variant);
    grid-column: 1 / -1;
}

.empty-msg {
    color: var(--on-surface-variant);
    text-align: center;
    padding: 24px;
}

/* ─── Spinner ─────────────────────────────────────────────────────── */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ─── Spinner ─────────────────────────────────────────────────────── */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--surface-variant);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

.spinner-sm {
    width: 24px;
    height: 24px;
    border: 2px solid var(--surface-variant);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

/* ─── Toast Container ───────────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 6000;
    pointer-events: none;
}

.toast {
    background: var(--on-surface);
    color: var(--bg);
    padding: 14px var(--space-lg);
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    width: min(480px, 92vw);
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--error);
}

/* Animations for Toasts */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.slide-in {
    animation: slideInUp 0.4s cubic-bezier(0.2, 0, 0, 1) forwards;
}

.slide-out {
    animation: slideOutDown 0.4s cubic-bezier(0.2, 0, 0, 1) forwards;
}

/* ─── Chips de Categoría (Stitch) ─────────────────────────────────── */
.filter-chips {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    padding: var(--space-xs) var(--space-md);
    margin: 0 calc(-1 * var(--space-md));
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-chips::-webkit-scrollbar {
    display: none;
}

.chip {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: var(--space-xs);
    cursor: pointer;
    transition: var(--transition-base);
}

.chip .material-symbols-outlined {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    color: var(--on-surface-variant);
    border-radius: var(--radius-full);
    font-size: 28px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.chip.active .material-symbols-outlined {
    background: var(--secondary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 8px 16px oklch(from var(--secondary) l c h / 0.3);
}

.chip span:not(.material-symbols-outlined) {
    font-size: 12px;
    font-weight: 600;
    color: var(--on-surface-variant);
}

.chip.active span:not(.material-symbols-outlined) {
    color: var(--primary);
}

/* ─── Tarjetas de Receta Compactas (Modo Lista) ─────────────────── */
.card-compact {
    display: flex;
    gap: var(--space-md);
    background: var(--surface);
    padding: var(--space-sm);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    cursor: pointer;
    transition: var(--transition-base);
    border: 1px solid var(--outline-variant);
}

.card-compact:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.card-compact__img {
    width: clamp(80px, 12vw, 120px);
    height: clamp(80px, 12vw, 120px);
    flex-shrink: 0;
}

.card-compact__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.card-compact__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.card-compact__info h4 {
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    font-weight: 700;
    color: var(--on-surface);
}

.card-compact__info p {
    font-size: 12px;
    color: var(--on-surface-variant);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-compact__time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    margin-top: 4px;
}

/* ─── Screen Header (Navegación Mashup) ─────────────────────────── */
.top-bar {
    background: var(--bg);
    padding: var(--space-md) var(--space-lg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-mobile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.header-mobile-title {
    font-size: 20px;
    font-weight: 800;
    font-family: var(--font-display);
    color: var(--on-surface);
}

.top-bar-inner {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.search-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    height: 52px;
    background: var(--surface);
    border: 1px solid var(--outline);
    border-radius: var(--radius-full);
    padding: 0 48px;
    font-size: 16px;
    color: var(--on-surface);
    transition: var(--transition-base);
    box-shadow: var(--shadow-subtle);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px oklch(from var(--primary) l c h / 0.1);
}

.search-icon {
    position: absolute;
    right: 16px;
    color: var(--on-surface-variant);
    pointer-events: none;
}

.mobile-menu-trigger {
    position: absolute;
    left: 16px;
    background: none;
    border: none;
    color: var(--on-surface-variant);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.user-profile-avatar-only img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: 2px solid var(--surface);
    box-shadow: var(--shadow-sm);
}

/* ─── Navegación Móvil (Stitch) ─────────────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: var(--surface);
    display: none;
    /* Visible solo en móviles vía responsive.css */
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    border-top: 1px solid var(--outline);
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--on-surface-variant);
    transition: var(--transition-base);
    flex: 1;
}

.nav-btn.active {
    color: var(--primary);
}

.nav-btn.active .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
}

.nav-label {
    font-size: 11px;
    font-weight: 600;
}

/* ─── Dual FAB (Stitch Estilo) ──────────────────────────────────── */
.dual-fab {
    position: fixed;
    bottom: calc(72px + 24px);
    /* Por encima del bottom-nav */
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 999;
}

.fab-primary,
.fab-secondary {
    border: none;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: var(--transition-base);
}

.fab-primary {
    width: 64px;
    height: 64px;
    background: var(--secondary);
    color: white;
}

.fab-secondary {
    width: 48px;
    height: 48px;
    background: var(--surface);
    color: var(--primary);
    border: 1px solid var(--outline);
}

.fab-primary:active,
.fab-secondary:active {
    transform: scale(0.9);
}

/* ────────────────────────────────────────────────────────────────── */

.btn-icon.text-primary {
    color: var(--primary);
}

.btn-icon.text-danger {
    color: var(--error);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 24px;
    height: 48px;
    border-radius: 24px;
    border: none;
    background: var(--primary);
    color: var(--on-primary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: box-shadow .2s, opacity .2s;
    box-shadow: var(--elevation-1);
}

.btn-primary:hover {
    box-shadow: var(--elevation-2);
}

.btn-primary:active {
    opacity: .9;
}

.btn-primary[disabled] {
    opacity: .5;
    cursor: not-allowed;
}

/* ─── View Modes (Grid vs List) ────────────────────────────────── */
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    /* Mobile friendly default */
    gap: 16px;
}

@media (min-width: 768px) {
    .recipes-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
}

/* List View Override */
.recipes-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: white;
    border: 1px solid var(--outline);
    border-radius: 12px;
    overflow: hidden;
}

/* Obsolete flex-based .file-row removed to avoid conflicts with grid layout below */

@media (max-width: 767px) {
    .file-row .meta-mobile {
        display: block;
    }
}

.file-row .meta {
    font-size: 13px;
    color: var(--text-secondary);
}

/* New Dropbox Style List Columns */
/* Material 3 Expressive - Dashboard List */
.list-view {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: transparent;
    padding: 0;
    width: 100%;
}

/* --- Unified List View Grid --- */
.list-header-m3,
.file-row-m3 {
    display: grid;
    /* icon | name | category | access | updated | actions */
    grid-template-columns: 40px 1fr 140px 120px 160px 100px;
    /* icon reduced from 56px */
    gap: 1rem;
    align-items: center;
    padding: 0 1.6rem;
    height: 44px;
    /* Reduced from 52px */
    width: 100%;
    box-sizing: border-box;
    text-decoration: none;
    color: inherit;
}

.list-header-m3 {
    background: var(--bg);
    border-bottom: 1px solid var(--outline-variant);
    color: var(--on-surface-variant);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    position: sticky;
    top: 0;
    z-index: 10;
}

.file-row-m3 {
    background: var(--bg);
    border-bottom: 1px solid var(--outline-variant);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    height: 64px;
    /* Slightly taller for items */
}

.file-row-m3:hover {
    background: var(--surface);
    transform: none;
    /* No scaling in list view */
}

@media (max-width: 1023px) {

    .list-header-m3,
    .file-row-m3 {
        grid-template-columns: 48px 1fr 40px;
    }

    .col-category,
    .col-access,
    .col-date {
        display: none !important;
    }

    .hidden-mobile-lg {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .list-header {
        display: none;
    }

    .file-row {
        display: flex;
        gap: 16px;
        padding: 16px;
        border-radius: 12px;
        background: white;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }

    .file-row .meta-cell {
        display: none;
    }
}

.action-cell {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* --- Dropbox-style Hover Actions --- */
.row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateX(10px);
    pointer-events: none;
    padding-left: 12px;
    height: 100%;
}

.file-row:hover .row-actions {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.btn-action-icon,
.btn-favorite-m3 {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--on-surface-variant);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.btn-action-icon:hover,
.btn-favorite-m3:hover {
    background-color: var(--surface-container-high);
    color: var(--primary);
}

.btn-favorite-m3.active {
    color: #FFB800;
    /* Gold for favorites */
}

.btn-action-icon .material-symbols-outlined,
.btn-favorite-m3 .material-symbols-outlined {
    font-size: 20px;
}

.icon-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: var(--surface-container);
    color: #5F6368;
    border-radius: 8px;
    transition: background 0.2s;
}

/* --- Content Cell Styles (Restored) --- */
.recipe-name {
    font-weight: 700;
    color: var(--on-surface);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
}

.col-name {
    display: flex;
    align-items: center;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.meta-cell {
    font-size: 14px;
    color: var(--on-surface-variant);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
}

/* Reset header backgrounds and paddings */
.list-header .icon-cell,
.list-header .meta-cell,
.list-header .title-cell {
    background: transparent;
    padding: 0;
    width: auto;
    height: auto;
    color: inherit;
}

.badge-tag {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    background: var(--surface-container-high);
    color: var(--on-surface-variant);
    border: 1px solid var(--outline-variant);
}


.btn-favorite-m3:hover {
    background: var(--surface-container-high);
    color: var(--primary);
}

.btn-favorite-m3 .material-symbols-outlined {
    font-size: 20px;
    transition: font-variation-settings 0.2s;
}

.btn-favorite-m3.active {
    color: var(--primary);
}

.btn-favorite-m3.active .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
}

/* M3 Expressive Card Grid */
.card-recipe {
    background: var(--surface-container-low);
    border-radius: 24px;
    /* M3 extra large */
    border: 1px solid transparent;
    padding: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-recipe:hover {
    background: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
    border-color: var(--outline-variant);
}

.card-recipe__img {
    border-radius: 20px;
    overflow: hidden;
    background: var(--surface-variant);
}

.file-row .actions {
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    gap: 4px;
}

/* Always show more-vert on mobile if needed, or handle via tap */
@media (max-width: 768px) {
    .file-row .actions {
        opacity: 1;
        /* Always visible on mobile if we decide to show actions */
        display: none;
        /* Hide default actions to keep clean, maybe show just one? */
    }

    .file-row .mobile-action {
        display: flex;
        color: var(--text-secondary);
    }
}

.file-row:hover .actions {
    opacity: 1;
}

/* ─── Folder Grid Styling ────────────────────────────────────────── */
.folder-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 768px) {
    .folder-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

.folder-card {
    background: white;
    border: 1px solid var(--outline);
    /* or border-gray-200 equivalent */
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    height: 160px;
    text-decoration: none;
    color: inherit;
}

.folder-card:hover {
    background-color: var(--surface-variant);
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-light);
}

.folder-card .icon {
    font-size: 48px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-variation-settings: 'FILL' 1;
}

.folder-card:hover .icon {
    color: var(--primary);
}

.folder-card .title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

.folder-card .subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* New Folder Card (Dashed) */
.folder-card.new-folder {
    background-color: var(--surface-variant);
    border: 1px dashed var(--outline);
}

.folder-card.new-folder .icon {
    font-size: 32px;
    font-variation-settings: 'FILL' 0;
}

.btn-ghost-sm {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 16px;
    border: none;
    background: transparent;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background .2s;
}

.btn-ghost-sm:hover {
    background: oklch(from var(--primary) l c h / 0.12);
}

.btn-icon-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--error);
    cursor: pointer;
    transition: background .2s;
    flex-shrink: 0;
}

.btn-icon-danger:hover {
    background: oklch(from var(--error) l c h / 0.12);
}

/* ─── Formularios ─────────────────────────────────────────────────── */
.form-screen {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    padding-bottom: 32px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 80px;
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--on-surface-variant);
    letter-spacing: .4px;
}

.input-field {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1.5px solid var(--outline);
    background: var(--surface-container);
    color: var(--on-surface);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px oklch(from var(--primary) l c h / 0.15);
}

select.input-field {
    cursor: pointer;
}

.form-error {
    background: oklch(from var(--error) l c h / 0.12);
    color: var(--error);
    border-left: 3px solid var(--error);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 8px;
    display: none;
}

.form-success {
    background: oklch(from var(--tertiary) l c h / 0.12);
    color: var(--tertiary);
    border-left: 3px solid var(--tertiary);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 8px;
}

/* ─── Premium Auth Screen (Centered Card) ─────────────────────────── */
.auth-bg {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F8F9FA;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: #FFFFFF;
    border-radius: 32px;
    padding: 40px 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
    animation: fadeInUp 0.4s ease;
}

.auth-logo-box {
    width: 64px;
    height: 64px;
    background: #FFEEE8;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 2rem;
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #1A1A1A;
    margin: 0 0 8px;
    font-family: var(--font-display);
}

.auth-header p {
    color: #64748B;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

.auth-social-btn {
    width: 100%;
    height: 56px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1.5px solid #E2E8F0;
    background: #FFFFFF;
    color: #1A1A1A;
}

.auth-social-btn:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
}

.auth-social-btn.btn-apple {
    background: #000000;
    color: #FFFFFF;
    border: none;
}

.auth-social-btn.btn-apple:hover {
    background: #1A1A1A;
}

.auth-divider {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    color: #94A3B8;
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #E2E8F0;
}

.auth-primary-btn {
    width: 100%;
    height: 56px;
    border-radius: 28px;
    background: var(--primary);
    color: #FFFFFF;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 122, 80, 0.25);
    transition: all 0.2s;
}

.auth-primary-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 122, 80, 0.35);
}

.auth-footer {
    font-size: 0.8125rem;
    color: #94A3B8;
    line-height: 1.6;
}

.auth-footer a {
    color: #64748B;
    text-decoration: underline;
}

.auth-switch {
    font-size: 0.9375rem;
    color: #64748B;
}

.auth-switch span {
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
}

/* ─── Dashboard Premium (Sidebar + Main) ────────────────────────── */
.dashboard-app {
    display: flex;
    width: 100%;
    min-height: 100vh;
    background: var(--bg);
}

.sidebar {
    width: 260px;
    background: #FFFFFF;
    border-right: 1px solid var(--outline);
    display: flex;
    flex-direction: column;
    padding: 32px 0;
    position: sticky;
    top: 0;
    height: 100vh;
    flex-shrink: 0;
    transition: width 0.25s ease;
}

/* ─── Slim sidebar (Dropbox-style: icon + labels) ─────────── */
.sidebar--slim {
    width: 96px;
    min-width: 96px;
}

.sidebar--slim .logo-text,
.sidebar--slim .user-info-m3,
.sidebar--slim .sidebar-user-profile .user-greeting,
.sidebar--slim .sidebar-user-profile .user-status {
    display: none;
}

.sidebar--slim .sidebar-logo {
    padding: 0;
    justify-content: center;
}

.sidebar--slim .sidebar-nav {
    padding: 0 8px;
}

.sidebar--slim .nav-item {
    flex-direction: column;
    justify-content: center;
    padding: 12px 4px;
    gap: 4px;
    text-align: center;
}

.sidebar--slim .nav-item span:not(.material-symbols-outlined) {
    display: block;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
}

.sidebar--slim .sidebar-user-profile {
    justify-content: center;
}

.sidebar--slim .sidebar-toggle-btn {
    justify-content: center;
    padding-left: 0 !important;
}

.sidebar-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 16px;
    margin-bottom: 24px;
    font-family: var(--font-display);
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
}

.sidebar-logo:hover {
    background: var(--surface-variant);
    border-radius: 0 0 24px 24px;
}

.sidebar-logo .logo-text {
    color: var(--logo-color);
    white-space: nowrap;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.sidebar-logo .logo-icon {
    font-size: 32px;
    color: var(--primary);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    color: var(--on-surface-variant);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-item .material-symbols-outlined {
    font-size: 24px;
}

.nav-item:hover {
    background: #F8FAFC;
    color: var(--primary);
}

.nav-item.active {
    background: transparent !important;
    color: var(--primary);
    font-weight: 700;
    border-left: 4px solid var(--primary);
    border-radius: 0;
    margin-right: 0;
    padding-left: 28px;
    box-shadow: none !important;
}

/* Remove green pill from user profile */
.user-avatar-m3 {
    width: 40px;
    /* Reduced from 48px */
    height: 40px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.sidebar-user-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.2rem 1.6rem;
    margin-bottom: 1.6rem;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Main Content Area */
.main-content {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    padding: 0 2.4rem 2.4rem;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

/* Top Bar */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: #FFFFFF;
    padding: 16px 0;
    margin-bottom: 32px;
}

.search-wrapper {
    flex: 0 1 540px;
    margin: 0 auto;
    position: relative;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.search-wrapper .search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--on-surface-variant);
}

.search-wrapper .filter-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--on-surface-variant);
    cursor: pointer;
}

.search-input {
    width: 100%;
    padding: 16px 56px;
    border: none;
    background: none;
    font-size: 15px;
    color: var(--on-surface);
    outline: none;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.btn-notif {
    width: 44px;
    height: 44px;
    background: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-subtle);
    color: var(--on-surface-variant);
    position: relative;
}

.btn-notif::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border: 1.5px solid #FFFFFF;
    border-radius: 50%;
}

.notif-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border: 1.5px solid #FFFFFF;
    border-radius: 50%;
}

.user-profile-small {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.user-profile-small .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--primary);
    border: 2px solid #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.user-info-text {
    text-align: right;
}

.user-info-text .name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--on-surface);
}

.user-info-text .role {
    display: block;
    font-size: 12px;
    color: var(--on-surface-variant);
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(90deg, #FF7A50 0%, #FF9E7D 100%);
    border-radius: 30px;
    padding: 48px;
    display: flex;
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
    min-height: 280px;
    box-shadow: 0 12px 40px rgba(255, 122, 80, 0.2);
}

.hero-banner__content {
    flex: 1;
    z-index: 2;
    max-width: 500px;
}

.hero-banner__content h1 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
}

.hero-banner__content p {
    font-size: 15px;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 32px;
}

.btn-banner-upload {
    padding: 12px 24px;
    background: #FFFFFF;
    color: var(--primary);
    border-radius: 30px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.btn-banner-upload:hover {
    transform: scale(1.02);
}

.hero-banner__img-container {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 320px;
    height: 320px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-banner__img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Responsive Dashboard Logic */
@media (max-width: 1023px) {
    .sidebar {
        position: fixed;
        left: -280px;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
    }

    .sidebar.active {
        left: 0;
    }

    .hero-banner__img-container {
        position: relative;
        right: 0;
        top: 0;
        transform: none;
        margin: 20px auto 0;
        width: 180px;
        height: 180px;
    }

    .hero-banner__content h1 {
        font-size: 24px;
    }

    .top-bar {
        gap: 12px;
    }
}

.mobile-only {
    display: none;
}

/* Sections */
.dashboard-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-section-header h2 {
    font-size: 22px;
    font-weight: 700;
}

.btn-view-more {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
}

/* Recipe Grid (Featured) */
/* ─── Tarjetas de Receta - Mashup Premium ───────────────────────── */
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.card-recipe {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: var(--space-md);
    border: 1px solid var(--outline-variant);
    box-shadow: var(--shadow-subtle);
    cursor: pointer;
    transition: var(--transition-base);
}

.card-recipe:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.card-recipe__img {
    width: 100%;
    height: 200px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-md);
    position: relative;
}

.card-recipe__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-recipe__save {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    border: none;
    box-shadow: var(--shadow-sm);
}

.card-recipe__content h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--on-surface);
}

.card-recipe__meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 13px;
    color: var(--on-surface-variant);
}

.card-recipe__meta div {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-recipe__meta .material-symbols-outlined {
    font-size: 18px;
    color: var(--secondary);
}

.card-featured__tags {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.tag-item {
    background: #F8F9FA;
    padding: 10px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 60px;
}

.tag-item .material-symbols-outlined {
    font-size: 18px;
}

.tag-item span {
    font-size: 10px;
    font-weight: 700;
}

.card-featured__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-watch {
    background: var(--primary);
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.time-label {
    font-size: 13px;
    color: var(--on-surface-variant);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Recipe List (Compact) */
.recipes-compact-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.card-compact {
    background: #FFFFFF;
    border-radius: var(--radius-xl);
    padding: 16px;
    display: flex;
    gap: 16px;
    box-shadow: var(--shadow-subtle);
    cursor: pointer;
}

.card-compact__img {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
}

.card-compact__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-compact__info {
    flex: 1;
}

.card-compact__info h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.card-compact__info p {
    font-size: 13px;
    color: var(--on-surface-variant);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.card-compact__time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
}





/* ─── Form Sections (add recipe) ─────────────────────────────────── */
.form-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--on-surface);
}

.ingredients-stack,
.steps-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ingredient-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ingredient-row .input-field {
    padding: 10px 12px;
}

.step-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-container);
    color: var(--on-primary-container);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 10px;
}

.step-row textarea {
    padding: 10px 12px;
}

/* ─── OCR Screen ─────────────────────────────────────────────────── */
.ocr-screen {
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.ocr-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    border: 2px dashed var(--outline);
    border-radius: 20px;
    padding: 3.2rem 2rem;
    /* Reduced from 40px */
    cursor: pointer;
    transition: all .2s;
    min-height: 180px;
    background: var(--surface-container);
    text-align: center;
}

.ocr-upload-area:hover,
.ocr-upload-area.drag-over {
    border-color: var(--primary);
    background: oklch(from var(--primary) l c h / 0.06);
}

.ocr-upload-icon {
    font-size: 3rem;
    color: var(--primary);
}

.ocr-upload-title {
    font-weight: 600;
    color: var(--on-surface);
    margin: 0;
}

.ocr-upload-hint {
    font-size: 0.8125rem;
    color: var(--on-surface-variant);
    margin: 0;
}

.ocr-preview-img {
    max-height: 200px;
    object-fit: contain;
    border-radius: 12px;
}

.ocr-result-card {
    background: var(--surface-container-low);
    border-radius: 20px;
    padding: 16px;
    border: 1px solid var(--outline-variant);
}

.ocr-result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--on-surface-variant);
    font-weight: 500;
}

.ocr-result-text {
    min-height: 80px;
    font-size: 0.875rem;
    color: var(--on-surface);
    white-space: pre-wrap;
    line-height: 1.6;
    font-style: italic;
    color: var(--on-surface-variant);
}

.ocr-result-text:not(:empty) {
    font-style: normal;
    color: var(--on-surface);
}

.ocr-analyzing {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ocr-disclaimer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--on-surface-variant);
    text-align: center;
    justify-content: center;
}

/* ─── Recipe Details ─────────────────────────────────────────────── */
.detail-hero {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: var(--surface-variant);
}

.detail-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── Recipe Detail Screen (Premium) ────────────────────────── */
.recipe-detail-app {
    min-height: 100vh;
    background: var(--surface);
    display: flex;
    flex-direction: column;
}

.detail-hero {
    height: 380px;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
    /* Oculto hasta que se decida si hay imagen */
}

.detail-hero.no-image {
    height: auto;
    background: var(--surface) !important;
    display: block;
    align-items: stretch;
    border-bottom: none;
}

@media (min-width: 1024px) {
    .recipe-detail-app.no-image .detail-hero {
        background: var(--surface);
    }

    .recipe-detail-app.no-image .detail-action-bar {
        position: sticky;
        top: 0;
        background: white;
        z-index: 100;
        border-bottom: 1px solid var(--outline-variant);
    }
}

.detail-hero.no-image .hero-overlay {
    background: none;
}

.detail-hero.no-image .btn-back,
.detail-hero.no-image .btn-action-circle {
    background: var(--surface-variant);
    border-color: var(--outline-variant);
    color: var(--on-surface);
}

.detail-hero.no-image .hero-content.mobile-only {
    display: none;
}

/* Marker icon removed for cleaner look */

.recipe-detail-app.no-image .desktop-only {
    display: flex !important;
    margin-top: 0;
}

.recipe-detail-app.no-image .detail-main {
    padding-top: 24px;
}

@media (max-width: 767px) {
    .recipe-detail-app.no-image .detail-main {
        margin-top: 0;
        border-radius: 0;
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.8) 100%);
}

.detail-action-bar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    z-index: 100;
    transition: background 0.3s;
}

.btn-back {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #10B981;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.btn-back:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

.hero-actions {
    display: flex;
    gap: 12px;
}

.btn-action-circle {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #10b981;
    /* Iconos verdes */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

.btn-back {
    color: #10b981;
    /* Icono verde */
}

.btn-action-circle.btn-delete:hover {
    background: rgba(239, 68, 68, 0.8);
    border-color: #ef4444;
}

.detail-hero.no-image .btn-action-circle.btn-delete:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.btn-action-circle:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

.detail-hero.no-image .detail-action-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--outline-variant);
}

.detail-hero.no-image .btn-back,
.detail-hero.no-image .btn-action-circle {
    background: var(--surface-variant);
    border-color: var(--outline-variant);
    color: #10B981;
}

.detail-hero.no-image .hero-overlay {
    background: none;
}

.btn-action-circle {
    width: 48px;
    height: 48px;
    background: #FFFFFF;
    border-radius: 50%;
    color: #10B981;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action-circle.active {
    color: var(--error);
}

.btn-action-circle:hover {
    transform: scale(1.1);
}

.hero-content {
    position: absolute;
    bottom: 32px;
    left: 32px;
    right: 32px;
    color: #FFFFFF;
    z-index: 5;
}

.category-badge {
    background: var(--primary);
    color: #FFFFFF;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: inline-block;
}

.detail-hero h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.recipe-quick-stats {
    display: flex;
    gap: 16px;
}

.stat-bubble {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

/* Detail Main & Tabs */
.detail-main {
    flex: 1;
    background: #FFFFFF;
    border-top-left-radius: 32px;
    border-top-right-radius: 32px;
    margin-top: -48px;
    position: relative;
    z-index: 20;
    padding: 32px 24px;
    max-width: 900px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.05);
}

@media (max-width: 767px) {
    .detail-main {
        padding: 24px 20px;
        margin-top: -40px;
    }

    .recipe-detail-app.no-image .detail-main {
        margin-top: 0;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        padding-top: 12px;
    }
}

.detail-tabs {
    display: flex;
    gap: 32px;
    border-bottom: 1px solid var(--outline);
    margin-bottom: 32px;
}

.tab-item {
    background: none;
    border: none;
    padding: 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--on-surface-variant);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.tab-item.active {
    color: var(--primary);
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Content Sections */
.content-section {
    margin-bottom: 32px;
}

.content-section h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.content-section p {
    color: var(--on-surface-variant);
    line-height: 1.7;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.info-item {
    background: var(--surface);
    padding: 20px;
    border-radius: var(--radius-md);
}

.info-item .label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--on-surface-variant);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.info-item .value {
    font-size: 18px;
    font-weight: 600;
    color: var(--on-surface);
}

/* Ingredients Checklist */
.ingredient-checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ingredient-item label {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
}

.ingredient-item input {
    display: none;
}

.custom-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--outline);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ingredient-item input:checked+label .custom-checkbox {
    background: var(--primary);
    border-color: var(--primary);
}

.ingredient-item input:checked+label .custom-checkbox::after {
    content: 'check';
    font-family: 'Material Symbols Outlined';
    font-size: 18px;
    color: #FFFFFF;
}

.ingredient-item input:checked+label .ing-text {
    color: var(--on-surface-variant);
    text-decoration: line-through;
    opacity: 0.6;
}

.ing-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--on-surface);
}

/* Steps Timeline */
.steps-timeline {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.step-item {
    display: flex;
    gap: 24px;
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 4px;
}

.step-text {
    font-size: 16px;
    line-height: 1.7;
    color: var(--on-surface);
}

.empty-text {
    padding: 48px;
    text-align: center;
    color: var(--on-surface-variant);
    font-style: italic;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Recipe Form & OCR (Premium) ─────────────────────────── */
.recipe-form-app {
    background: var(--surface);
    min-height: 100vh;
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: #FFFFFF;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.form-header {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--outline-variant);
    position: sticky;
    top: 0;
    background: #FFFFFF;
    z-index: 100;
}

.form-header h1 {
    font-size: 18px;
    font-weight: 700;
    flex: 1;
}

.premium-form {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--on-surface);
}

/* Image Upload Area */
.image-upload-area {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--surface-container);
    border: 2px dashed var(--outline);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.image-upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-placeholder {
    text-align: center;
    color: var(--on-surface-variant);
}

.upload-placeholder .material-symbols-outlined {
    font-size: 48px;
    margin-bottom: 8px;
}

.upload-placeholder p {
    font-size: 14px;
    font-weight: 600;
}

#imagePreview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
}

/* Input Groups */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 13px;
    font-weight: 700;
    color: var(--on-surface-variant);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group input,
.input-group select,
.input-group textarea {
    padding: 14px 16px;
    border: 1px solid var(--outline);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: inherit;
    transition: all 0.2s;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Dynamic Lists */
.dynamic-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dynamic-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.dynamic-item input,
.dynamic-item textarea {
    flex: 1;
}

.btn-remove-small {
    padding: 12px;
    color: var(--error);
    background: var(--surface);
    border: 1px solid var(--outline);
    border-radius: var(--radius-md);
    cursor: pointer;
}

.step-form-item {
    position: relative;
    padding-left: 24px;
}

.step-form-item::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 16px;
    bottom: -16px;
    width: 2px;
    background: var(--outline-variant);
}

.step-form-item:last-child::before {
    display: none;
}

/* OCR Viewer Styles */
.ocr-viewport {
    position: fixed;
    inset: 0;
    background: #000000;
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

.camera-preview {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#videoFeed {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-overlay {
    position: absolute;
    inset: 0;
    border: 40px solid rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.camera-guides {
    position: absolute;
    top: 20%;
    bottom: 20%;
    left: 10%;
    right: 10%;
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.4);
}

.camera-controls {
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #000000;
}

.btn-capture {
    width: 72px;
    height: 72px;
    background: #FFFFFF;
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
}

.btn-capture:active {
    transform: scale(0.9);
}

.btn-share-main:active {
    transform: scale(0.98);
}

/* Manage Access Section M3 */
.manage-access-section-m3 {
    margin-top: 32px;
    border-top: 1px solid #3a3a3a;
    padding-top: 24px;
}

.manage-access-section-m3 .section-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    opacity: 0.9;
}

.shares-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.share-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.share-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    flex-shrink: 0;
}

.share-info {
    flex: 1;
    overflow: hidden;
}

.share-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-email {
    display: block;
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-perm-select {
    background: #333;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    padding: 6px 10px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.share-perm-select:hover {
    background: #444;
}

.no-shares-msg {
    color: #aaa;
    font-size: 13px;
    font-style: italic;
    text-align: center;
    padding: 24px 0;
}

.ocr-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
}

.ocr-title {
    color: #FFFFFF;
    font-weight: 700;
    font-size: 16px;
}

.btn-back-ocr,
.btn-icon-ocr {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #FFFFFF;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.camera-tip {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #FFFFFF;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
}

/* OCR Modal */
.ocr-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.ocr-modal-content {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    padding: 32px;
    text-align: center;
}

.premium-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--primary-light);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: spin 1s linear infinite;
}

.ocr-modal h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.ocr-modal p {
    color: var(--on-surface-variant);
    margin-bottom: 24px;
}

.premium-textarea {
    width: 100%;
    height: 200px;
    padding: 16px;
    border: 1px solid var(--outline);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 24px;
    resize: none;
}

/* ─── Hero Banner Premium (Mashup) ────────────────────────────────── */
.hero-banner {
    display: flex;
    align-items: center;
    background: var(--primary);
    border-radius: var(--radius-2xl);
    padding: var(--space-xl);
    color: white;
    gap: var(--space-xl);
    overflow: hidden;
    position: relative;
    min-height: 280px;
}

.badge-premium {
    background: var(--secondary);
    color: white;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: var(--space-md);
}

.hero-banner__content h1 {
    font-family: var(--font-display);
    font-size: 36px;
    margin-bottom: 12px;
    line-height: 1.1;
}

.hero-banner__content p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: var(--space-xl);
    max-width: 400px;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
}

.btn-banner-primary {
    background: white;
    color: var(--primary);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-banner-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.hero-banner__img-container {
    flex: 1;
    height: 100%;
    display: flex;
    justify-content: flex-end;
}

.hero-banner__img-container img {
    height: 320px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
}

@media (max-width: 767px) {
    .hero-banner {
        flex-direction: column;
        padding: var(--space-xl) var(--space-md);
        text-align: center;
    }

    .hero-banner__content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-banner__img-container {
        display: none;
    }
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions button {
    flex: 1;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.ocr-app {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* ─── Utilidades ─────────────────────────────────────────────────── */
.mt-6 {
    margin-top: 24px;
}

.hidden {
    display: none !important;
}

.text-red-500 {
    color: #ef4444;
}

.text-sm {
    font-size: 0.875rem;
}

.text-primary {
    color: var(--primary);
}

.text-danger {
    color: var(--error);
}

.flex-1 {
    flex: 1;
}

.w-16 {
    width: 64px;
}

.w-20 {
    width: 80px;
}

.space-y-2>*+* {
    margin-top: 8px;
}

.space-y-3>*+* {
    margin-top: 12px;
}

.col-span-2 {
    grid-column: span 2;
}

.opacity-50 {
    opacity: .5;
}


/* ─── Login Screen Premium (Unified) ────────────────────────── */
.login-card {
    background: #FFFFFF;
    border-radius: var(--card-radius, 40px);
    padding: 56px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    text-align: center;
    margin: auto;
}

.icon-container {
    width: 64px;
    height: 64px;
    background: #FFF0EB;
    color: var(--secondary, #FF6B35);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
}

.icon-container span {
    font-size: 32px;
}

.login-card h1 {
    font-family: var(--font-display);
    font-size: 2.6rem;
    /* Reduced from 32px */
    font-weight: 800;
    color: #1A1A1A;
    margin-bottom: 0.8rem;
    line-height: 1.1;
}

.subtitle {
    color: #666;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 32px;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #9CA3AF;
    font-size: 13px;
    margin: 32px 0;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #E5E7EB;
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 48px;
    /* Reduced from 52px */
    border: 1px solid #E5E7EB;
    border-radius: 24px;
    background: white;
    color: #1A1A1A;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-social:hover {
    background: #F9FAFB;
}

.btn-social.btn-apple {
    background: #000000 !important;
    color: #FFFFFF !important;
    border: none;
}

.btn-main {
    width: 100%;
    height: 48px;
    /* Reduced from 56px */
    background: var(--secondary, #FF6B35);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
}

.btn-main:hover {
    background: var(--secondary-dark, #E85D2A);
    transform: translateY(-1px);
}

.create-account-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--secondary, #FF6B35);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.create-account-link:hover {
    opacity: 0.8;
}

.footer-legal {
    font-size: 11px;
    color: #9CA3AF;
    margin-top: 48px;
    line-height: 1.6;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.footer-legal a {
    color: #6B7280;
    text-decoration: underline;
}

/* ─── Mobile Drawer (Native CSS) ────────────────────────────────── */
.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: var(--surface);
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    border-right: 1px solid var(--outline);
}

.mobile-drawer.active {
    transform: translateX(0);
}

.mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    visibility: hidden;
}

.mobile-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

/* Utilitarios de layout responsivo específicos para Drive Dashboard */
@media (max-width: 1023px) {
    .hidden-mobile-lg {
        display: none !important;
    }

    .visible-mobile-lg {
        display: flex !important;
    }
}

@media (min-width: 1024px) {

    .hidden-desktop-lg,
    .mobile-only {
        display: none !important;
    }

    .visible-desktop-lg,
    .desktop-only {
        display: flex !important;
    }
}

@media (max-width: 1023px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }
}

/* Sidebar Nav Item Styling (Native) */
.nav-item,
.nav-item-mobile {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-item:hover,
.nav-item-mobile:hover {
    background-color: var(--surface-variant);
    color: var(--text-main);
}

.nav-item.active,
.nav-item-mobile.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

.w-full {
    width: 100%;
}

/* ─── Global FAB ────────────────────────────────────────────────── */
.fab-global {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background-color: var(--primary);
    color: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.fab-global:hover {
    transform: scale(1.05);
    background-color: var(--primary-dark);
}

.blob-1 {
    top: -10%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(16, 185, 129, 0.2);
}

.blob-2 {
    bottom: -10%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: rgba(16, 185, 129, 0.15);
}

/* ─── List View – "File" Look ─────────────────────────────── */
.list-view {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--outline-variant, #E5E7EB);
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.file-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--outline-variant, #F3F4F6);
    background: white;
    cursor: pointer;
    transition: background-color 0.15s ease;
    gap: 12px;
}

.file-row:last-child {
    border-bottom: none;
}

.file-row:hover {
    background-color: #F9FAFB;
}

.file-row .icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: #F0FDF4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-row .content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.file-row .title {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-row .meta {
    font-size: 12px;
    color: #6B7280;
}

.file-row .action-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    color: #9CA3AF;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s, background-color 0.15s;
    flex-shrink: 0;
}

.file-row:hover .action-btn {
    opacity: 1;
}

.file-row .action-btn:hover {
    background-color: #F3F4F6;
    color: #374151;
}

@media (max-width: 768px) {
    .file-row .action-btn {
        opacity: 1;
    }
}

/* =========================================================
   Material 3 Expressive UI - Dashboard Refinement
   ========================================================= */

.top-bar-m3 {
    padding: 32px 24px 16px;
    /* Increased top padding for Dropbox look */
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg);
}

.hamburger-btn {
    display: none;
    /* Desktop hidden */
}

@media (max-width: 1023px) {
    .hamburger-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        border: none;
        background: transparent;
        color: var(--on-surface-variant);
        cursor: pointer;
        transition: background 0.2s;
    }

    .hamburger-btn:active {
        background: var(--surface-container-high);
    }
}

.search-container-m3 {
    flex: 1;
    display: flex;
    justify-content: center;
}

.search-wrapper-m3 {
    width: 100%;
    max-width: 800px;
    height: 48px;
    background: var(--surface-container-high);
    border-radius: 24px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all var(--transition-base);
}

.search-wrapper-m3:focus-within {
    background: var(--bg);
    box-shadow: 0 0 0 2px var(--secondary);
}

.search-wrapper-m3 input {
    border: none;
    background: transparent;
    flex: 1;
    height: 100%;
    font-size: 16px;
    color: var(--on-surface);
}

.search-wrapper-m3 input:focus {
    outline: none;
}

.btn-icon-m3 {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    border: none;
    background: transparent;
    color: var(--on-surface-variant);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-icon-m3:hover {
    background: var(--surface-container);
}

/* Sidebar M3 Refined */
.sidebar-header {
    padding: 32px 32px 16px;
}

.sidebar-user-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 32px;
    margin: 8px 16px;
    border-radius: 16px;
    background: var(--primary-light);
}

.user-avatar-m3 {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    /* Expressive M3 Shape */
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 24px;
    box-shadow:
        0 4px 12px rgba(16, 185, 129, 0.25),
        0 0 0 4px white,
        0 12px 24px -8px rgba(0, 0, 0, 0.15);
    /* Elevated look */
    transition: transform 0.3s var(--m3-easing);
}

.user-avatar-m3:hover {
    transform: scale(1.05) rotate(2deg);
}

.user-info-m3 {
    display: flex;
    flex-direction: column;
}

.user-greeting {
    font-weight: 800;
    color: var(--on-surface);
    font-size: 16px;
    letter-spacing: -0.2px;
}

.user-status {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
}

.sidebar-footer {
    margin-top: auto;
    padding: 24px;
}

.btn-logout-m3 {
    width: 100%;
    height: 48px;
    border-radius: 24px;
    border: none;
    background: #FEE2E2;
    color: #991B1B;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout-m3:hover {
    background: #FECACA;
}

/* FAB M3 */
.fab-m3 {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    /* M3 FAB style */
    background: var(--secondary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px -6px rgba(16, 185, 129, 0.4);
    cursor: pointer;
    transition: all 0.3s var(--m3-easing);
    z-index: 100;
}

.fab-m3:hover {
    transform: scale(1.05) translateY(-4px);
    box-shadow: 0 16px 32px -6px rgba(16, 185, 129, 0.5);
    filter: brightness(1.1);
}

.fab-m3 .material-symbols-outlined {
    font-size: 32px;
}

/* Mobile Sidebar Drawer Logic */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 1023px) {
    .sidebar {
        position: fixed;
        left: -320px;
        top: 0;
        bottom: 0;
        z-index: 101;
        transition: left 0.3s var(--m3-easing);
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.1);
    }

    .sidebar.active {
        left: 0;
    }
}

/* =========================================================
   Anti-flicker Utility (Material 3 Expressive)
   ========================================================= */

html[data-auth-likely="true"] #landing-section {
    display: none !important;
}

html[data-auth-likely="true"] #dashboard-app {
    display: flex !important;
}

/* =========================================================
   components.css – Recipe Pantry Personal
   ========================================================= */

.dashboard-app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg);
    transition: all 0.3s var(--m3-easing);
    position: relative;
    overflow: hidden;
}

.main-content-scroll {
    flex: 1;
    overflow-y: auto;
}

/* Premium Material 3 Expressive Scrollbar */
.main-content-scroll::-webkit-scrollbar {
    width: 14px;
}

.main-content-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.main-content-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    /* Subtle base */
    border: 4px solid transparent;
    background-clip: content-box;
    border-radius: 100px;
    transition: background 0.2s;
}

.main-content-scroll:hover::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    /* Slightly more visible on hover */
}

.main-content-scroll::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3) !important;
}

/* Sidebar Sequence Fixes */
.sidebar {
    display: flex;
    flex-direction: column;
    width: 280px;
    flex-shrink: 0;
    transition: width 0.3s var(--m3-easing);
    background: var(--surface-container-low);
    border-right: 1px solid var(--outline-variant);
}

.sidebar-footer {
    margin-top: auto;
    padding: 24px;
}

/* Slim Sidebar CSS */
@media (min-width: 1024px) {
    .sidebar.sidebar--slim {
        width: 80px;
    }

    .sidebar.sidebar--slim .logo-text,
    .sidebar.sidebar--slim .user-info-m3,
    .sidebar.sidebar--slim .nav-item span:not(.material-symbols-outlined),
    .sidebar.sidebar--slim .btn-logout-m3 .logout-text {
        display: none;
    }

    .sidebar.sidebar--slim .sidebar-header {
        padding: 24px 0;
        justify-content: center;
    }

    .sidebar.sidebar--slim .sidebar-logo {
        padding: 0;
        justify-content: center;
    }

    .sidebar.sidebar--slim .sidebar-user-profile {
        padding: 12px 0;
        margin: 8px;
        justify-content: center;
    }

    .sidebar.sidebar--slim .nav-item {
        justify-content: center;
        padding: 12px;
        margin: 4px 8px;
    }
}

/* Right Sidebar: Details Panel */
.details-sidebar {
    width: 0;
    background: var(--bg);
    border-left: 1px solid var(--outline-variant);
    transition: width 0.3s var(--m3-easing);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.details-sidebar.active {
    width: 320px;
}

.details-sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--outline-variant);
}

.details-sidebar-header h3 {
    font-size: 18px;
    font-weight: 700;
}

/* View Switcher Menu */
.view-switcher-m3 {
    position: relative;
}

.view-menu-m3 {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 200px;
    background: var(--bg);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--outline-variant);
    padding: 8px 0;
    z-index: 100;
}

.view-menu-m3 .menu-header {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--on-surface-variant);
    text-transform: uppercase;
}

.menu-item-m3 {
    width: 100%;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--on-surface);
    transition: background 0.2s;
    text-align: left;
}

.menu-item-m3:hover {
    background: var(--surface-container-low);
}

.menu-item-m3 .check {
    margin-left: auto;
    font-size: 18px;
    color: var(--primary);
    opacity: 0;
}

.menu-item-m3.active .check {
    opacity: 1;
}

.list-view-m3 {
    display: flex;
    flex-direction: column;
    width: 100%;
}

@media (min-width: 1024px) {
    .list-view-m3 {
        min-width: 800px;
        /* Desktop minimum width for readability */
    }
}

/* Grid Layout Definition */
.list-header-m3,
.file-row-m3 {
    display: grid;
    grid-template-columns: 56px 1fr 140px 120px 160px 80px;
    align-items: center;
    padding: 0 16px;
}

.list-header-m3 {
    height: 48px;
    border-bottom: 1px solid var(--outline-variant);
    color: var(--on-surface-variant);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.8px;
}

.file-row-m3 {
    height: 56px;
    border-bottom: 1px solid var(--outline-variant);
    cursor: pointer;
    transition: background 0.2s;
    background: var(--bg);
}

.file-row-m3:hover {
    background: var(--surface);
}

.file-row-m3.selected {
    background: var(--primary-light);
}

.recipe-name {
    font-weight: 600;
    font-size: 14px;
}

/* Grid View Large */
.recipes-grid.grid-view--large {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 32px;
    padding: 0 4px 100px;
}

.recipes-grid.grid-view--large .recipe-card-image {
    height: 240px;
}

/* Dropbox-Style File Row Actions (Hover) */
.file-row-m3 {
    position: relative;
    overflow: hidden;
}

.col-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 16px;
    position: relative;
    /* Para el posicionamiento de las acciones */
}

.row-actions-dropbox {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.2s var(--m3-easing);
    background: var(--bg);
    /* Fondo para que sobresalga */
    padding: 4px 8px;
    border-radius: 8px;
    position: absolute;
    right: 16px;
    z-index: 5;
    pointer-events: none;
}

.file-row-m3:hover .row-actions-dropbox {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* Ocultar metadata al hacer hover para dejar espacio a las acciones */
.file-row-m3:hover .col-date,
.file-row-m3:hover .col-access {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--m3-easing);
}

.col-date,
.col-access {
    transition: opacity 0.3s var(--m3-easing);
}

/* Dropbox Highlight for Share Button on Hover */
.btn-share-highlight {
    background: var(--bg);
    border: 1px solid var(--outline-variant);
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--on-surface);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-right: 8px;
    cursor: pointer;
}

.btn-share-highlight:hover {
    background: var(--surface-container-low);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive Action Menu (Three dots for mobile) */
.mobile-action-btn {
    display: none;
}

@media (max-width: 1023px) {
    .row-actions-dropbox {
        display: none !important;
    }

    .mobile-action-btn {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .list-view-m3 {
        min-width: unset;
        width: 100%;
        overflow-x: hidden;
    }

    .list-header-m3,
    .file-row-m3 {
        grid-template-columns: 56px 1fr 48px;
        /* Simple mobile row: icon, name, menu */
    }

    /* Simplified mobile row: icon, name, menu */
    .list-view-m3 {
        min-width: 0 !important;
        width: 100% !important;
        overflow-x: hidden;
    }

    .list-header-m3,
    .file-row-m3 {
        grid-template-columns: 48px 1fr 48px !important;
        /* Icon | Name | More */
        padding: 0 12px;
        width: 100% !important;
        height: 64px;
        /* Slightly taller for mobile touch */
    }

    .col-category,
    .col-access,
    .col-date,
    .col-actions {
        display: none !important;
    }

    .mobile-action-btn {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        grid-column: 3;
        /* Ensure it's in the third column */
    }
}

/* Dropbox Context Menu */
.dropbox-menu-m3 {
    position: fixed;
    background: #252525;
    /* Dark Dropbox style */
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    min-width: 220px;
    padding: 8px 0;
    color: white;
}

.dropbox-menu-header {
    padding: 8px 16px 12px;
    border-bottom: 1px solid #333;
    margin-bottom: 4px;
}

.dropbox-menu-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-align: left;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    width: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #e0e0e0;
    font-size: 14px;
    transition: background 0.2s;
    text-align: left;
}

.context-menu-item:hover {
    background: #333;
}

.context-menu-item .material-symbols-outlined {
    font-size: 20px;
    color: #aaa;
}

.context-menu-divider {
    height: 1px;
    background: #333;
    margin: 4px 0;
}

/* Snackbar M3 Premium */
.snackbar-m3 {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1B1B1F;
    color: #E3E2E6;
    padding: 18px 28px;
    border-radius: 16px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    z-index: 6000;
    transition: all 0.4s var(--m3-easing);
    min-width: 360px;
    max-width: 92vw;
    justify-content: flex-start;
    pointer-events: auto;
}

.snackbar-m3.active {
    transform: translateX(-50%) translateY(0);
}

.snackbar-m3 .icon {
    color: var(--success);
    font-size: 26px;
}

/* Fix Grid View Text Deformation */
.recipe-card-m3 {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.recipe-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--on-surface);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Evita que el texto deforme la tarjeta */
}

.recipe-card-meta {
    font-size: 12px;
    color: var(--on-surface-variant);
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
}

@media (max-width: 1023px) {
    .details-sidebar.active {
        position: fixed;
        right: 0;
        top: 0;
        bottom: 0;
        z-index: 102;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    }
}

.snackbar-actions {
    display: flex;
    gap: 8px;
}

.snackbar-btn {
    background: transparent;
    border: none;
    color: #34D399;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 8px;
    transition: background 0.2s;
    text-transform: uppercase;
    white-space: nowrap;
}

.snackbar-btn:hover {
    background: rgba(52, 211, 153, 0.1);
}

/* ─── Simplified Share Modal ─── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    transition: opacity 180ms ease;
}

.modal-overlay.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

.share-modal-container {
    background: #1c1c1e;
    width: calc(100% - 32px);
    max-width: 440px;
    border-radius: 18px;
    border: 1px solid #3a3a3a;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
    color: #ffffff;
    overflow: hidden;
    animation: modalEntry 180ms cubic-bezier(0.2, 0, 0, 1) forwards;
}

@keyframes modalEntry {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.header-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #ffffff;
}

.header-info .text-secondary {
    font-size: 13px;
    color: #aaaaaa;
}

.btn-close-modal {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.btn-close-modal:hover {
    opacity: 1;
}

.modal-body {
    padding: 0 24px 24px;
}

.search-section {
    position: relative;
    margin-bottom: 20px;
}

.chip-input-container {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 52px;
    align-items: center;
}

.chips-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.user-chip {
    background: #444;
    color: #fff;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: chipPop 200ms cubic-bezier(0.2, 0, 0.4, 1.25) forwards;
}

@keyframes chipPop {
    0% {
        transform: scale(0.85);
        opacity: 0;
    }

    70% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.user-chip .remove-chip {
    cursor: pointer;
    font-size: 18px;
    opacity: 0.7;
    display: flex;
    align-items: center;
}

.user-chip .remove-chip:hover {
    opacity: 1;
}

#user-search-input {
    background: transparent;
    border: none;
    color: #fff;
    flex: 1;
    min-width: 120px;
    font-size: 14px;
    padding: 4px 0;
}

#user-search-input:focus {
    outline: none;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #252528;
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    margin-top: 8px;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    max-height: 240px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.suggestion-item:hover {
    background: #333;
}

.suggestion-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary, #f97316);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.suggestion-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.suggestion-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-email {
    font-size: 12px;
    color: #aaaaaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.permission-section {
    margin-bottom: 24px;
}

.select-wrapper {
    position: relative;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
}

.select-label {
    font-size: 14px;
    color: #aaaaaa;
    white-space: nowrap;
}

.custom-select {
    background: transparent;
    border: none;
    color: #ffffff;
    width: 100%;
    font-size: 14px;
    appearance: none;
    cursor: pointer;
    padding-right: 24px;
    font-family: inherit;
}

.custom-select:focus {
    outline: none;
}

.select-arrow {
    position: absolute;
    right: 12px;
    pointer-events: none;
    color: #aaaaaa;
}

.btn-share-main {
    width: 100%;
    height: 52px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 0 24px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(255, 122, 80, 0.2);
    margin: 12px 0;
}

.btn-share-main:disabled {
    background: #333333;
    color: #777777;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.btn-share-main:not(:disabled):hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 122, 80, 0.35);
}

.btn-share-main:not(:disabled):active {
    transform: translateY(0);
}

.modal-footer {
    border-top: 1px solid #3a3a3a;
    padding: 24px;
}

.btn-copy-link {
    width: 100%;
    background: #2a2a2a;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-copy-link:hover {
    background: #333333;
}

.btn-copy-link.copied {
    background: #059669;
    /* Verde esmeralda para éxito */
}

.btn-copy-link .material-symbols-outlined {
    font-size: 20px;
}

/* ─── Notifications System ─── */
.notifications-wrapper {
    position: relative;
    margin-right: 8px;
    /* Espacio desde la orilla en móvil */
}

.notifications-wrapper .btn-icon-m3 {
    color: var(--primary);
    /* Verde de la app */
}

.notifications-wrapper .btn-icon-m3 .material-symbols-outlined {
    color: var(--primary);
}

.badge-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    background: #EF4444;
    /* Rojo vibrante */
    color: white;
    border: 2px solid white;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    z-index: 2;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bell-shake {
    animation: bell-shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes bell-shake {

    0%,
    100% {
        transform: rotate(0);
    }

    15% {
        transform: rotate(15deg);
    }

    30% {
        transform: rotate(-12deg);
    }

    45% {
        transform: rotate(8deg);
    }

    60% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(2deg);
    }
}

.notifications-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 12px;
    width: 320px;
    background: #1c1c1e;
    color: #ffffff;
    border: 1px solid #3a3a3a;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
    z-index: 4000;
    overflow: hidden;
    animation: menuFadeIn 200ms ease forwards;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.notifications-header {
    padding: 16px 20px;
    border-bottom: 1px solid #3a3a3a;
}

.notifications-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #fff !important;
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 16px 20px;
    border-bottom: 1px solid #3a3a3a;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    gap: 12px;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: #2a2a2c;
}

.notification-icon-container {
    width: 40px;
    height: 40px;
    background: #2a2a2a;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon-container .material-symbols-outlined {
    color: #f97316;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
    display: block;
}

.notification-desc {
    font-size: 12px;
    color: #aaaaaa;
}

.notification-meta {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.btn-notif-action {
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-notif-primary {
    background: #f97316;
    color: white;
}

.btn-notif-secondary {
    background: #3a3a3a;
    color: white;
}

.notifications-empty {
    padding: 32px 20px;
    text-align: center;
    color: #fff !important;
}

.notifications-empty p {
    font-size: 13px;
    margin: 0;
}

/* ─── Permission Banner & Copy Button ─── */
.permission-banner {
    background: #f8f9fa;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.permission-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.permission-banner .material-symbols-outlined {
    color: #64748b;
    font-size: 20px;
}

.permission-banner .text {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}

.btn-copy-recipe {
    background: #00A676;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    width: fit-content;
}

.btn-copy-recipe:hover {
    background: #008f65;
    transform: translateY(-1px);
}

/* ─── Mobile Header Spacing & Styles (max-width: 768px) ─── */
@media (max-width: 768px) {
    .top-bar-m3 {
        padding: 12px 16px !important;
        /* 16px horizontal padding */
        gap: 8px !important;
        background: #fff;
        margin-bottom: 8px;
        height: 64px !important;
        display: flex !important;
        align-items: center !important;
    }

    .hamburger-btn {
        display: flex !important;
        width: 36px !important;
        height: 36px !important;
        min-width: 36px;
        align-items: center;
        justify-content: center;
        padding: 0;
        margin: 0;
    }

    .search-container-m3 {
        flex: 1;
        margin: 0;
    }

    .search-wrapper-m3 {
        height: 40px !important;
        border-radius: 20px !important;
        padding: 0 12px !important;
        gap: 8px !important;
        max-width: none !important;
    }

    .search-wrapper-m3 input {
        font-size: 14px;
        width: 100%;
    }

    .notifications-wrapper {
        margin: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.notifications-panel .notifications-title {
    color: #fff !important;
}

.notifications-empty {
    color: #fff !important;
}

.dashboard-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--bg);
}

.list-header-m3 {
    position: sticky;
    top: 48px;
    z-index: 10;
    background: var(--bg);
}

/* Sidebar Theme/Lang Fixes */
#theme-menu-item button.nav-link,
#lang-menu-item button.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    border-radius: 0;
    font-size: 14px;
    color: var(--on-surface);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background 0.2s;
}

#theme-menu-item button.nav-link:hover,
#lang-menu-item button.nav-link:hover {
    background: var(--surface-container-high);
}

#theme-submenu,
#lang-submenu {
    position: fixed;
    left: 232px;
    /* Adjusted based on typical sidebar width */
    background: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 8px;
    z-index: 9991;
    min-width: 200px;
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-option,
.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background 0.2s;
}

.theme-option:hover,
.lang-option:hover {
    background: #2a2a2a;
}

.theme-option.active::before,
.lang-option.active::before {
    content: '✓';
    color: #00A676;
    margin-right: 4px;
    font-weight: bold;
}

/* Sidebar structure fix */
.sidebar li.nav-item {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Adjust for slim sidebar */
.sidebar.slim #theme-submenu,
.sidebar.slim #lang-submenu {
    left: 72px;
}

/* Fixed Sticky Header Transparency */
.dashboard-header,
.list-header-m3,
.dashboard-header *,
.list-header-m3 * {
    background: var(--bg);
}

.dashboard-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--bg);
    padding-bottom: 0;
    margin-bottom: 0;
}

.list-header-m3 {
    position: sticky;
    top: 48px;
    z-index: 10;
    background: var(--bg);
    padding-top: 0;
}

/* ─── Material Design 3 Expressive: Radio & Checkbox (Round) ─── */
.m3-radio,
.m3-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--on-surface-variant);
    border-radius: 50%;
    /* Ambos redondos como solicitó el usuario */
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Animación elástica/expressive */
    background: transparent;
    display: inline-block;
    vertical-align: middle;
    outline: none;
}

.m3-radio:checked,
.m3-checkbox:checked {
    border-color: var(--primary);
    border-width: 2px;
}

/* Punto central para Radio */
.m3-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.m3-radio:checked::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Checkmark para Checkbox */
.m3-checkbox:checked {
    background: var(--primary);
}

.m3-checkbox::after {
    content: 'check';
    font-family: 'Material Symbols Outlined';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    font-size: 16px;
    font-weight: 900;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.m3-checkbox:checked::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Ripple effect (Expressive) */
.m3-radio::before,
.m3-checkbox::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0;
    transition: all 0.3s var(--m3-easing);
    z-index: -1;
    pointer-events: none;
}

.m3-radio:hover::before,
.m3-checkbox:hover::before {
    opacity: 0.12;
    transform: translate(-50%, -50%) scale(1);
}

.m3-radio:active::before,
.m3-checkbox:active::before {
    opacity: 0.2;
    transform: translate(-50%, -50%) scale(1.2);
}

/* ─── Material Buttons & Icons ─── */
.m3-icon-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.m3-icon-btn:hover {
    background: rgba(16, 185, 129, 0.08);
}

.m3-icon-btn:active {
    background: rgba(16, 185, 129, 0.12);
    transform: scale(0.92);
}

.m3-icon-btn .material-symbols-outlined {
    font-size: 24px;
}

/* ─── Recipe Detail Premium Components ─── */
.m3-ingredient-item {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 20px 16px;
    border-radius: 28px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    min-height: 72px;
    user-select: none;
}

.m3-ingredient-item:hover {
    background: rgba(16, 185, 129, 0.05);
}

.m3-ingredient-item:active {
    background: rgba(16, 185, 129, 0.1);
    transform: scale(0.98);
}

.m3-ingredient-item.checked {
    background: rgba(16, 185, 129, 0.03);
}

.m3-checkbox-premium {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--surface);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin-top: 2px;
}

input:checked+.m3-checkbox-premium {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.m3-checkbox-premium .material-symbols-outlined {
    color: white;
    font-size: 26px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0.6);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

input:checked+.m3-checkbox-premium .material-symbols-outlined {
    opacity: 1;
    transform: scale(1);
}

.m3-ingredient-text {
    flex: 1;
    font-size: 19px;
    line-height: 1.6;
    font-weight: 500;
    color: var(--on-surface);
    padding-top: 4px;
    transition: opacity 0.3s, text-decoration 0.3s;
}

input:checked~.m3-ingredient-text {
    opacity: 0.5;
    text-decoration: line-through;
}

/* Steps */
.m3-step-item {
    display: flex;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.m3-step-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 800;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    border: 4px solid var(--bg);
}

.m3-step-text {
    font-size: 18px;
    line-height: 1.7;
    color: var(--on-surface-variant);
    font-weight: 400;
    padding-top: 4px;
}

.m3-steps-timeline {
    position: absolute;
    left: 20px;
    top: 40px;
    bottom: 40px;
    width: 2px;
    background: rgba(16, 185, 129, 0.15);
}

/* ─── Share Modal Access List ───────────────────────────────────────── */
.manage-access-section-m3 {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--outline-variant);
}

.manage-access-section-m3 .section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--on-surface-variant);
    margin-bottom: 12px;
}

.shares-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.share-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--surface-container-low);
    border-radius: 12px;
    transition: background 0.2s;
}

.share-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: var(--on-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.share-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.share-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--on-surface);
}

.share-email {
    font-size: 12px;
    color: var(--on-surface-variant);
}
/* ─── Material 3 Outlined Field (Expressive) ───────────────────── */
.m3-field-container {
    margin-bottom: 32px;
    position: relative;
}

.m3-field-label {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--md-on-surface-var);
    background: var(--md-surface);
    padding: 0 6px;
    pointer-events: none;
    transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    line-height: 1;
}

.m3-field-input {
    width: 100%;
    padding: 1.2rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--md-on-surface);
    background: transparent;
    border: 1.5px solid var(--md-outline-var);
    border-radius: var(--md-shape-md);
    outline: none;
    transition: border .2s, box-shadow .2s;
}

.m3-field-input:focus {
    border-color: var(--md-primary);
    box-shadow: 0 0 0 1px var(--md-primary);
}

.m3-field-input:focus + .m3-field-label,
.m3-field-input:not(:placeholder-shown) + .m3-field-label {
    top: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--md-primary);
    transform: translateY(-50%) scale(1);
}

.m3-field-input::placeholder {
    color: transparent;
}

/* UI Unificada de Resultados OCR */
.ocr-result-unified {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ocr-result-textarea-container {
    background: var(--md-surface);
    border-radius: 20px;
    padding: 20px;
    border: 1.5px solid var(--md-outline-var);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s;
}

.ocr-result-textarea-container:focus-within {
    border-color: var(--md-primary);
}

.ocr-result-textarea {
    width: 100%;
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    line-height: 1.6;
    color: var(--md-on-surface);
    background: transparent;
    resize: none;
}
