/* style.css - Versão 4.12 (Final) */
:root {
  --primary: #ffb800; --primary-dark: #fca311; --secondary: #ff6b35; --accent: #ee4d2d;
  --dark: #ffffff; --gray: #aaaaaa; --light-gray: #1a1a1a; --white: #2a2a2a;
  --text-input-bg: #333; --success: #00c853; --error: #ff3d00; --shadow: rgba(0,0,0,0.4);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Inter", sans-serif; background: var(--light-gray); color: var(--dark); line-height: 1.6; overflow-x: hidden; }
header { background: var(--white); border-bottom: 2px solid var(--primary); padding: 1.5rem 0; box-shadow: 0 4px 20px var(--shadow); position: sticky; top: 0; z-index: 1000; }
.header-container { max-width: 1400px; margin: 0 auto; padding: 0 1rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.logo-container { display: flex; align-items: center; gap: 1.5rem; }
.logo-img { width: 80px; height: 80px; object-fit: contain; background: #fff; border-radius: 8px; padding: 2px; }
.logo-text h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin: 0; line-height: 1.1; color: #fff; }
.logo-text p { font-size: 1rem; font-weight: 400; opacity: 0.8; margin: 5px 0 0 0; color: #ccc; }

/* STATUS */
.status-badge { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 700; transition: all 0.3s; background: #333; border: 1px solid #444; }
.status-light { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-shadow: 0 0 5px rgba(0,0,0,0.5); }
.status-badge.connected { border-color: var(--success); color: var(--success); background: rgba(0, 200, 83, 0.1); }
.status-badge.connected .status-light { background-color: var(--success); box-shadow: 0 0 8px var(--success); animation: pulse-green 2s infinite; }
.status-badge.disconnected { border-color: var(--error); color: var(--error); background: rgba(255, 61, 0, 0.1); }
.status-badge.disconnected .status-light { background-color: var(--error); box-shadow: 0 0 8px var(--error); animation: pulse-red 1.5s infinite; }
@keyframes pulse-green { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes pulse-red { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.btn-admin { background: var(--text-input-bg); color: var(--dark); border: 2px solid var(--gray); padding: 0.5rem 1rem; border-radius: 8px; cursor: pointer; font-weight: 600; transition: all 0.3s; }
.btn-admin:hover { background: var(--primary); color: #000; border-color: var(--primary); }
.container { max-width: 1400px; margin: 0 auto; padding: 1rem; }
.black-friday-banner { background: var(--primary); color: #000; padding: 0.75rem 1rem; text-align: center; font-weight: 700; }
.banner-content { display: flex; justify-content: center; gap: 1.5rem; }
.countdown-timer { font-size: 1rem; background: #000; color: var(--primary); padding: 0.5rem 1rem; border-radius: 4px; }

/* VITRINE & SEARCH */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.product-card { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.3); transition: all 0.3s; display: flex; flex-direction: column; border: 1px solid #333; height: 100%; }
.product-card:hover { transform: translateY(-8px); border-color: var(--primary); }
.product-image { width: 100%; height: 220px; object-fit: contain; background: #fff; border-bottom: 1px solid #333; }
.product-info { padding: 1rem; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.product-title { font-size: 0.95rem; font-weight: 500; margin-bottom: 0.5rem; color: #e0e0e0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { font-size: 1.4rem; font-weight: 800; color: var(--primary); margin: 0.5rem 0; }
.btn-shopee { background: var(--primary); color: #000; border: none; padding: 0.8rem; border-radius: 6px; cursor: pointer; font-weight: 700; text-align: center; text-decoration: none; display: block; width: 100%; }
.btn-shopee:hover { background: #fff; box-shadow: 0 0 15px var(--primary); }

.modern-search-section { background: linear-gradient(145deg, #2a2a2a, #222); padding: 2rem; border-radius: 16px; margin-bottom: 2rem; border: 1px solid #444; }
.search-header h3 { color: var(--primary); margin-bottom: 1.5rem; border-left: 4px solid var(--primary); padding-left: 10px; }
.search-inputs-wrapper { display: grid; grid-template-columns: 3fr 1fr; gap: 1rem; align-items: end; }
.search-group label { display: block; font-size: 0.85rem; color: #aaa; margin-bottom: 0.5rem; }
.search-group input { width: 100%; padding: 1rem; background: #151515; border: 1px solid #444; color: #fff; border-radius: 8px; transition: all 0.3s; }
.search-group input:focus { border-color: var(--primary); outline: none; }
.btn-search-hero { height: 50px; background: var(--success); color: white; border: none; border-radius: 8px; font-weight: 700; cursor: pointer; width: 100%; }
.btn-search-hero:hover { background: #00e676; }

/* ADMIN */
.admin-panel { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 2100; overflow-y: auto; }
.admin-content { background: var(--white); color: var(--dark); max-width: 1100px; width: 95%; margin: 2rem auto; padding: 2rem; border-radius: 12px; position: relative; border: 1px solid #444; }
.admin-close { position: absolute; top: 1rem; right: 1rem; background: var(--primary); color: #000; border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.5rem; }
.admin-tabs { display: flex; gap: 0.5rem; margin-bottom: 2rem; border-bottom: 2px solid #444; flex-wrap: wrap; }
.admin-tab { padding: 0.75rem 1.5rem; background: transparent; border: none; cursor: pointer; font-weight: 600; color: var(--gray); border-bottom: 3px solid transparent; }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; } .tab-content.active { display: block; }

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
.form-group input { width: 100%; padding: 0.75rem; background: var(--text-input-bg); color: var(--dark); border: 2px solid #555; border-radius: 8px; }
.btn-save { background: var(--success); color: white; border: none; padding: 0.75rem 1.5rem; border-radius: 8px; cursor: pointer; font-weight: 600; width: 100%; margin-top: 1rem; }

.kpi-card { background: #252525; padding: 1.5rem; border-radius: 12px; text-align: center; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.kpi-card p { color: #aaa; font-size: 0.9rem; }
.kpi-card h3 { color: #fff; font-size: 2rem; margin: 0.5rem 0 0; }
.chart-container { background: #252525; padding: 1rem; border-radius: 12px; height: 350px; position: relative; }
.styled-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.styled-table th, .styled-table td { padding: 1rem; text-align: left; border-bottom: 1px solid #333; color: #fff; }
.styled-table th { background: #333; color: var(--primary); font-weight: 700; }

.product-item { background: var(--white); border: 1px solid #444; padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 0.8rem; display: flex; justify-content: space-between; align-items: center; }
.btn-delete { background: var(--error); color: white; border: none; padding: 0.5rem 1rem; border-radius: 6px; cursor: pointer; }

/* FOOTER */
.footer-bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #333; padding: 2rem 1rem; margin-top: 2rem; flex-wrap: wrap; gap: 1rem; }
.copyright { color: #888; font-size: 0.9rem; }
.footer-links { display: flex; align-items: center; justify-content: flex-end; gap: 1.5rem; flex: 1; padding-right: 15px; }
.footer-links a { color: #888; text-decoration: none; font-size: 0.9rem; transition: all 0.3s ease; }
.footer-links a:hover { color: var(--primary); }
@media (max-width: 768px) {
  .footer-bottom { flex-direction: column-reverse; text-align: center; }
  .footer-links { justify-content: center; padding-right: 0; }
}
