* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f0f2f5; color: #333; min-height: 100vh; }
#app { max-width: 1200px; margin: 0 auto; padding: 20px; }
.panel { background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); padding: 30px; }
.hidden { display: none !important; }

#login-panel { max-width: 400px; margin: 80px auto; }
#login-panel h2 { text-align: center; margin-bottom: 30px; color: #1a73e8; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 14px; color: #555; }
.form-group input, .form-group select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; transition: border-color 0.2s; }
.form-group input:focus, .form-group select:focus, textarea:focus { outline: none; border-color: #1a73e8; box-shadow: 0 0 0 3px rgba(26,115,232,0.1); }

button { padding: 10px 20px; background: #1a73e8; color: #fff; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; transition: background 0.2s; }
button:hover { background: #1557b0; }
button:disabled { background: #ccc; cursor: not-allowed; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-danger { background: #dc3545; }
.btn-danger:hover { background: #c82333; }
.btn-group { display: flex; gap: 10px; margin-top: 16px; }

.error { color: #dc3545; font-size: 13px; margin-top: 8px; }
.success { color: #28a745; font-size: 13px; margin-top: 8px; }
.result { color: #1a73e8; font-size: 14px; margin-top: 8px; font-weight: 500; }

.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.header h2 { color: #1a73e8; }
.user-info { display: flex; align-items: center; gap: 12px; font-size: 14px; }

.tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 2px solid #e0e0e0; }
.tab { padding: 10px 20px; background: none; color: #666; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; border-radius: 0; font-size: 14px; cursor: pointer; }
.tab:hover { background: none; color: #1a73e8; }
.tab.active { color: #1a73e8; border-bottom-color: #1a73e8; }

.tab-content { display: none; }
.tab-content.active { display: block; }

.filter-bar { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; }
.filter-bar select, .filter-bar input { width: auto; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }

#orders-table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; }
th { background: #f8f9fa; font-weight: 600; color: #555; white-space: nowrap; }
tr:hover { background: #f8f9fa; }
td .actions { display: flex; gap: 6px; }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }
.pagination button { padding: 6px 12px; font-size: 12px; }

.admin-section { margin-bottom: 24px; padding: 16px; background: #f8f9fa; border-radius: 8px; }
.admin-section h3 { margin-bottom: 12px; font-size: 16px; color: #333; }
.admin-section button { margin-right: 8px; margin-top: 8px; }
.admin-section textarea { width: 100%; height: 80px; padding: 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; resize: vertical; margin-top: 8px; }

.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal { background: #fff; border-radius: 8px; padding: 24px; max-width: 500px; width: 90%; max-height: 80vh; overflow-y: auto; }
.modal h3 { margin-bottom: 16px; }
.modal .form-group { margin-bottom: 12px; }
.modal .btn-group { justify-content: flex-end; }

@media (max-width: 768px) {
  #app { padding: 10px; }
  .panel { padding: 16px; }
  .filter-bar { flex-wrap: wrap; }
  .header { flex-direction: column; gap: 10px; align-items: flex-start; }
}
