/* MOTOS TEMPLATE - TECHNICAL, DARK MODE, DASHBOARD LAYOUT */
:root {
  --font-sans: 'Roboto', sans-serif;
  --font-mono: 'Roboto Mono', monospace;
  
  --bg-app: #0f1115;
  --bg-panel: #16181d;
  --bg-card: #1e2128;
  
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  
  --accent: #f59e0b; /* Orange/Amber */
  --accent-hover: #d97706;
  
  --border: #334155;
  --border-light: #1e293b;
  
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

[data-theme='light'] {
  --bg-app: #f1f5f9;
  --bg-panel: #ffffff;
  --bg-card: #ffffff;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  
  --accent: #ea580c;
  --accent-hover: #c2410c;
  
  --border: #cbd5e1;
  --border-light: #e2e8f0;
  
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-sans); background: var(--bg-app); color: var(--text-main); font-size: 14px; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Dashboard Layout */
.app-layout { display: flex; min-height: 100vh; }
.app-sidebar { width: 240px; background: var(--bg-panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: fixed; top:0; bottom:0; left:0; z-index: 100; }
.app-main { flex: 1; margin-left: 240px; padding: 20px 40px; }

@media (max-width: 768px) {
  .app-sidebar { display: none; }
  .app-main { margin-left: 0; padding: 15px; padding-top: 70px; }
}

/* Sidebar */
.sidebar-top { padding: 20px; border-bottom: 1px solid var(--border-light); }
.brand-info { display: flex; flex-direction: column; }
#brand-name { font-family: var(--font-mono); font-weight: 700; font-size: 1.2rem; color: var(--accent); }
#brand-tagline { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; margin-top: 4px; }

.sidebar-nav { flex: 1; padding: 20px 0; display: flex; flex-direction: column; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; color: var(--text-muted); font-weight: 500; transition: all 0.2s; }
.nav-item:hover { background: var(--bg-card); color: var(--text-main); border-right: 2px solid var(--accent); }
.nav-item svg { width: 16px; height: 16px; }
.badge { background: var(--accent); color: #fff; font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; margin-left: auto; font-family: var(--font-mono); }

.sidebar-bottom { padding: 20px; border-top: 1px solid var(--border-light); }
.btn-theme { width: 100%; padding: 10px; background: transparent; border: 1px solid var(--border); color: var(--text-main); font-family: var(--font-mono); font-size: 0.8rem; cursor: pointer; border-radius: 4px; }
[data-theme='light'] .theme-text-light { display: none; }
[data-theme='dark'] .theme-text-dark { display: none; }

/* Mobile Header */
.mobile-header { display: none; position: fixed; top: 0; left: 0; right: 0; height: 60px; background: var(--bg-panel); border-bottom: 1px solid var(--border); z-index: 90; align-items: center; justify-content: space-between; padding: 0 15px; }
.mobile-title { font-family: var(--font-mono); font-weight: 700; color: var(--accent); }
.btn-icon { background: transparent; border: none; color: var(--text-main); cursor: pointer; }
@media (max-width: 768px) { .mobile-header { display: flex; } }

/* Hero */
.dashboard-hero { margin-bottom: 30px; }
#hero-title { font-size: 2rem; font-weight: 900; letter-spacing: -0.5px; margin-bottom: 8px; }
#hero-sub { color: var(--text-muted); font-size: 1.1rem; }

/* Filters */
.data-filters { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 6px; padding: 20px; margin-bottom: 30px; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.filter-col label { display: block; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); margin-bottom: 6px; }
.input, .select { width: 100%; background: var(--bg-app); border: 1px solid var(--border-light); color: var(--text-main); padding: 10px; border-radius: 4px; font-family: var(--font-sans); font-size: 0.9rem; }
.input:focus, .select:focus { outline: none; border-color: var(--accent); }

.quick-filters { margin-top: 15px; padding-top: 15px; border-top: 1px dashed var(--border-light); }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--bg-app); border: 1px solid var(--border-light); color: var(--text-muted); padding: 6px 12px; font-size: 0.8rem; border-radius: 4px; cursor: pointer; font-family: var(--font-mono); }
.chip.is-active, .chip:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Products Data View */
.data-header { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.data-header h2 { font-family: var(--font-mono); font-size: 1rem; font-weight: 700; }
.badge-count { background: var(--border); color: var(--text-main); font-size: 0.75rem; padding: 2px 8px; border-radius: 12px; font-family: var(--font-mono); }

/* Table-like Grid */
.products-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 1024px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}

.card { display: flex; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 4px; padding: 12px; gap: 15px; transition: border-color 0.2s; position: relative; }
.card:hover { border-color: var(--accent); }
.card-thumb-wrap { width: 80px; height: 80px; background: var(--bg-app); border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.card-thumb { width: 100%; height: 100%; object-fit: contain; }
.card-body { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.card-cat { font-family: var(--font-mono); font-size: 0.65rem; color: var(--accent); text-transform: uppercase; margin-bottom: 4px; }
.card-body h3 { font-size: 1rem; font-weight: 600; line-height: 1.2; margin-bottom: 4px; }
.card-var { font-size: 0.75rem; color: var(--text-muted); }
.card-price { font-family: var(--font-mono); font-weight: 700; font-size: 1.1rem; color: var(--text-main); margin-top: auto; }

.card-actions { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; }
.btn-add-modal { background: var(--border-light); border: 1px solid var(--border); color: var(--text-main); font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; padding: 6px 10px; border-radius: 3px; cursor: pointer; transition: all 0.2s; }
.btn-add-modal:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-details { display: none; } /* Hide details btn in this view */

/* Footer */
.app-footer { margin-top: 60px; padding-top: 30px; border-top: 1px solid var(--border); }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer-title { font-family: var(--font-mono); font-weight: 700; color: var(--text-main); font-size: 1.2rem; }
#footer-quote { color: var(--text-muted); font-size: 0.85rem; margin-top: 5px; }
.footer-tech p { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; }
.footer-tech span { color: var(--text-main); font-weight: 700; }

/* Cart Panel */
.cart-backdrop, .modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.cart-backdrop.is-open, .modal-backdrop.is-open { opacity: 1; pointer-events: auto; }

.cart-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 400px; max-width: 100%; background: var(--bg-panel); border-left: 1px solid var(--border); z-index: 1001; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); display: flex; flex-direction: column; }
.cart-panel.is-open { transform: translateX(0); }

.cart-head { padding: 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.cart-head h2 { font-family: var(--font-mono); font-size: 1rem; }
.cart-body { flex: 1; overflow-y: auto; padding: 20px; }
.cart-foot { padding: 20px; background: var(--bg-app); border-top: 1px solid var(--border); }

.cart-item { display: flex; gap: 12px; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px dashed var(--border-light); }
.cart-item-img { width: 60px; height: 60px; background: var(--bg-card); object-fit: contain; border-radius: 4px; border: 1px solid var(--border-light); }
.cart-item-info { flex: 1; }
.cart-item-title { font-weight: 600; font-size: 0.9rem; }
.cart-item-var { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.cart-item-price { font-family: var(--font-mono); font-weight: 700; font-size: 0.9rem; margin-top: 8px; color: var(--accent); }
.qty-ctrl { display: inline-flex; border: 1px solid var(--border); border-radius: 3px; margin-top: 8px; }
.qty-ctrl button { background: var(--bg-app); border: none; padding: 4px 8px; color: var(--text-main); cursor: pointer; }
.qty-ctrl span { padding: 4px 10px; font-family: var(--font-mono); font-size: 0.8rem; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }

.cart-total-row { display: flex; justify-content: space-between; font-family: var(--font-mono); margin-bottom: 15px; font-weight: 700; }
.tech-val { color: var(--accent); font-size: 1.2rem; }

.btn-action { width: 100%; background: var(--accent); border: none; color: #fff; padding: 12px; font-family: var(--font-mono); font-weight: 700; font-size: 0.9rem; border-radius: 4px; cursor: pointer; text-align: center; }
.btn-action:hover { background: var(--accent-hover); }
.btn-ghost { padding: 12px; background: transparent; border: 1px solid var(--border); color: var(--text-main); font-family: var(--font-mono); cursor: pointer; border-radius: 4px; }

/* Modals */
.modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--bg-panel); border: 1px solid var(--border); border-radius: 6px; width: 90%; max-width: 600px; max-height: 90vh; overflow-y: auto; z-index: 1001; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.8); }
.modal-close { position: absolute; top: 15px; right: 15px; background: transparent; border: none; font-size: 24px; color: var(--text-muted); cursor: pointer; }
.modal-split { display: flex; flex-direction: column; }
@media (min-width: 600px) { .modal-split { flex-direction: row; } .modal-left { width: 200px; border-right: 1px solid var(--border); } .modal-right { flex: 1; padding: 20px; } }
.modal-left { padding: 20px; background: var(--bg-app); display: flex; align-items: center; justify-content: center; }
.modal-product-img { width: 100%; max-width: 160px; object-fit: contain; }
.modal-right { padding: 20px; }

.modal h3 { font-size: 1.2rem; margin-bottom: 8px; }
.modal-price { font-family: var(--font-mono); font-size: 1.4rem; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 15px; }

.tech-specs { background: var(--bg-app); border: 1px solid var(--border-light); border-radius: 4px; padding: 12px; margin-bottom: 15px; }
.spec-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); margin-bottom: 10px; }
.var-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.var-opt { background: var(--bg-panel); border: 1px solid var(--border); color: var(--text-main); padding: 8px; font-family: var(--font-mono); font-size: 0.8rem; text-align: center; border-radius: 3px; cursor: pointer; }
.var-opt.is-selected { border-color: var(--accent); color: var(--accent); background: rgba(245, 158, 11, 0.1); }
