* { box-sizing: border-box; }
body { margin:0; font-family: Tahoma, Arial, sans-serif; background:#f4f7f6; color:#17212b; }
a { color:#0f766e; text-decoration:none; }
.topbar { background:#0f766e; color:white; display:flex; align-items:center; justify-content:space-between; padding:14px 22px; position:sticky; top:0; z-index:10; }
.brand { color:white; font-weight:800; font-size:20px; }
.topbar nav { display:flex; gap:14px; align-items:center; flex-wrap:wrap; }
.topbar nav a, .topbar .link-btn { color:white; }
.container { max-width:1100px; margin:0 auto; padding:24px; }
.inline-form { display:inline; margin:0; }
.link-btn { border:0; background:transparent; cursor:pointer; font:inherit; padding:0; }
.alert { padding:12px 16px; border-radius:12px; margin-bottom:16px; }
.alert.success { background:#dcfce7; color:#166534; }
.alert.danger { background:#fee2e2; color:#991b1b; }
h1 { margin:0 0 8px; }
.muted { color:#64748b; }
.small { font-size:12px; }
.card, .auth-card, .hero-card, .sync-card { background:white; border-radius:18px; padding:20px; box-shadow:0 10px 30px rgba(15,118,110,.08); }
.auth-card { max-width:440px; margin:50px auto; }
label { display:block; font-weight:700; margin-top:14px; margin-bottom:6px; }
input, textarea, select { width:100%; padding:12px; border:1px solid #cbd5e1; border-radius:12px; font:inherit; background:white; }
button, .primary { display:inline-block; border:0; border-radius:12px; padding:12px 18px; background:#0f766e; color:white; cursor:pointer; font-weight:700; font:inherit; }
button:hover, .primary:hover { background:#115e59; color:white; }
.full { width:100%; text-align:center; margin-top:16px; }
.check-row { display:flex; gap:8px; align-items:center; }
.check-row input { width:auto; }
.page-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:18px; }
.filter-row { display:flex; gap:10px; margin-bottom:16px; }
.filter-row input { flex:1; }
.table-wrap { overflow:auto; background:white; border-radius:18px; box-shadow:0 10px 30px rgba(15,118,110,.08); }
table { width:100%; border-collapse:collapse; min-width:760px; }
th, td { padding:14px; border-bottom:1px solid #e2e8f0; text-align:right; vertical-align:top; }
th { background:#f8fafc; color:#334155; }
.thumb { width:64px; height:64px; object-fit:cover; border-radius:12px; }
.badge { background:#ccfbf1; color:#115e59; padding:5px 10px; border-radius:999px; display:inline-block; }
.actions { display:flex; gap:10px; align-items:center; }
.danger-btn { background:#ef4444; padding:8px 12px; }
.empty { text-align:center; color:#64748b; padding:30px; }
.form-grid { max-width:760px; }
.images-row { display:flex; gap:10px; flex-wrap:wrap; margin:15px 0; }
.images-row img { width:120px; height:120px; object-fit:cover; border-radius:16px; }
.mobile-shell { max-width:640px; margin:0 auto 80px; }
.hero-card { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; background:linear-gradient(135deg,#0f766e,#14b8a6); color:white; }
.hero-card p { margin-bottom:0; opacity:.95; }
.status-pill { background:rgba(255,255,255,.2); padding:8px 12px; border-radius:999px; white-space:nowrap; }
.sync-card { display:flex; justify-content:space-between; align-items:center; margin:16px 0; gap:12px; }
.mobile-form { margin-bottom:16px; }
.preview-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:10px; }
.preview-grid img { width:100%; aspect-ratio:1; object-fit:cover; border-radius:12px; }
.form-message { min-height:22px; color:#0f766e; font-weight:700; }
.local-list { display:flex; flex-direction:column; gap:10px; }
.local-item { display:flex; justify-content:space-between; gap:12px; background:#f8fafc; border:1px solid #e2e8f0; padding:12px; border-radius:14px; }
.local-item.failed { border-color:#fecaca; background:#fff1f2; }
@media (max-width:700px){ .topbar{align-items:flex-start; flex-direction:column;} .container{padding:14px;} .page-head,.sync-card,.hero-card{flex-direction:column;} .filter-row{flex-direction:column;} }

/* Public shop website */
.public-body { background:#f6fbfa; color:#17212b; }
.public-navbar { background:rgba(255,255,255,.94); backdrop-filter:blur(12px); border-bottom:1px solid #dbeafe; display:flex; justify-content:space-between; align-items:center; padding:16px 7%; position:sticky; top:0; z-index:50; box-shadow:0 8px 28px rgba(15,118,110,.06); }
.public-brand { display:flex; align-items:center; gap:10px; color:#0f766e; font-weight:900; font-size:22px; }
.brand-icon { width:42px; height:42px; border-radius:16px; background:#ccfbf1; display:grid; place-items:center; }
.public-nav { display:flex; gap:16px; align-items:center; flex-wrap:wrap; }
.public-nav a { color:#334155; font-weight:700; }
.cart-nav-link { position:relative; }
.cart-count { background:#0f766e; color:white; min-width:22px; height:22px; border-radius:999px; display:inline-grid; place-items:center; font-size:12px; margin-right:4px; }
.public-hero { padding:70px 7%; display:grid; grid-template-columns:1.2fr .8fr; gap:34px; align-items:center; background:linear-gradient(135deg,#ecfeff 0%,#f8fafc 55%,#dcfce7 100%); }
.eyebrow { display:inline-block; background:#ccfbf1; color:#115e59; padding:8px 14px; border-radius:999px; font-weight:800; margin-bottom:14px; }
.public-hero h1 { font-size:46px; line-height:1.28; color:#134e4a; margin-bottom:18px; }
.public-hero p { color:#475569; font-size:18px; line-height:1.9; }
.hero-actions { display:flex; gap:12px; flex-wrap:wrap; margin-top:24px; }
.hero-btn { padding:14px 22px; border-radius:16px; font-weight:900; }
.primary-hero { background:#0f766e; color:white; }
.primary-hero:hover { color:white; background:#115e59; }
.secondary-hero { background:white; color:#0f766e; border:1px solid #99f6e4; }
.public-hero-panel { background:white; padding:30px; border-radius:30px; box-shadow:0 24px 70px rgba(15,118,110,.16); border:1px solid #d1fae5; }
.tooth-big { font-size:72px; margin-bottom:12px; }
.public-hero-panel h2 { color:#134e4a; margin-top:0; }
.public-section { padding:42px 7%; }
.compact-section { padding-top:28px; }
.section-head { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; margin-bottom:22px; }
.section-head h2 { margin:0; color:#134e4a; font-size:30px; }
.section-head p { margin:6px 0 0; color:#64748b; }
.category-chips-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.category-chip { background:white; padding:20px; border-radius:20px; border:1px solid #d1fae5; box-shadow:0 10px 28px rgba(15,118,110,.07); display:flex; flex-direction:column; gap:8px; }
.category-chip strong { color:#134e4a; font-size:18px; }
.category-chip span { color:#64748b; }
.shop-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:22px; }
.shop-card { background:white; border-radius:24px; overflow:hidden; box-shadow:0 14px 38px rgba(15,118,110,.08); border:1px solid #e2e8f0; display:flex; flex-direction:column; }
.shop-card-image { height:230px; background:#e2e8f0; display:grid; place-items:center; color:#64748b; }
.shop-card-image img { width:100%; height:100%; object-fit:cover; transition:.25s ease; }
.shop-card:hover .shop-card-image img { transform:scale(1.04); }
.shop-card-body { padding:18px; display:flex; flex-direction:column; flex:1; }
.shop-category { color:#0f766e; background:#f0fdfa; padding:5px 10px; border-radius:999px; font-size:12px; width:max-content; }
.shop-card h3 { margin:12px 0 8px; font-size:19px; }
.shop-card h3 a { color:#17212b; }
.shop-desc { color:#64748b; line-height:1.7; font-size:14px; min-height:46px; }
.shop-card-bottom { margin-top:auto; display:flex; justify-content:space-between; align-items:center; gap:10px; }
.shop-price { color:#dc2626; font-size:18px; white-space:nowrap; }
.add-to-cart-btn, .go-cart-btn, .send-whatsapp-btn { background:#0f766e; color:white; border:0; padding:10px 14px; border-radius:13px; font-weight:900; cursor:pointer; text-align:center; }
.add-to-cart-btn:hover, .send-whatsapp-btn:hover { background:#115e59; }
.public-page-head { padding:52px 7%; background:linear-gradient(135deg,#ecfeff,#ffffff); text-align:center; border-bottom:1px solid #d1fae5; }
.public-page-head h1 { font-size:38px; color:#134e4a; margin-bottom:10px; }
.public-page-head p { color:#64748b; font-size:17px; }
.shop-filter { display:grid; grid-template-columns:1.3fr .9fr auto auto; gap:12px; margin-bottom:24px; background:white; border:1px solid #e2e8f0; padding:16px; border-radius:20px; box-shadow:0 10px 28px rgba(15,118,110,.06); }
.reset-filter { display:grid; place-items:center; background:#f8fafc; color:#0f766e; border-radius:12px; padding:0 14px; font-weight:800; }
.public-pagination { margin-top:24px; }
.product-details-section { padding:48px 7%; display:grid; grid-template-columns:1fr 1fr; gap:36px; align-items:start; }
.product-main-photo { background:white; border:1px solid #e2e8f0; box-shadow:0 18px 48px rgba(15,118,110,.08); border-radius:28px; overflow:hidden; min-height:430px; display:grid; place-items:center; color:#64748b; }
.product-main-photo img { width:100%; height:100%; max-height:560px; object-fit:cover; }
.product-thumbs { display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
.product-thumbs img { width:92px; height:92px; object-fit:cover; border-radius:16px; border:2px solid #ccfbf1; }
.product-info-box { background:white; border-radius:28px; padding:30px; box-shadow:0 18px 48px rgba(15,118,110,.08); border:1px solid #e2e8f0; }
.product-info-box h1 { font-size:36px; color:#134e4a; margin:16px 0; }
.details-price { display:block; color:#dc2626; font-size:28px; margin-bottom:16px; }
.details-desc { color:#475569; line-height:2; font-size:16px; }
.details-actions { display:flex; gap:12px; flex-wrap:wrap; margin-top:22px; }
.big-cart-btn, .go-cart-btn { padding:14px 20px; }
.go-cart-btn { background:#f0fdfa; color:#0f766e; border:1px solid #99f6e4; }
.cart-layout { display:grid; grid-template-columns:1.2fr .8fr; gap:24px; align-items:start; }
.cart-box { background:white; border:1px solid #e2e8f0; border-radius:24px; padding:22px; box-shadow:0 14px 38px rgba(15,118,110,.07); }
.mini-head { align-items:center; margin-bottom:14px; }
.clear-cart-btn { background:#fee2e2; color:#991b1b; padding:9px 12px; }
.cart-item { display:grid; grid-template-columns:74px 1fr auto; gap:14px; padding:14px 0; border-bottom:1px solid #e2e8f0; align-items:center; }
.cart-item img, .cart-item-placeholder { width:74px; height:74px; border-radius:16px; object-fit:cover; background:#e2e8f0; display:grid; place-items:center; color:#64748b; font-size:12px; }
.cart-item h3 { margin:0 0 5px; font-size:16px; }
.cart-item p { margin:0; color:#64748b; font-size:13px; }
.qty-controls { display:flex; align-items:center; gap:8px; }
.qty-controls button { padding:6px 10px; border-radius:10px; background:#f0fdfa; color:#0f766e; }
.remove-item { background:#fff1f2 !important; color:#be123c !important; margin-top:8px; }
.cart-total-row { display:flex; justify-content:space-between; align-items:center; padding-top:16px; font-size:18px; }
.cart-total-row strong { color:#dc2626; }
.order-form label { margin-top:12px; }
.send-whatsapp-btn { width:100%; margin-top:16px; padding:14px; }
.empty-public { background:white; border:1px dashed #99f6e4; color:#64748b; padding:24px; border-radius:18px; text-align:center; grid-column:1/-1; }
.public-footer { padding:28px 7%; background:#134e4a; color:white; display:flex; justify-content:space-between; gap:18px; align-items:center; margin-top:30px; }
.public-footer p { margin:6px 0 0; opacity:.85; }
.whatsapp-footer { background:white; color:#0f766e; padding:12px 16px; border-radius:14px; font-weight:900; }
.toast { position:fixed; bottom:22px; right:22px; background:#0f766e; color:white; padding:12px 16px; border-radius:14px; box-shadow:0 12px 30px rgba(0,0,0,.18); z-index:100; }
@media (max-width:1000px){ .shop-grid,.category-chips-grid{grid-template-columns:repeat(2,1fr);} .public-hero,.product-details-section,.cart-layout{grid-template-columns:1fr;} .shop-filter{grid-template-columns:1fr 1fr;} }
@media (max-width:650px){ .public-navbar{align-items:flex-start; flex-direction:column; padding:14px 5%;} .public-nav{gap:10px;} .public-hero,.public-section,.product-details-section,.public-page-head{padding-left:5%; padding-right:5%;} .public-hero h1{font-size:32px;} .shop-grid,.category-chips-grid,.shop-filter{grid-template-columns:1fr;} .shop-card-image{height:210px;} .cart-item{grid-template-columns:60px 1fr;} .cart-item > div:last-child{grid-column:1/-1;} .public-footer{flex-direction:column; align-items:flex-start;} }

/* v3 improvements */
.two-cols { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.app-tabs { display:flex; gap:8px; margin:16px 0; background:white; padding:8px; border-radius:18px; box-shadow:0 10px 30px rgba(15,118,110,.08); }
.tab-btn { flex:1; background:#f0fdfa; color:#0f766e; padding:11px; }
.tab-btn.active { background:#0f766e; color:white; }
.stats-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; margin-bottom:18px; }
.stat-card { background:white; border:1px solid #d1fae5; border-radius:18px; padding:18px; box-shadow:0 10px 30px rgba(15,118,110,.08); }
.stat-card span { color:#64748b; display:block; margin-bottom:8px; }
.stat-card strong { color:#134e4a; font-size:24px; }
.editable-images-row { align-items:flex-start; }
.image-delete-box { margin:0; background:#f8fafc; border:1px solid #e2e8f0; border-radius:16px; padding:8px; }
.image-delete-box span { display:flex; align-items:center; gap:6px; margin-top:6px; font-size:13px; color:#991b1b; }
.image-delete-box input { width:auto; }
.one-column-cart { grid-template-columns:1fr; max-width:850px; margin:auto; }
.simple-whatsapp-form { margin-top:18px; }
.clean-card { border-radius:22px; box-shadow:0 8px 24px rgba(15,118,110,.07); }
.clean-card .shop-card-image { height:185px; background:#f8fafc; }
.clean-card .shop-card-image img { object-fit:contain; padding:8px; background:#f8fafc; }
.card-tags-row { display:flex; gap:8px; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.stock-chip, .stock-line { background:#ecfeff; color:#155e75; padding:5px 10px; border-radius:999px; font-size:12px; font-weight:800; }
.stacked-actions { flex-direction:column; align-items:stretch; }
.product-action-row { display:grid; grid-template-columns:1fr 1fr; gap:8px; width:100%; }
.direct-order-btn { background:#14b8a6; color:white; border:0; padding:10px 14px; border-radius:13px; font-weight:900; cursor:pointer; text-align:center; }
.direct-order-btn:hover { background:#0f766e; }
.shop-desc { min-height:auto; }
.shop-card h3 { font-size:18px; line-height:1.5; }
.product-main-photo img { object-fit:contain; background:#f8fafc; }
@media (max-width:650px){ .two-cols,.stats-grid{grid-template-columns:1fr;} .app-tabs{position:sticky; top:84px; z-index:8;} .clean-card .shop-card-image{height:170px;} .shop-card-body{padding:14px;} .product-action-row{grid-template-columns:1fr;} }
