:root {
    --primary: #1565c0;
    --bg: #f4f6f8;
    --text: #333;
}
body { font-family: sans-serif; margin: 0; background: var(--bg); color: var(--text); display: flex; flex-direction: column; min-height: 100vh; }

/* Auth */
.auth-page { display: flex; justify-content: center; align-items: center; height: 100vh; background: #e3f2fd; }
.auth-container { background: white; padding: 2rem; border-radius: 8px; width: 350px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.tabs { display: flex; margin-bottom: 1rem; border-bottom: 1px solid #ddd; }
.tab-btn { flex: 1; padding: 10px; background: none; border: none; cursor: pointer; }
.tab-btn.active { border-bottom: 3px solid var(--primary); font-weight: bold; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-size: 0.9rem; }
.form-control, input, select { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }

/* Layout App */
header { background: white; padding: 10px 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); display: flex; justify-content: space-between; align-items: center; }
.main-container { display: flex; flex: 1; height: calc(100vh - 60px); }

/* Sidebar */
.sidebar { width: 300px; background: white; border-right: 1px solid #ddd; display: flex; flex-direction: column; padding: 10px; }
.cattle-list { overflow-y: auto; flex: 1; margin-top: 10px; }
.cattle-item { padding: 10px; border-bottom: 1px solid #eee; cursor: pointer; }
.cattle-item:hover { background: #f9f9f9; }
.item-actions { display: none; float: right; }
.cattle-item:hover .item-actions { display: block; }

/* Map */
#map, #admin-map { flex: 1; background: #ddd; height: 100%; }

/* Modals & Utils */
.modal-overlay { position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.modal { background: white; padding: 20px; border-radius: 8px; width: 400px; }
.hidden { display: none; }

.btn { padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-primary { background: var(--primary); color: white; }
.btn-danger { background: #d32f2f; color: white; }
.btn-accent { background: #ff6f00; color: white; }
.btn-ghost { background: transparent; color: #333; }
.btn-sm { padding: 4px 8px; font-size: 0.8rem; }

.alert { padding: 10px; margin-bottom: 10px; border-radius: 4px; font-size: 0.9rem; }
.alert-danger { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.badge { background: #e3f2fd; color: var(--primary); padding: 2px 8px; border-radius: 10px; font-size: 0.8rem; }