* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f5f5f5; color: #333; }

/* Login */
.login-container { max-width: 360px; margin: 80px auto; padding: 32px; background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.login-container h1 { text-align: center; margin-bottom: 24px; color: #1a73e8; font-size: 22px; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 4px; font-weight: 500; font-size: 14px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #1a73e8; box-shadow: 0 0 0 2px rgba(26,115,232,.15); }

/* Buttons */
.btn { padding: 8px 16px; border: none; border-radius: 4px; font-size: 14px; cursor: pointer; font-weight: 500; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: #1a73e8; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #1557b0; }
.btn-secondary { background: #e8eaed; color: #333; }
.btn-secondary:hover:not(:disabled) { background: #d2d4d8; }
.btn-success { background: #34a853; color: #fff; }
.btn-success:hover:not(:disabled) { background: #2d8e47; }
.btn-danger { background: #ea4335; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #c5362a; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* Navbar */
.navbar { display: flex; align-items: center; justify-content: space-between; padding: 0 24px; height: 52px; background: #1a73e8; color: #fff; }
.nav-brand { font-size: 16px; font-weight: 600; }
.nav-links { display: flex; gap: 8px; }
.nav-link { color: rgba(255,255,255,.8); text-decoration: none; padding: 6px 14px; border-radius: 4px; font-size: 14px; }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,.15); }
.nav-logout { color: #fdd; }
.nav-logout:hover { background: rgba(255,0,0,.2); color: #fff; }

/* Views */
.view { display: none; padding: 24px; max-width: 1100px; margin: 0 auto; }
.view.active { display: block; }
#view-login.view { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.view-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.view-header h2 { font-size: 20px; }
.view-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Search */
.search-input { padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; min-width: 220px; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.data-table th { background: #f8f9fa; text-align: left; padding: 10px 14px; font-size: 13px; font-weight: 600; border-bottom: 2px solid #e8eaed; white-space: nowrap; }
.data-table td { padding: 10px 14px; font-size: 14px; border-bottom: 1px solid #f0f0f0; }
.data-table tr:hover td { background: #f8f9ff; }
.data-table .product-row td { background: #e8f0fe; font-weight: 600; }

/* Tags */
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.tag-import { background: #e6f4ea; color: #137333; }
.tag-export { background: #fce8e6; color: #c5221f; }

/* Loading */
.loading { display: flex; align-items: center; gap: 10px; padding: 32px; justify-content: center; color: #666; }
.spinner { width: 24px; height: 24px; border: 3px solid #e8eaed; border-top-color: #1a73e8; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Error / Success messages */
.error-msg { color: #c5221f; background: #fce8e6; padding: 8px 12px; border-radius: 4px; font-size: 13px; margin-top: 8px; }
.success-msg { color: #137333; background: #e6f4ea; padding: 8px 12px; border-radius: 4px; font-size: 13px; margin-top: 8px; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: #fff; border-radius: 8px; width: 440px; max-width: 95vw; max-height: 85vh; overflow-y: auto; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #e8eaed; }
.modal-header h3 { font-size: 16px; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #666; padding: 0 4px; }
.modal-close:hover { color: #333; }
.modal-body { padding: 20px; }
.modal-body .form-group:last-child { margin-bottom: 0; }
.modal-body .btn { width: 100%; margin-top: 12px; }

/* Empty state */
.empty-state { text-align: center; padding: 40px; color: #888; font-size: 15px; }

/* Stock value highlight */
.stock-zero { color: #c5221f; font-weight: 600; }
