* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Arial, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 10px;
        }

        /* Tela de seleção de ambiente */
        .environment-selector {
            max-width: 500px;
            margin: 50px auto;
            text-align: center;
        }

        .env-buttons {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 30px;
            margin-top: 50px;
        }

        .env-btn {
            background: white;
            border: none;
            border-radius: 30px;
            padding: 40px 20px;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        }

        .env-btn:hover {
            transform: translateY(-10px);
            box-shadow: 0 20px 40px rgba(0,0,0,0.3);
        }

        .env-btn .icon {
            font-size: 80px;
            margin-bottom: 20px;
        }

        .env-btn .title {
            font-size: 28px;
            font-weight: bold;
            color: #333;
        }

        .env-btn .subtitle {
            font-size: 16px;
            color: #666;
            margin-top: 10px;
        }

        .env-btn.admin {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }

        .env-btn.admin .title,
        .env-btn.admin .subtitle {
            color: white;
        }

        /* Container principal */
        .app-container {
            max-width: 1200px;
            margin: 0 auto;
            background: white;
            border-radius: 20px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            overflow: hidden;
            display: none;
        }

        .app-container.active {
            display: block;
        }

        /* Header */
        .header {
            background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
            color: white;
            padding: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .header.admin-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }

        .header h1 {
            font-size: 24px;
        }

        .back-btn {
            background: rgba(255,255,255,0.2);
            border: none;
            color: white;
            padding: 10px 20px;
            border-radius: 10px;
            cursor: pointer;
            font-size: 16px;
            transition: all 0.3s;
        }

        .back-btn:hover {
            background: rgba(255,255,255,0.3);
        }

        /* Área do Cliente */
        .client-area {
            padding: 20px;
        }

        .client-info {
            background: #f0f7ff;
            padding: 20px;
            border-radius: 15px;
            margin-bottom: 20px;
        }

        .client-info input {
            width: 100%;
            padding: 15px;
            font-size: 18px;
            border: 3px solid #4CAF50;
            border-radius: 15px;
            margin-bottom: 10px;
        }

        .products-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            gap: 15px;
            margin: 20px 0;
        }

        .product-card {
            background: white;
            border: 3px solid #e0e0e0;
            border-radius: 20px;
            --card-x-pad: 10px;
            --card-y-pad: 20px;
            padding: var(--card-y-pad) var(--card-x-pad);
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
            user-select: none;
            position: relative;
        }

        .product-card:active {
            transform: scale(0.95);
            background: #f0f0f0;
        }

        .product-card.selected {
            border-color: #4CAF50;
            background: #e8f5e9;
        }

        .product-image-wrap {
            width: calc(100% + (var(--card-x-pad) * 2));
            aspect-ratio: 1 / 1;
            max-width: none;
            margin: calc(-1 * var(--card-y-pad)) calc(-1 * var(--card-x-pad)) 10px;
            border-radius: 17px 17px 0 0;
            overflow: hidden;
            border: none;
            background: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .product-image {
            width: 100%;
            height: 100%;
            object-fit: contain;
            object-position: center;
            display: block;
        }

        .product-icon {
            font-size: 60px;
            margin-bottom: 10px;
        }

        .product-name {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 5px;
        }

        .product-variant-name {
            font-size: 14px;
            color: #666;
            margin-bottom: 8px;
        }

        .product-variants {
            display: flex;
            gap: 8px;
            justify-content: center;
            flex-wrap: wrap;
            margin-top: 6px;
        }

        .variant-thumb {
            width: 36px;
            height: 36px;
            border-radius: 12px;
            border: none;
            padding: 0;
            background: #fff;
            overflow: hidden;
            cursor: pointer;
        }

        .variant-thumb.active {
            box-shadow: 0 0 0 3px #4CAF50;
        }

        .variant-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .product-price {
            font-size: 16px;
            color: #4CAF50;
            font-weight: bold;
        }

        .product-quantity-badge {
            position: absolute;
            top: -10px;
            right: -10px;
            background: #ff5722;
            color: white;
            border-radius: 50%;
            width: 35px;
            height: 35px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            font-weight: bold;
            box-shadow: 0 3px 10px rgba(0,0,0,0.2);
        }

        .current-order {
            background: #fff9c4;
            padding: 20px;
            border-radius: 20px;
            margin: 20px 0;
        }

        .order-items-list {
            max-height: 300px;
            overflow-y: auto;
            margin: 15px 0;
        }

        .order-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px;
            background: white;
            border-radius: 15px;
            margin-bottom: 10px;
            font-size: 18px;
        }

        .order-item-controls {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .quantity-control {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .quantity-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: none;
            background: #4CAF50;
            color: white;
            font-size: 24px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .quantity-btn.delete {
            background: #f44336;
        }

        .icon-btn {
            width: 36px;
            height: 36px;
            border-radius: 12px;
            border: 2px solid #e5e7eb;
            background: #fff;
            color: #6b7280;
            font-size: 22px;
            line-height: 1;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .icon-btn:hover {
            color: #111827;
            border-color: #d1d5db;
            background: #f9fafb;
        }

        .quantity-value {
            font-size: 24px;
            font-weight: bold;
            min-width: 40px;
            text-align: center;
        }

        .order-total {
            font-size: 24px;
            font-weight: bold;
            text-align: right;
            margin: 20px 0;
        }

        .action-buttons {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            margin-top: 20px;
        }

        .btn-large {
            padding: 20px;
            font-size: 20px;
            border: none;
            border-radius: 20px;
            cursor: pointer;
            font-weight: bold;
            transition: all 0.3s;
        }

        .btn-small {
            padding: 10px 12px;
            font-size: 14px;
            border-radius: 12px;
        }

        .btn-primary {
            background: #4CAF50;
            color: white;
        }

        .btn-secondary {
            background: #ff9800;
            color: white;
        }

        .btn-danger {
            background: #f44336;
            color: white;
        }

        .my-orders {
            margin-top: 30px;
        }

        .order-history-card {
            background: #f5f5f5;
            padding: 15px;
            border-radius: 15px;
            margin-bottom: 15px;
        }

        .order-history-card[role="button"] {
            cursor: pointer;
        }

        .order-history-card[role="button"]:hover {
            background: #f0f0f0;
        }

        .order-history-card.expanded {
            background: #eef7ff;
        }

        .order-history-header {
            display: grid;
            gap: 8px;
        }

        .order-faq-details {
            margin-top: 12px;
            padding-top: 12px;
            border-top: 1px solid rgba(0, 0, 0, 0.08);
        }

        .order-faq-title {
            font-weight: 700;
            color: #333;
            margin-bottom: 8px;
        }

        .order-faq-list {
            display: grid;
            gap: 6px;
        }

        .order-faq-item {
            background: white;
            border: 1px solid rgba(0, 0, 0, 0.08);
            border-radius: 12px;
            padding: 10px 12px;
            color: #333;
        }

        /* Área Admin */
        .admin-tabs {
            display: flex;
            background: #f8f9fa;
            border-bottom: 2px solid #e0e0e0;
        }

        .admin-tab {
            flex: 1;
            padding: 15px;
            text-align: center;
            cursor: pointer;
            font-weight: 600;
            color: #666;
            transition: all 0.3s;
            border-bottom: 3px solid transparent;
        }

        .admin-tab:hover {
            background: #e9ecef;
        }

        .admin-tab.active {
            color: #764ba2;
            border-bottom: 3px solid #764ba2;
            background: white;
        }

        .admin-content {
            display: none;
            padding: 20px;
        }

        .admin-content.active {
            display: block;
        }

        .products-management {
            display: grid;
            grid-template-columns: 300px 1fr;
            gap: 20px;
        }

        .product-form {
            background: #f8f9fa;
            padding: 20px;
            border-radius: 15px;
        }

        .products-list {
            background: #f8f9fa;
            padding: 20px;
            border-radius: 15px;
            max-height: 500px;
            overflow-y: auto;
        }

        .admin-product-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px;
            background: white;
            border-radius: 10px;
            margin-bottom: 10px;
        }

        .orders-list {
            max-height: 600px;
            overflow-y: auto;
        }

        .admin-order-card {
            background: white;
            border: 2px solid #e0e0e0;
            border-radius: 15px;
            padding: 20px;
            margin-bottom: 20px;
        }

        /* Modo idoso - letras maiores */
        .elderly-mode {
            font-size: 1.2em;
        }

        .elderly-mode .product-name {
            font-size: 22px;
        }

        .elderly-mode .btn-large {
            font-size: 24px;
            padding: 25px;
        }

        /* Responsivo */
        @media (max-width: 768px) {
            .products-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .env-buttons {
                grid-template-columns: 1fr;
            }
            
            .products-management {
                grid-template-columns: 1fr;
            }
            
            .action-buttons {
                grid-template-columns: 1fr;
            }
        }

        /* Animações */
        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }

        .click-feedback {
            animation: pulse 0.3s ease-in-out;
        }

        /* Loading e mensagens */
        .message {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: #333;
            color: white;
            padding: 15px 30px;
            border-radius: 50px;
            font-size: 18px;
            z-index: 1000;
            animation: slideUp 0.3s ease-out;
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translate(-50%, 20px);
            }
            to {
                opacity: 1;
                transform: translate(-50%, 0);
            }
        }

        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.55);
            display: flex;
            align-items: flex-start;
            justify-content: center;
            padding: 16px;
            z-index: 2000;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        .modal-card {
            width: min(720px, 100%);
            background: white;
            border-radius: 18px;
            padding: 16px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.35);
            max-height: calc(100vh - 32px);
            overflow-y: auto;
        }

        .modal-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }

        .modal-grid label {
            display: grid;
            gap: 6px;
            font-size: 14px;
            color: #333;
        }

        .modal-grid input {
            width: 100%;
            padding: 12px;
            border-radius: 12px;
            border: 2px solid #e0e0e0;
            font-size: 16px;
        }

        .modal-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
            margin-top: 12px;
        }

        @media (max-width: 700px) {
            .modal-grid {
                grid-template-columns: 1fr;
            }
        }

        .admin-product-row {
            cursor: pointer;
        }

        .admin-product-row:hover {
            background: #f7f7f7;
        }

        .admin-variant-row {
            display: grid;
            grid-template-columns: 80px 1fr 1fr 44px;
            gap: 10px;
            align-items: center;
            padding: 10px;
            border: 1px solid #eee;
            border-radius: 14px;
            margin-bottom: 10px;
            background: #fff;
        }

        .admin-variant-row input[type="text"] {
            width: 100%;
            padding: 10px;
            border-radius: 12px;
            border: 2px solid #e0e0e0;
            font-size: 14px;
        }

        @media (max-width: 820px) {
            .admin-variant-row {
                grid-template-columns: 80px 1fr;
            }
        }

        div#appContent > div.client-area > div.client-info > div > button.btn-large:nth-child(1) {
            width: 230px !important;
            height: 50px !important;
            border-radius: 15px !important;
            padding-top: 0px !important;
            padding-bottom: 0px !important;
        }

        div#appContent > div.client-area > div.client-info > div > button.btn-large:nth-child(2) {
            height: 50px !important;
            border-radius: 15px !important;
            padding-top: 0px !important;
            padding-bottom: 0px !important;
        }

        div#product-1 {
            padding-left: unset !important;
            padding-right: unset !important;
            height: auto !important;
        }

        div#product-1 > div.product-image-wrap > img.product-image {
            width: 131px !important;
            height: 131px !important;
        }
