/* ============================================
   MONTALLANTAS LOS CASTELLANOS - ESTILOS
   ============================================ */

:root {
    --primary: #FF6B35;
    --primary-dark: #e55a2b;
    --secondary: #1a1a2e;
    --accent: #16213e;
    --success: #00d68f;
    --warning: #ffaa00;
    --danger: #ff3d71;
    --info: #0095ff;
    --light: #f8f9fa;
    --dark: #0f0f23;
    --gray: #6c757d;
    --white: #ffffff;
    --shadow: 0 10px 40px rgba(0,0,0,0.15);
    --shadow-sm: 0 4px 15px rgba(0,0,0,0.1);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, var(--secondary) 0%, var(--dark) 100%);
    padding: 0;
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-header {
    padding: 25px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    text-align: center;
    position: relative;
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.brand-logo-full {
    width: 210px;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.brand-logo-mini {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.sidebar.collapsed .brand-logo-full {
    display: none;
}

.sidebar.collapsed .brand-logo-mini {
    display: block;
}

.nav-menu {
    padding: 20px 0;
}

.nav-item {
    padding: 0 15px;
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.95rem;
}

.nav-link:hover {
    background: rgba(255,107,53,0.15);
    color: var(--primary);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255,107,53,0.4);
}

.nav-link i {
    width: 24px;
    font-size: 1.1rem;
    text-align: center;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

/* Admin Login Button */
#adminLoginBtn {
    background: linear-gradient(135deg, var(--danger) 0%, #e53e5a 100%);
    color: var(--white);
    margin-bottom: 10px;
}

#adminLoginBtn:hover {
    background: linear-gradient(135deg, #e53e5a 0%, var(--danger) 100%);
    transform: scale(1.02);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    transition: var(--transition);
}

.main-content.expanded {
    margin-left: 80px;
}

/* ============================================
   TOP BAR
   ============================================ */
.topbar {
    background: var(--white);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.toggle-btn {
    width: 45px;
    height: 45px;
    border: none;
    background: var(--light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--secondary);
    transition: var(--transition);
}

.toggle-btn:hover {
    background: var(--primary);
    color: var(--white);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.current-date {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border-radius: 50px;
    font-size: 0.9rem;
}

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

.user-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
}

/* ============================================
   CONTENT AREA
   ============================================ */
.content-area {
    padding: 30px;
}

.page-title {
    font-size: 1.8rem;
    color: var(--secondary);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-title i {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.3rem;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   DASHBOARD CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.stat-card.primary::before { background: var(--primary); }
.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.info::before { background: var(--info); }

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.stat-card.primary .stat-icon {
    background: rgba(255,107,53,0.1);
    color: var(--primary);
}

.stat-card.success .stat-icon {
    background: rgba(0,214,143,0.1);
    color: var(--success);
}

.stat-card.warning .stat-icon {
    background: rgba(255,170,0,0.1);
    color: var(--warning);
}

.stat-card.info .stat-icon {
    background: rgba(0,149,255,0.1);
    color: var(--info);
}

.stat-card h3 {
    font-size: 0.85rem;
    color: var(--gray);
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
}

.stat-card .stat-change {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    margin-top: 10px;
    padding: 4px 10px;
    border-radius: 20px;
}

.stat-card .stat-change.up {
    background: rgba(0,214,143,0.1);
    color: var(--success);
}

.stat-card .stat-change.down {
    background: rgba(255,61,113,0.1);
    color: var(--danger);
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 25px;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.1rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h2 i {
    color: var(--primary);
}

.card-body {
    padding: 25px;
}

/* ============================================
   FORMS
   ============================================ */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary);
    font-size: 0.9rem;
}

.form-group label i {
    margin-right: 8px;
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e9ecef;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--light);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(255,107,53,0.1);
}

.form-control::placeholder {
    color: #adb5bd;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 45px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255,107,53,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,53,0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gray);
    color: var(--gray);
}

.btn-outline:hover {
    background: var(--gray);
    color: var(--white);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #00b377 100%);
    color: var(--white);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #e69900 100%);
    color: var(--white);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #e5335a 100%);
    color: var(--white);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ============================================
   LIST ITEMS
   ============================================ */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

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

.list-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.list-item-icon {
    width: 45px;
    height: 45px;
    background: var(--light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
}

.list-item-text h4 {
    font-size: 0.95rem;
    color: var(--secondary);
    margin-bottom: 4px;
}

.list-item-text p {
    font-size: 0.85rem;
    color: var(--gray);
}

.list-item-actions {
    display: flex;
    gap: 8px;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(0,214,143,0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(255,170,0,0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(255,61,113,0.1);
    color: var(--danger);
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.95rem;
}

/* ============================================
   QUICK ACTIONS
   ============================================ */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.quick-action {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.quick-action:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.quick-action i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.quick-action span {
    display: block;
    font-size: 0.9rem;
    color: var(--secondary);
    font-weight: 500;
}

/* ============================================
   SUMMARY BOX
   ============================================ */
.summary-box {
    background: var(--light);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 20px;
}

.summary-box h3 {
    font-size: 1rem;
    color: var(--secondary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-box h3 i {
    color: var(--primary);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.total {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--secondary);
    padding-top: 15px;
    margin-top: 10px;
    border-top: 2px solid var(--primary);
}

/* ============================================
   PRICE DISPLAY
   ============================================ */
.price-display {
    margin-top: 10px;
    padding: 10px 15px;
    background: rgba(255,107,53,0.1);
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-weight: 500;
    font-size: 0.9rem;
}

/* ============================================
   SELECTED INSUMOS
   ============================================ */
.selected-insumos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.insumo-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--light);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--secondary);
}

.insumo-tag button {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 0;
    font-size: 0.9rem;
}

/* ============================================
   FILE INPUT
   ============================================ */
.file-input-wrapper {
    position: relative;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--light);
    border: 2px dashed #dee2e6;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray);
}

.file-input-label:hover {
    border-color: var(--primary);
    background: rgba(255,107,53,0.05);
}

/* ============================================
   LOADING ANIMATION
   ============================================ */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 15px 30px;
    background: var(--secondary);
    color: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    z-index: 10000;
    opacity: 0;
    transition: var(--transition);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

/* ============================================
   LOGIN MODAL
   ============================================ */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-screen.show {
    display: flex;
}

.login-container {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    color: var(--white);
}

.login-header h1 {
    color: var(--secondary);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.login-header p {
    color: var(--gray);
    font-size: 0.9rem;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-error {
    color: var(--danger);
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    display: none;
}

.login-error.show {
    display: block;
}

/* ============================================
   INVOICE PREVIEW
   ============================================ */
.invoice-preview {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 25px;
    margin-top: 20px;
    box-shadow: var(--shadow-sm);
}

.invoice-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary);
}

.invoice-header h3 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.invoice-header p {
    color: var(--gray);
    font-size: 0.85rem;
}

/* ============================================
   REPORT TABLE
   ============================================ */
.table-responsive {
    overflow-x: auto;
}

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

.report-table th,
.report-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.report-table th {
    background: var(--light);
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.report-table td {
    font-size: 0.9rem;
    color: var(--secondary);
}

.report-table tr:hover {
    background: rgba(255,107,53,0.05);
}

/* ============================================
   MOBILE OVERLAY
   ============================================ */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.overlay.active {
    display: block;
}

/* ============================================
   MOBILE MENU BUTTON
   ============================================ */
.mobile-menu-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 1001;
}

/* Solo mostrar en móvil */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .toggle-btn {
        display: none;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .topbar {
        padding: 10px 16px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 200;
        justify-content: flex-end;
    }

    .main-content {
        padding-top: 64px;
    }

    .current-date {
        display: none;
    }

    .content-area {
        padding: 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================
   TICKET DE FACTURA
   ============================================ */
.ticket {
    background: #fff;
    width: 300px;
    margin: 16px auto 0;
    padding: 20px 18px 16px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #111;
    border: 1px dashed #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}

.ticket-logo-row {
    text-align: center;
    margin-bottom: 10px;
}

.ticket-logo {
    width: 160px;
    height: auto;
    border-radius: 6px;
}

.ticket-title {
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.ticket-divider {
    text-align: center;
    color: #888;
    font-size: 11px;
    margin: 6px 0;
    letter-spacing: 1px;
}

.ticket-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 3px 0;
    gap: 8px;
}

.ticket-row span:first-child {
    color: #555;
    flex: 1;
    word-break: break-word;
    line-height: 1.3;
}

.ticket-row span:last-child {
    text-align: right;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.ticket-total {
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #FF6B35;
    margin: 6px 0;
    letter-spacing: 0.5px;
}

.ticket-footer {
    text-align: center;
    font-size: 12px;
    color: #777;
    margin-top: 6px;
}

/* Miniatura de imagen en lista de insumos */
.insumo-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0,0,0,0.08);
}

/* List item clickeable */
.list-item-clickable {
    cursor: pointer;
    transition: var(--transition);
}
.list-item-clickable:hover {
    background: rgba(255, 107, 53, 0.06);
    transform: translateX(3px);
}

/* Modal detalle insumo */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}
.modal-box {
    background: var(--white);
    border-radius: var(--radius);
    width: 100%;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}
.modal-header h3 {
    margin: 0;
    font-size: 1rem;
}
.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.2); }
.modal-body {
    padding: 20px;
}
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

/* ============================================
   CATÁLOGO PÚBLICO - GALERÍA DE INSUMOS
   ============================================ */

.catalogo-card {
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.catalogo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.catalogo-card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #ccc;
    padding: 12px;
    overflow: hidden;
}

.catalogo-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.catalogo-card-body {
    padding: 12px 14px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.catalogo-card-name {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.catalogo-card-cat {
    font-size: 0.75rem;
    color: var(--gray);
}

.catalogo-card-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 4px;
}

.cat-chip-nav {
    background: var(--white);
    border: 1.5px solid #e0e0e0;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.8rem;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray);
}

.cat-chip-nav.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.cat-chip-nav:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Dashboard sin sesión: ocultar elementos admin */
.dashboard-admin-only {
    transition: opacity 0.3s;
}

/* ============================================
   MOSAICO DE SERVICIOS PÚBLICOS
   ============================================ */

.servicio-pub-card {
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    transition: var(--transition);
    cursor: default;
}

.servicio-pub-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.12);
}

.servicio-pub-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    flex-shrink: 0;
}

.servicio-pub-name {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--secondary);
    line-height: 1.3;
}

.servicio-pub-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

/* Info negocio responsive */
@media (max-width: 640px) {
    #publicWelcome .info-grid {
        grid-template-columns: 1fr !important;
    }
}
