/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Container principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Contenido interno que necesita padding horizontal */
.container-content {
    padding: 0 20px;
}

/* Solo padding horizontal para móvil cuando sea necesario */
@media (max-width: 768px) {
    .container-content {
        padding: 0 2px;
    }
}

/* ================== NAVBAR RESPONSIVO ================== */

/* Navbar principal */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Logo/Brand */
.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.nav-brand a {
    color: white;
    text-decoration: none;
}

/* Botón hamburguesa (oculto en desktop) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: 50% 50%;
}

/* Animación del botón hamburguesa */
.nav-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Menú principal */
.nav-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex: 1;
    max-width: none;
    margin-left: 40px;
}

/* Enlaces de navegación */
.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.nav-icon {
    font-size: 1.1rem;
}

/* Ocultar iconos en escritorio */
@media (min-width: 769px) {
    .nav-icon {
        display: none;
    }
}

.nav-text {
    font-size: 0.95rem;
}

/* Sección de usuario */
.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-greeting {
    font-size: 0.9rem;
    white-space: nowrap;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Iconos en botones */
.btn-icon {
    margin-right: 5px;
}

/* Overlay para móvil (oculto en desktop) */
.nav-overlay {
    display: none;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-primary {
    background-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-success {
    background-color: #28a745;
}

.btn-success:hover {
    background-color: #1e7e34;
}

.btn-danger {
    background-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

/* Contenedor de autenticación */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-card {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-weight: 600;
}

/* Formularios */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Alertas */
.alert {
    padding: 12px 16px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Enlaces de autenticación */
.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: #007bff;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Panel header */
.panel-header {
    text-align: center;
    margin-bottom: 40px;
}

.panel-header h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
}

.panel-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Cards del dashboard */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

.card-content p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Sección admin */
.admin-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.admin-section h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

/* Tablas */
.table-container {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.table tr:hover {
    background-color: #f8f9fa;
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #333;
}

/* Lista de ingredientes en modales */
.ingredientes-lista {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 10px;
}

.ingrediente-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #f8f9fa;
}

.ingrediente-item:last-child {
    border-bottom: none;
}

.ingrediente-item input[type="checkbox"] {
    margin-right: 10px;
}

/* Materiales seleccionados */
.ingredientes-seleccionados {
    margin-top: 20px;
}

.ingrediente-seleccionado {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    border-left: 4px solid #007bff;
}

.ingrediente-seleccionado h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.cantidad-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

.cantidad-input input,
.cantidad-input select {
    flex: 1;
}

/* Resultado de cálculo */
.calculo-resultado {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
}

.calculo-resultado h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.resultado-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.resultado-item:last-child {
    border-bottom: none;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Headers de página */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.page-header h2 {
    color: #333;
    font-size: 1.8rem;
}

.page-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Acciones de tabla */
.table-actions {
    display: flex;
    gap: 5px;
}

/* Estilos específicos para perfil */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.info-item span {
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.95rem;
    word-wrap: break-word;
    word-break: break-all;
}

.role-badge {
    display: inline-block;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-size: 0.85rem !important;
    font-weight: 600;
    text-align: center;
}

.role-badge.role-admin {
    background-color: #ffd700 !important;
    color: #8b6914 !important;
    border-color: #f0c14b !important;
}

.role-badge.role-client {
    background-color: #e3f2fd !important;
    color: #1565c0 !important;
    border-color: #90caf9 !important;
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
}

.profile-summary {
    padding: 20px 0;
}

.profile-info h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.4rem;
    word-wrap: break-word;
}

.profile-info .description {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-bottom: 20px;
    line-height: 1.6;
    color: #495057;
    word-wrap: break-word;
}

.profile-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.detail-label {
    font-weight: 600;
    color: #495057;
    flex-shrink: 0;
    margin-right: 10px;
}

.detail-value {
    font-weight: 500;
    color: #28a745;
    word-wrap: break-word;
    text-align: right;
}

/* Estilos específicos para formularios de perfil */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    margin-top: 30px;
}

/* Estilos para cards de perfil */
.card-header {
    padding: 20px 20px 0 20px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 20px;
}

.card-header h2 {
    margin: 0;
    color: #495057;
    font-size: 1.3rem;
    font-weight: 600;
}

.card-body {
    padding: 0 20px 20px 20px;
}

/* Estilos para el componente de subida de imágenes en recetas */
.simple-image-uploader {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.aws-config-section {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
}

.config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.config-header h4 {
    margin: 0;
    color: #856404;
    font-size: 1rem;
}

.config-content .form-group {
    margin-bottom: 10px;
}

.config-content .form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 3px;
}

.config-content .form-control {
    padding: 8px 12px;
    font-size: 0.9rem;
}

.current-image-section {
    margin-bottom: 20px;
}

.current-image-container {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-top: 10px;
}

.current-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    border: 2px solid #28a745;
    object-fit: cover;
}

.simple-upload-area {
    border: 2px dashed #007bff;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background-color: #f8f9ff;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.simple-upload-area:hover {
    border-color: #0056b3;
    background-color: #e6f0ff;
}

.simple-upload-area.dragging {
    border-color: #28a745;
    background-color: #e8f5e8;
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.upload-text {
    color: #666;
}

.upload-text strong {
    color: #333;
}

.upload-text small {
    color: #999;
    font-size: 0.85rem;
}

.preview-section {
    margin-top: 20px;
    text-align: center;
}

.preview-image {
    max-width: 250px;
    max-height: 250px;
    border-radius: 8px;
    border: 2px solid #007bff;
    object-fit: cover;
    margin: 10px 0;
}

.file-info {
    color: #666;
    font-size: 0.9rem;
    margin: 10px 0;
}

.preview-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.progress-bar-container {
    margin-top: 15px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background-color: #007bff;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.upload-section h4,
.current-image-section h4,
.preview-section h4 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

/* Imagen en la vista de receta */
.receta-image-container {
    text-align: center;
    margin: 20px 0;
    width: 100%;
    max-width: 400px;
    min-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.receta-image {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio (9/16 * 100%) */
    position: relative;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    background-color: #f5f5f5;
    border: 2px solid #e9ecef;
}

.receta-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Imagen en miniatura para lista de recetas */
.receta-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #e9ecef;
}

.receta-card-with-image {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.receta-card-content {
    flex: 1;
}

.no-image-placeholder {
    width: 80px;
    height: 80px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #999;
    background-color: #f8f9fa;
}

/* Checkbox con etiqueta en línea */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: auto !important;
    margin: 0 !important;
    flex-shrink: 0;
}

.checkbox-group label {
    margin: 0 !important;
    display: inline !important;
    font-weight: 500;
    color: #555;
    cursor: pointer;
}

/* Tarjetas de recetas horizontales */
.recipes-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.recipe-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.recipe-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.recipe-card-content {
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 20px;
}

.recipe-image-container {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recipe-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-no-image {
    font-size: 3rem;
    color: #dee2e6;
}

.recipe-info {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 20px;
    align-items: center;
}

.recipe-details h3 {
    margin: 0 0 8px 0;
    font-size: 1.4rem;
    color: #333;
    font-weight: 600;
}

.recipe-summary {
    display: flex;
    gap: 20px;
    margin: 8px 0;
}

.recipe-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.recipe-stat-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 2px;
    font-weight: 500;
}

.recipe-stat-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.recipe-stat-value.price {
    color: #28a745;
    font-size: 1.1rem;
}

.recipe-stat-value.percentage {
    color: #007bff;
}

.recipe-user {
    text-align: center;
    padding: 0 15px;
}

.recipe-user-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 2px;
    font-weight: 500;
}

.recipe-user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

/* Estilos para estado de publicación */
.recipe-status {
    text-align: center;
    padding: 0 15px;
}

.recipe-status-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 2px;
    font-weight: 500;
}

.recipe-status-value {
    font-size: 0.9rem;
    font-weight: 600;
}

.status-published {
    color: #28a745;
    background-color: #d4edda;
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid #c3e6cb;
    font-size: 0.8rem;
    display: inline-block;
}

.status-private {
    color: #6c757d;
    background-color: #f8f9fa;
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid #dee2e6;
    font-size: 0.8rem;
    display: inline-block;
}

.recipe-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 10px;
}

.recipe-actions .btn {
    min-width: 80px;
    padding: 8px 12px;
    font-size: 0.85rem;
}

.recipe-actions .btn-small {
    padding: 6px 10px;
    font-size: 0.8rem;
}

/* Asegurar que el texto se muestre en desktop */
.recipe-actions .btn .btn-text {
    display: inline;
}

/* Estado vacío mejorado */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #dee2e6;
}

.empty-state h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.empty-state p {
    color: #666;
    margin-bottom: 25px;
    font-size: 1.1rem;
}

/* Tarjetas de ingredientes horizontales */
.ingredients-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.ingredient-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.ingredient-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.ingredient-card-content {
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 20px;
}

.ingredient-icon-container {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffc107 0%, #ff8c00 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

.ingredient-icon {
    font-size: 2.5rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.ingredient-info {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 20px;
    align-items: center;
}

.ingredient-details h3 {
    margin: 0 0 8px 0;
    font-size: 1.4rem;
    color: #333;
    font-weight: 600;
}

.ingredient-summary {
    display: flex;
    gap: 20px;
    margin: 8px 0;
}

.ingredient-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ingredient-stat-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 2px;
    font-weight: 500;
}

.ingredient-stat-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.ingredient-stat-value.price {
    color: #28a745;
    font-size: 1.1rem;
}

.ingredient-stat-value.cost {
    color: #007bff;
    font-size: 1rem;
}

.ingredient-user {
    text-align: center;
    padding: 0 15px;
}

.ingredient-user-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 2px;
    font-weight: 500;
}

.ingredient-user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.ingredient-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 10px;
}

.ingredient-actions .btn {
    min-width: 80px;
    padding: 8px 12px;
    font-size: 0.85rem;
}

.ingredient-actions .btn-small {
    padding: 6px 10px;
    font-size: 0.8rem;
}

/* Asegurar que el texto se muestre en desktop */
.ingredient-actions .btn .btn-text {
    display: inline;
}

/* ================== RESPONSIVE NAVBAR ================== */

/* Tablet y pantallas medianas */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-menu {
        gap: 20px;
    }
    
    .nav-links {
        gap: 15px;
    }
    
    .user-greeting {
        display: none;
    }
}

/* Móviles - Menú hamburguesa */
@media (max-width: 768px) {
    /* Mostrar botón hamburguesa */
    .nav-toggle {
        display: flex;
    }
    
    /* Ocultar menú por defecto en móvil */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
        padding: 80px 0 20px 0;
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        z-index: 999;
        overflow-y: auto;
    }
    
    /* Mostrar menú cuando está activo */
    .nav-menu.active {
        right: 0;
    }
    
    /* Overlay para cerrar menú */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Enlaces en móvil */
    .nav-links {
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding: 0 20px;
        margin-bottom: 30px;
    }
    
    .nav-link {
        width: 100%;
        padding: 15px 20px;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        justify-content: flex-start;
        font-size: 1rem;
        margin-bottom: 0;
    }
    
    .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
        transform: none;
    }
    
    .nav-link.active {
        background-color: rgba(255, 255, 255, 0.2);
        border-left: 4px solid white;
    }
    
    .nav-icon {
        font-size: 1.2rem;
        margin-right: 12px;
    }
    
    .nav-text {
        font-size: 1rem;
    }
    
    /* Sección de usuario en móvil */
    .nav-user {
        flex-direction: column;
        gap: 20px;
        width: 100%;
        padding: 0 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 20px;
    }
    
    .user-info {
        width: 100%;
        text-align: center;
        padding: 15px 0;
    }
    
    .user-greeting {
        display: block;
        font-size: 1rem;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.9);
    }
    
    .user-actions {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .user-actions .btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 1rem;
        justify-content: center;
        border-radius: 8px;
    }
    
    .btn-icon {
        margin-right: 8px;
    }
    
    /* Ajustes del container principal */
    .nav-container {
        padding: 0 15px;
        justify-content: space-between;
    }
    
    /* Prevenir scroll del body cuando el menú está abierto */
    body.nav-open {
        overflow: hidden;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .page-actions {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .page-actions .btn {
        width: 100%;
        text-align: center;
    }

    .table-container {
        padding: 15px;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }

    .cantidad-input {
        flex-direction: column;
    }

    .resultado-item {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }

    /* Tarjetas responsivas para móvil */
    .recipe-card-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .recipe-image-container {
        width: 100px;
        height: 100px;
        margin: 0 auto;
    }

    .recipe-info {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }

    .recipe-summary {
        flex-direction: column;
        gap: 12px; /* Más espacio entre las estadísticas */
        align-items: stretch;
    }

    .recipe-stat {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 12px 15px;
        background: #f8f9fa;
        border-radius: 6px;
        border: 1px solid #e9ecef;
        min-height: 44px; /* Altura mínima para mejor touch target */
    }

    .recipe-stat-label {
        text-align: left;
        margin-bottom: 0;
        margin-right: 15px; /* Espacio entre label y value */
        flex: 1;
        font-size: 0.85rem;
    }

    .recipe-stat-value {
        text-align: right;
        flex-shrink: 0; /* Evita que se comprima */
        margin-left: 10px; /* Espacio adicional */
    }

    .recipe-actions {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
        padding: 0;
    }

    .recipe-user {
        padding: 12px 15px;
        background: #f8f9fa;
        border-radius: 6px;
        border: 1px solid #e9ecef;
        display: flex;
        justify-content: space-between;
        align-items: center;
        min-height: 44px;
    }

    .recipe-user-label {
        text-align: left;
        margin-right: 15px;
        flex: 1;
        font-size: 0.85rem;
        margin-bottom: 0;
    }

    .recipe-user-name {
        text-align: right;
        flex-shrink: 0;
        margin-left: 10px;
    }

    .recipe-status {
        padding: 12px 15px;
        background: #f8f9fa;
        border-radius: 6px;
        border: 1px solid #e9ecef;
        display: flex;
        justify-content: space-between;
        align-items: center;
        min-height: 44px;
    }

    .recipe-status-label {
        text-align: left;
        margin-right: 15px;
        flex: 1;
        font-size: 0.85rem;
        margin-bottom: 0;
    }

    .recipe-status-value {
        text-align: right;
        flex-shrink: 0;
        margin-left: 10px;
    }

    /* Ocultar texto de botones en móvil, mostrar solo iconos */
    .recipe-actions .btn .btn-text {
        display: none;
    }

    .recipe-actions .btn {
        min-width: 40px;
        padding: 8px;
        font-size: 1rem;
    }

    /* Tarjetas de ingredientes responsivas para móvil */
    .ingredient-card-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .ingredient-icon-container {
        width: 70px;
        height: 70px;
        margin: 0 auto;
    }

    .ingredient-icon {
        font-size: 2rem;
    }

    .ingredient-info {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }

    .ingredient-summary {
        flex-direction: column;
        gap: 12px; /* Más espacio entre las estadísticas */
        align-items: stretch;
    }

    .ingredient-stat {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 12px 15px;
        background: #f8f9fa;
        border-radius: 6px;
        border: 1px solid #e9ecef;
        min-height: 44px; /* Altura mínima para mejor touch target */
    }

    .ingredient-stat-label {
        text-align: left;
        margin-bottom: 0;
        margin-right: 15px; /* Espacio entre label y value */
        flex: 1;
        font-size: 0.85rem;
    }

    .ingredient-stat-value {
        text-align: right;
        flex-shrink: 0; /* Evita que se comprima */
        margin-left: 10px; /* Espacio adicional */
    }

    .ingredient-actions {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
        padding: 0;
    }

    .ingredient-user {
        padding: 12px 15px;
        background: #f8f9fa;
        border-radius: 6px;
        border: 1px solid #e9ecef;
        display: flex;
        justify-content: space-between;
        align-items: center;
        min-height: 44px;
    }

    .ingredient-user-label {
        text-align: left;
        margin-right: 15px;
        flex: 1;
        font-size: 0.85rem;
        margin-bottom: 0;
    }

    .ingredient-user-name {
        text-align: right;
        flex-shrink: 0;
        margin-left: 10px;
    }

    /* Ocultar texto de botones de ingredientes en móvil */
    .ingredient-actions .btn .btn-text {
        display: none;
    }

    .ingredient-actions .btn {
        min-width: 40px;
        padding: 8px;
        font-size: 1rem;
    }

    /* Estilos responsive específicos para perfil */
    .info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .info-item span {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-actions {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .form-actions .btn {
        width: 100%;
        text-align: center;
    }

    .profile-details {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        text-align: left;
    }

    .detail-label {
        margin-right: 0;
        margin-bottom: 5px;
    }

    .detail-value {
        text-align: left;
        width: 100%;
    }

    .card {
        margin-bottom: 20px;
    }

    .card-header {
        padding: 15px 15px 0 15px;
    }

    .card-header h2 {
        font-size: 1.2rem;
    }

    .card-body {
        padding: 0 15px 15px 15px;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .page-header p {
        font-size: 0.9rem;
    }

    /* Mejor formato para emails largos en móvil */
    .info-item span {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    /* Mejoras para el resumen de perfil en móvil */
    .profile-info h3 {
        font-size: 1.2rem;
        text-align: center;
    }

    .profile-info .description {
        padding: 12px;
        font-size: 0.9rem;
    }

    .container {
        padding: 15px 0;
    }
}

/* ================== COMPONENTE IMAGEN RESPONSIVA ================== */

/* Contenedor principal de la imagen responsiva */
.recipe-image-responsive {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

/* Contenedor para mantener aspecto 16:9 */
.recipe-image-aspect-ratio {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio (9/16 * 100%) */
    overflow: hidden;
    border-radius: 10px;
    background-color: #f5f5f5;
    border: 2px solid #e9ecef;
}

/* Imagen responsiva */
.recipe-image-responsive-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Placeholder para cuando no hay imagen */
.recipe-no-image-responsive {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hover effect para la imagen */
.recipe-image-responsive:hover .recipe-image-responsive-img {
    transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .recipe-image-responsive {
        max-width: 250px;
    }
    
    .recipe-no-image-responsive {
        font-size: 2rem;
    }
    
    .receta-image-container {
        max-width: 350px;
        min-width: 280px;
    }
}

@media (max-width: 480px) {
    .recipe-image-responsive {
        max-width: 200px;
    }
    
    .recipe-no-image-responsive {
        font-size: 1.8rem;
    }
    
    .receta-image-container {
        max-width: 300px;
        min-width: 250px;
    }
}

/* ================== ESTILOS PARA COMPARTIR PERFIL ================== */

/* Sección principal de botones de perfil público */
.share-profile-section {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
}

.profile-public-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.btn-share-main,
.btn-view-profile {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-view-profile {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.btn-view-profile:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    color: white;
    text-decoration: none;
}

.btn-share-main {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.btn-share-main:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Ajustes al header de la card para incluir botones de acción */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.card-actions {
    display: flex;
    gap: 10px;
}

/* Botón de compartir en redes sociales */
.btn-social {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-social:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Modal de compartir */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 20px;
}

.share-url {
    margin-bottom: 20px;
}

.share-url label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.url-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.url-container input {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background: #f8f9fa;
}

.social-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

/* Estilos específicos para cada red social */
.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-facebook {
    background: #1877F2;
    color: white;
}

.btn-twitter {
    background: #1DA1F2;
    color: white;
}

.btn-telegram {
    background: #0088cc;
    color: white;
}

.btn-whatsapp:hover,
.btn-facebook:hover,
.btn-twitter:hover,
.btn-telegram:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Contenedor de botones fijos */
.fixed-buttons {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 15px 20px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    border-top: 1px solid #e1e5e9;
}

.buttons-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.buttons-container .btn {
    flex: 1;
    min-width: 120px;
    max-width: 200px;
    margin: 0;
    text-align: center;
    white-space: nowrap;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Espaciado inferior para el contenido cuando hay botones fijos */
.content-with-fixed-buttons {
    padding-bottom: 120px;
}

/* Media queries para botones responsivos */
@media (max-width: 768px) {
    .fixed-buttons {
        padding: 12px 15px;
    }
    
    .buttons-container {
        gap: 8px;
    }
    
    .buttons-container .btn {
        min-width: 100px;
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .content-with-fixed-buttons {
        padding-bottom: 100px;
    }
}

@media (max-width: 480px) {
    .buttons-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .buttons-container .btn {
        width: 100%;
        max-width: none;
    }
    
    .content-with-fixed-buttons {
        padding-bottom: 160px;
    }
}

/* Animaciones del modal */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ================== ESTILOS PARA SELECTOR DE PAÍS TELÉFONO ================== */

/* Contenedor del input de teléfono */
.iti {
    width: 100%;
    position: relative;
}

.iti input {
    width: 100% !important;
    padding-left: 60px !important;
}

/* Bandera del país */
.iti__flag {
    background-image: url("https://cdn.jsdelivr.net/npm/intl-tel-input@19.2.19/build/img/flags.png");
}

/* Dropdown de países */
.iti__country-list {
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.iti__country {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.iti__country:hover {
    background-color: #f8f9fa;
}

.iti__country.iti__highlight {
    background-color: #e3f2fd;
}

/* Código de país */
.iti__dial-code {
    color: #666;
    font-weight: 500;
}

/* Mensaje de error personalizado */
.phone-error {
    display: block;
    margin-top: 4px;
    font-size: 0.875rem;
}

/* Validación visual */
input.phone-valid {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

input.phone-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Responsive para modal y compartir */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
    }
    
    .url-container {
        flex-direction: column;
    }
    
    .url-container input {
        width: 100%;
    }
    
    .social-buttons {
        grid-template-columns: 1fr;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .card-actions {
        width: 100%;
        justify-content: center;
    }
    
    .share-profile-section {
        padding: 15px 10px;
    }
    
    .profile-public-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-share-main,
    .btn-view-profile {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}